Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle images during software development

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.

like image 757
Jens Schauder Avatar asked Aug 31 '09 18:08

Jens Schauder


3 Answers

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.

like image 61
Brian MacKay Avatar answered Nov 14 '22 19:11

Brian MacKay


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.

like image 37
jmq Avatar answered Nov 14 '22 18:11

jmq


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.

like image 3
Aaron Digulla Avatar answered Nov 14 '22 19:11

Aaron Digulla