CF9 EXIF Removal bug

February 8, 2010 · No Comments

I ran into a little bug in ColdFusion 9 whilst writing an article for .net magazine. Keeping it simple, if you perform two or more write operations on an image (to disk), using the same filename, ColdFusion will remove all the EXIF data stored in the image.

This is listed as bug 75605, which is supposed to be fixed, but it must have slipped through the cracks somewhere. I've pinged Adobe about it, along with a reproducable case, and a workaround.

I came across the bug because I was uploading an image (which writes the image to disk) and then I was adding a watermark, and to save the new watermarked image, it has to once again be written to disk.

This second write removes the EXIF data in the image.

The workaround is to save the watermarked version to disk under a temporary name, delete the original, and then rename the temporary image file to it's proper name.

You can grab the repo/workaround here.

Tags: ColdFusion

0 response s so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment

Leave this field empty: