views:

179

answers:

7

For software development one often needs images. But when I start working on an image I very fast end up with dozens of versions, like so

  • Start with a nice large scale image, let's say a photo from my camera(x.nef)
  • I do some adjustments on exposure correction and white balance, convert it to a x.jpg
  • start to add some little stuff by copying in various pieces from two other images. (a.jpg, b.jpg resulting in a layered image x.pdn
  • now I scale it to the required size and save it as x_small.jpg

By now I have 6 different image files floating around, and nobody but me knows the process behind them.

So the question is: How do you handle images in the development process?

Edit: Thx for all the great input. I combined various questions to my own personal best answer. But I accepted jiinx0r's answer because it really contained the missing idea for me to apply a naming convention for the kind of changes done.

+1  A: 

We typically have the image title and resolution appended together in the name.

myimage_800_600.png

this way all of the like images are grouped together in the folder view and you can easily select the size you want without having to wander what "medium" means.

Robert Greiner
+5  A: 

You could just put your images under source control.

That would handle the revision history and notes. If you really need to keep all the transitional versions of the image around and don't want that in your project folder, most source control trees have a 'tools' area for that type of thing.

EDIT: If what you're after is keeping track of the various sizes (thumbnails, etc), I would go with convention over configuration and implement a uniform file (or directory) naming system.

For instance, I would probably have seperate folders for the 100px and 500px versions of the same image. Or maybe I would put them in the same folder with a special naming convention: logo-100.jpg, and logo-500.jpg ...Either way is probably fine, just make a decision and be sure to stay consistent throughout the project.

One last thought: some folks like to include a ton of metadata in the file name. To me it depends on the scope of your operation and your individual needs. I would personally default to a less is more approach -- if you're thinking about investing in maintaining something like that (or creating a tool to do it for you), make sure it's actually a net gain of time and not just something for your OCD to filddle with!

As developers, we do tend to make glaring mistakes in this area. I know I've been guilty a bunch of times.

Brian MacKay
I don't think that will work if you need the same image but different sizes throughout the application (thumbnails for instance)
Robert Greiner
Good thought, I added an edit for that in case that's what he's after.
Brian MacKay
+4  A: 

file naming should be handled via a naming convention.

{name}-{mod type}-{size}-{version}-{create date}.png
{name}-final.png

e.g. 
file-white_balance-800x600-v01-20090831.png
file-white_balance-800x600-v02-20090831.png
file-final.jpg

the real point is to create an agreed on convention that people see the value in following (however simple/complex is necessary for your group). In my organization we do this for input/output datafiles, images, scripts, etc. (not the same convention necessarily for all, but that they follow something that was agree upon)

Hope that helps.

jinxx0r
It's sad, isn't it? The VAX file system had multiple versions per file, mainframe could do it. Windows and Linux can't. Apple sells it as "new feature". There are so many file formats which could really benefit from a file system that automatically versions files ... :(
Aaron Digulla
+2  A: 

I try hard to have only a single "source" image and then pour all the changes into a short Python script or some other piece of code so that I can recreate the effects and/or adjust them any time later.

The original image is saved either as PNG or TIFF (to avoid quality loss due by saving) and converted into the final type as the very last step. That's also the time when I do the scaling and other lossy operations.

Aaron Digulla
do you use python to 'remote control' a image manipulation program? Or do you use python to actually do the image manipulation?
Jens Schauder
I'm using PIL (pyhon imaging library).
Aaron Digulla
+2  A: 

We developed a downloadable and a web game with a few hundred graphic assets, most of which were stored as psd files during development. We needed jpg and and png versions for the release version of the game and lower quality jpg and png versions for the web version.

We checked the originals into source control to handle versioning.

In order to remain flexible and able to alter the original without having to re-pack the image twice after each update, we had a Perl / ImageMagick script that would update the packed images automatically.

The file name remained the same, but the compressed images would go to different directories, depending which version of the game each image was packed for.

Adrian Grigore
+1  A: 

I agree in that source control might be your best bet for this. However conventional source control doesn't really fit images.

Have you looked at http://www.alienbrain.com ?

It's commercial but may be something that could help. I was also looking and saw something about Photoshop or Imageready having version control in it too. You could look into that.

Corazu
Good to know there are tools to help with this, although it is way to expensive for the usage I am thinking about.
Jens Schauder
A: 

I put all the bits and pieces together from the various answers, for a system that fits my needs:

  1. Images go into source control. This includes images of or intermediate steps.
  2. If multiple images are needed based on one source image, but with different transformations, this can be integrated into automatic builds (scaling, compressing, tinting)
  3. Based on a naming convention or folder structure files can get categorized into: source (e.g. original photo), intermediate (for the various processing steps), base (an image that is actually used in the software or possible after automatic processing as in step 2)
  4. For the processing steps, a naming convention should ensure that the kind of processing can be recognised, and also the order of steps. So one would be able to move from the source image through the various processing steps to the final image.
Jens Schauder