Question
Another CFImage bug
Second cfImage bug I've found in a week. Tried reporting it
to Adobe, but their bug report form throws a 404 (nice).
Basically, certain JPGs will cause CF (or more specifically, Java) to throw this error after reading them to memory, then writing it to disk:
Missing Huffman code table entry
javax.imageio.IIOException: Missing Huffman code table entry at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeImage(Native Method) at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:996) at coldfusion.image.ImageWriter.writeJPeg(ImageWriter.java:60) at coldfusion.image.ImageWriter.writeImage(ImageWriter.java:119) at coldfusion.image.Image.write(Image.java:578) at coldfusion.tagext.io.ImageTag.performWrite(ImageTag.java:593) at coldfusion.tagext.io.ImageTag.doStartTag(ImageTag.java:500)
Run the attached code with the image found here:
http://img141.imageshack.us/img141/9549/testimagefk9.jpg
If you put the URL into the cfimage source (instead of downloading the image and reading it locally) you get a different error:
coldfusion.image.Image$ReadImageMetadataException: Exception occured in JPG processing.
segment size would extend beyond file stream length
at coldfusion.image.Image.initializeMetadata(Image.java:2403)
at coldfusion.image.Image.getExifMetadata(Image.java:2415)
at coldfusion.image.Image.write(Image.java:577)
at coldfusion.tagext.io.ImageTag.performWrite(ImageTag.java:593)
at coldfusion.tagext.io.ImageTag.doStartTag(ImageTag.java:500)
Verified on Win2K, Win2K3, and WinXP. CF version 8.0.1.
Basically, certain JPGs will cause CF (or more specifically, Java) to throw this error after reading them to memory, then writing it to disk:
Missing Huffman code table entry
javax.imageio.IIOException: Missing Huffman code table entry at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeImage(Native Method) at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:996) at coldfusion.image.ImageWriter.writeJPeg(ImageWriter.java:60) at coldfusion.image.ImageWriter.writeImage(ImageWriter.java:119) at coldfusion.image.Image.write(Image.java:578) at coldfusion.tagext.io.ImageTag.performWrite(ImageTag.java:593) at coldfusion.tagext.io.ImageTag.doStartTag(ImageTag.java:500)
Run the attached code with the image found here:
http://img141.imageshack.us/img141/9549/testimagefk9.jpg
If you put the URL into the cfimage source (instead of downloading the image and reading it locally) you get a different error:
coldfusion.image.Image$ReadImageMetadataException: Exception occured in JPG processing.
segment size would extend beyond file stream length
at coldfusion.image.Image.initializeMetadata(Image.java:2403)
at coldfusion.image.Image.getExifMetadata(Image.java:2415)
at coldfusion.image.Image.write(Image.java:577)
at coldfusion.tagext.io.ImageTag.performWrite(ImageTag.java:593)
at coldfusion.tagext.io.ImageTag.doStartTag(ImageTag.java:500)
Verified on Win2K, Win2K3, and WinXP. CF version 8.0.1.
