Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Guest
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Register to forums    Log in

 
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
Thread started 24 Jun 2009 (Wednesday) 09:26
Search threadPrev/next
sponsored links (only for non-logged)

Need to add product data directly to images

 
klynam
Goldmember
Avatar
1,237 posts
Joined Oct 2004
Location: Photopolis
     
Jun 24, 2009 09:26 |  #1

Last week I shot 34 custom lamps. The client wants the product information (name, part no., price, etc.) added to the actual image so they can make 4x6 prints with the image and data on the print.

They don't want back printing, or adhesive labels on the back (both my suggestions) They want the info on the front w/ the image.

Obvioulsy I can create a text layer for each lamp in my .psd file.

But does anyone have another (more streamlined/automated) process or tool for doing this type of thing?


Canon Cameras & Lenses | Masterworks Photography (external link) | God is Light
"Until you can do better, copy." Tony Gresham

  
  LOG IN TO REPLY
kirkt
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Jun 24, 2009 09:39 |  #2

If you are using Photoshop (I use CS3) you can use the "Variables" feature (data driven graphics) which basically permits you to set up copy or image placeholders in a template document and then populate the template with a set of corresponding copy and image data to generate a full set of image+copy documents.

Search PS help for "variables" or "data driven graphics". Here is the intro text:

Data-driven graphics make it possible to produce multiple versions of an image quickly and accurately for print or web projects. For example, you can produce 100 versions of a web banner with different text and images, all based on a template design.

You generate the graphics by exporting them from Photoshop, or you can create templates for use in other programs such as Adobe® GoLive® or Adobe® Graphics Server (see Saving templates for use with other Adobe products).

Follow these general steps to create graphics from templates and data sets:

1. Create the base graphic to use as the template.
Use layers to separate the elements that you want to change in the graphic.

2. Define variables in the graphic.
Variables specify the parts of the image that change. (See Define variables.)

3. Create or import the data sets.
You can create the data sets in the template, or import them from a text file. (See Define a data set and Creating data sets in external files.)

4. Preview the document with each data set.
To see how your final graphics will look, you can preview before you export all the files. (See Preview or apply a data set.)

5. Generate your graphics by exporting them with the data.
You can export them as Photoshop (PSD) files.

The copy and image files you want to use to produce your art are specified externally in a text file. In PS you set up a template doc and feed it the text file - it will generate a PSD file for each combo of copy+image. SO, if you have 34 lamps, you will have 34 images and in a folder, with the text file that contains columns of data, including a column for Lamp Name, Price, Description, Catalog Number, whatever. You will feed PS this text file that pairs each image/copy and instructs the template to composite each image/copy pair into the template and automatically export that composite for all 34 versions.

Here is an example of the syntax that is used in the text file to specify the copy+image pairing:

Creating data sets in external files

You can quickly create a large number of data sets by creating an external text file that contains all the variable information and loading that file into a PSD document containing variables. One method is to enter your data into a text file or Microsoft Excel spreadsheet and then export it to a tab or comma-separated file.

The syntax of the external text file is as follows (where each line that starts with “Variable” or “Value” is an entire line by itself in your file):


VariableName1<sep>VariableName2<sep> <sep>VariableNameN <nl>
Value1-1<sep>Value2-1<sep>><sep>ValueN-1<nl>
Value1-2<sep>Value2-2<sep><sep>ValueN-2<nl>
Value1-M<sep>Value2-M<sep><sep>ValueN-M<nl>

All the variable names are listed on the first line, in the order that the values are given in subsequent lines. Each subsequent line represents one data set, with the values for each variable given.
To create multiple lines of text in a single line of text in a data set, enclose the text in double quotes and insert hard returns in the tab- or comma-separated file where you want the breaks to occur.
External text file syntax elements

<sep>

Either a comma-separated (CSV) or a tab (tab-delimited) file that separates each variable name or value.

<nl>

A newline character that ends each data set and can be a line feed, carriage return, or both.

“true” and “false”

Allowed values for a visibility variable.

Spaces

Spaces around the delimiter are removed when parsing the file; between words in a value string (e.g., two of a kind) spaces are maintained and leading and trailing spaces are maintained if enclosed in double quotes (e.g., “one kind ”).

Double quotes

Can be part of a value if preceded by another double quote (e.g., ““B”” would be “B” in the data set).

If <sep> or <nl> is part of the variable value, then the entire value must be enclosed in double quotes.

All variables defined in the PSD document must be defined in the text file. An error is displayed if the number of variables in the text file does not match the number in the document.

Example data set:

Using a template for flowers that holds variables for tulip and sunflower, you can set up a text file that looks like this:


{contents of FlowerShow.txt}
Variable 1, Variable 2, Variable 3
true, TULIP, c:\My Documents\tulip.jpg
false, SUNFLOWER, c:\My Documents\sunflower.jp​g
false, CALLA LILY, c:\My Documents\calla.jpg
true, VIOLET, c:\My Documents\violet.jpg
Note: You can use a relative path for the image location if the text file is in the same folder as the image file. For example, the last item in the example can be: true, VIOLET, violet.jpg.


Hope this helps!

Kirk


Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
klynam
THREAD ­ STARTER
Goldmember
Avatar
1,237 posts
Joined Oct 2004
Location: Photopolis
     
Jun 24, 2009 10:46 |  #3

That could be freek'n awesome - just have to figure out HOW to do it now...THANKS!!!


Canon Cameras & Lenses | Masterworks Photography (external link) | God is Light
"Until you can do better, copy." Tony Gresham

  
  LOG IN TO REPLY
kirkt
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Jun 25, 2009 00:34 |  #4

Here is a little tutorial I put together to help you out.

1) Gather all of your art in a single folder. Use logical filenames to help you keep your brain from frying. Here is an example of a photograph of a lamp for this tutorial:

IMAGE: http://kirkt.smugmug.com/photos/573364108_sKWSf-L.jpg

2) In Photoshop, you are going to create a new document that will be the correct size and resolution for your final print. You had mentioned 4x6 prints, so let's go with 4x6 at 240 dpi for kicks, 8 bit RGB color. I didn't do that for this example, I'm just saying....

3) Set up the document carefully, as this will be the "Master" template, upon which all of your comps will be based. You are going to set up you Master with layers. Each layer will be an element you want to change in a comp. This may include background visibility, lamp images, lamp names, lamp prices, lamp catalog numbers, etc.

Give each layer a logical name. Here is an example of a master document, set up as a template:

IMAGE: http://kirkt.smugmug.com/photos/573412251_8WcdW-L.jpg

Note the layer names, etc. In this case, I am going to have four lamps, and each arrangement will have two different backgrounds, one that is white (ground) and one that is 50% gray (backdrop). For each version, I will toggle the visibility of the "Backdrop" layer to reveal or hide the white "Ground" layer.

So, once we have the template set up the way we want it to look, we need to set up each layer as a variable. Graphics layers will have the ability to toggle visibility, or specify a "pixel replacement" attribute. Text layers will have similar attributes. Go to the "Image > Variables > Define" menu item:

IMAGE: http://kirkt.smugmug.com/photos/573412278_iMDKB-L.jpg

and define each layer's attribute. Note that you will need to define a variable name. Replace the default with something more logical - I used the field text from the template doc as the variable name. Note, variable names are CASE SENSITIVE.

4) Fire up your spreadsheet or text editor and define your Data Sets. Here is my Excel spreadsheet:

IMAGE: http://kirkt.smugmug.com/photos/573412210_AGtGi-L.jpg

here you can see my variable names and how I refer to the graphic files I want to insert in each case (Graphic) the visibility of either the gray backdrop (BackdropVisible) and the text I want in each field placeholder for each lamp version.

once you get that all set, export it as a CSV or Tab delimited text file. This is what you will feed to the automated Photoshop machine in the next step.

5) Now you are going to define your Data Sets. You could do this manually for each version of the comp you want to generate, but you already did this efficiently in the spreadsheet. So, go to "Image > Variables > Data Sets":

IMAGE: http://kirkt.smugmug.com/photos/573412254_JhZcr-L.jpg

And you will get the following Data Sets dialog - select "import" from the right hand side:

IMAGE: http://kirkt.smugmug.com/photos/573412266_u2eBM-L.jpg

hit "Select File" and browse to the CSV file you exported from Excel earlier.

6) When you do this, Photoshop creates a Data Set for each line of your CSV file (ie, a Data Set for each comp you want). Here you can preview each comp by clicking the previous and next arrows next to the Data Set field.

Cool. If all looks good, you are ready to automagically crank out all of the comps you need.

7) Go to "File > Export > Data Sets as Files"

IMAGE: http://kirkt.smugmug.com/photos/573412222_mGW3z-L.jpg

and tweak the final naming convention and save location. You will export PSD files, so each comp will be fully editable on the layer level you set up in the Master template, in case you need to make some changes.

Here are the final comps of my sweet lamp shoot, with 4 lamps and two backgrounds:

IMAGE: http://kirkt.smugmug.com/photos/573430132_3pbCv-M.jpg

As you can appreciate, careful set up of the template, uniformity of source material and an organized set of variable names/spreadsheet are the keys to making quick work of a large number of comps. Hope this helps. Have fun!

Kirk

PS - it was really late when i wrote this, forgive mistakes, typos etc. If something seems amiss, it probably is. I will check it in the morning. Hopefully this will get you started.

Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
klynam
THREAD ­ STARTER
Goldmember
Avatar
1,237 posts
Joined Oct 2004
Location: Photopolis
     
Jun 25, 2009 09:00 |  #5

THIS SHOULD BE A STICKY FOR EVERY PRODUCT, SCHOOL, TEAM PHOTOGRAPHER ON POTN - I'VE WORKED IN PS SINCE V1 AND NEVER NEW THIS FEATURE WAS AVAILABLE !!!!

Unbelievable - thank you Kirk!!!!

I was in a pickle the other day and had to do everything manually w/ layers, save-as, etc. But I will absolutely go through your tut and this data feature to streamline my product photography work flow.

So the results of all this are layered, fully editable .psd files. That seems a little limiting given all the other work this feature is capable of. It would be really cool if the last step of this process had some final output options (flatten, sRGB, etc.) or at least a "run script" option such as the Image Processor offers.

Still I can run the Image Processor (and/or a batch w/ custom script) after the fact to create my final image files, then simply delete the interim .psd files (saving the master "assembler" file of course.)

Thank you again - and please keep the info coming if you think of new stuff !!! :-)

KL


Canon Cameras & Lenses | Masterworks Photography (external link) | God is Light
"Until you can do better, copy." Tony Gresham

  
  LOG IN TO REPLY
kirkt
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Jun 25, 2009 09:24 |  #6

PS V1? Damn, that's old school!

KL - You're welcome. I was just farting around with this aspect of PS a few months ago, and decided to go through the exercise after your post. Thanks for the opportunity. It seems like the very simple set of tools can be used in a variety of ways to do a ton of different tasks automatically. Data+Graphics = Fun.

I think, given the ability to run actions and batch processing, leaving the comps in PSD is easy enough for the extra step of flattening, converting to sRGB, scaling, etc. for alternate final output.

One thing I did not mention - if you put the CSV data file in the same folder as your art (the graphics files) then you can use the relative, local filename in your spreadsheet to refer to each graphics file (as I did in this example). However, you can refer to files outside of the directory in which the CSV file lives by using the full path to the file. THis way you can have multiple directories filled with art, if that hierarchy makes organizing your workflow easier, etc. I am not sure if you can refer to files over a network this way (via URL or similar convention) - something to try when you really want to get your nerd on.

Rock on!

Kirk

PS - the Lowrider is a sweet lamp, and it's on sale!


Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
Mark1
Cream of the Crop
Avatar
6,725 posts
Likes: 7
Joined Feb 2008
Location: Maryland
     
Jun 25, 2009 09:52 |  #7

I got to try this!


www.darkslisemag.com (external link)

  
  LOG IN TO REPLY
klynam
THREAD ­ STARTER
Goldmember
Avatar
1,237 posts
Joined Oct 2004
Location: Photopolis
     
Jun 25, 2009 12:21 |  #8

kirkt wrote in post #8172238 (external link)
PS V1? Damn, that's old school

Dude - I started with Aldus Digital Darkroom (8bit / grayscale only) on the Mac even before Photoshop came out.

Then again, I also won my senior high talent show with a break dance routine back in 1985 so yeah, I'm old school...:p


Canon Cameras & Lenses | Masterworks Photography (external link) | God is Light
"Until you can do better, copy." Tony Gresham

  
  LOG IN TO REPLY
kirkt
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Jun 25, 2009 12:25 |  #9

Nice. Oh yeah, breakdancing. Junior high school for me. So you must have played Dark Castle on the Mac, too. It rocked my sweet Mac SE20. The thing had a 3.5" disk drive, 20MB hard drive and 1MB of RAM. Raw power.

Congratulations on that big talent show win, way to stone cold kick it live.

Kirk


Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
René ­ Damkot
Cream of the Crop
Avatar
39,856 posts
Likes: 8
Joined Feb 2005
Location: enschede, netherlands
     
Jun 25, 2009 12:46 |  #10

For those who like to look instead of read:

The video: http://www.layersmagaz​ine.com/photoshop-variables.html (external link)


"I think the idea of art kills creativity" - Douglas Adams
Why Color Management.
Color Problems? Click here.
MySpace (external link)
Get Colormanaged (external link)
Twitter (external link)
PERSONAL MESSAGING REGARDING SELLING OR BUYING ITEMS WITH MEMBERS WHO HAVE NO POSTS IN FORUMS AND/OR WHO YOU DO NOT KNOW FROM FORUMS IS HEREBY DECLARED STRICTLY STUPID AND YOU WILL GET BURNED.

  
  LOG IN TO REPLY
klynam
THREAD ­ STARTER
Goldmember
Avatar
1,237 posts
Joined Oct 2004
Location: Photopolis
     
Jun 25, 2009 12:53 |  #11

oooo - pretty pictures move - me like too...


Canon Cameras & Lenses | Masterworks Photography (external link) | God is Light
"Until you can do better, copy." Tony Gresham

  
  LOG IN TO REPLY
kirkt
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Jun 25, 2009 12:55 |  #12

Thanks René - at least, according to the Dave Cross video, I did it correctly!

Kirk


Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
Galaxy99
Goldmember
Avatar
1,142 posts
Joined Feb 2007
Location: So. Cal
     
Jun 25, 2009 15:47 |  #13

Nice. Gonna try it! Rene, Can you stick this one on the top?


Gear List

  
  LOG IN TO REPLY
René ­ Damkot
Cream of the Crop
Avatar
39,856 posts
Likes: 8
Joined Feb 2005
Location: enschede, netherlands
     
Jun 25, 2009 19:59 |  #14

Quite a few stickies already, so I added this one to the "*** Photoshop Actions ***" one.
Seemed appropriate ;)


"I think the idea of art kills creativity" - Douglas Adams
Why Color Management.
Color Problems? Click here.
MySpace (external link)
Get Colormanaged (external link)
Twitter (external link)
PERSONAL MESSAGING REGARDING SELLING OR BUYING ITEMS WITH MEMBERS WHO HAVE NO POSTS IN FORUMS AND/OR WHO YOU DO NOT KNOW FROM FORUMS IS HEREBY DECLARED STRICTLY STUPID AND YOU WILL GET BURNED.

  
  LOG IN TO REPLY
tim
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Jun 25, 2009 20:06 |  #15

Rene, I never ever noticed the * photoshop actions* thread before, and i'm Mr "Go read the FAQ". So i'd put it in the general forum FAQ thread too.


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
sponsored links (only for non-logged)

12,048 views & 0 likes for this thread, 9 members have posted to it.
Need to add product data directly to images
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Forums   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset   •  Home

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.58forum software
version 2.58 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member is semonsters
1060 guests, 102 members online
Simultaneous users record so far is 15,144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.