• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

I see inconsistent ImageNew() failures for CMYK Jpeg Images (CF10)

New Here ,
Jul 12, 2013 Jul 12, 2013

Copy link to clipboard

Copied

Weird problem.

I have a set of test cases that pass just fine loading a known CMYK jpeg via ImageNew().  Later, with no restart of the app server, these same test cases fail.  Again, after a while, the test case passes again.  I've dug into the Java a little bit, and I wonder if the ImageReader implementation being used doesn't switch out once in a while -- like maybe a hashtable of ImageReaders reorders or something.

I know the CMYK is only partially supported, but I could get data with ImageNew and ImageInfo showing it was a CMYK file, then later on, it would throw "Image Not Supported" errors.

Anybody have knowledge of these inner workings to provide some insight?  Smells a bit like a bug to me, but I can't consistently replicate it.

-Dave

Views

419

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 16, 2013 Jul 16, 2013

Copy link to clipboard

Copied

LATEST

From what I can tell, it does appear to be a bug.  I have submitted a bug report to Adobe on it.

https://bugbase.adobe.com/index.cfm?event=bug&id=3596008

What seems to be occurring is that coldfusion.image.ImageReader is trying to find the CLibJPEGImageReader class from the collection returned by javax.imageio.ImageIO.getImageReadersByFormatName("jpeg").  This works fine if it is the first object returned in the collection, but if not, it will return another JPEG ImageReader that does not support CMYK images.  I have two systems (both RedHat) which are currently in each state.  One has the CLibJPEGImageReader as the first element in the ImageReader collection, and in the other, it is the second element in the collection.  The code below will work fine when the correct reader is found, but not when it isn't the first element in the collection.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation