Skip to main content
Known Participant
September 8, 2009
Answered

CFIMAGE not working with certain JPG

  • September 8, 2009
  • 1 reply
  • 2883 views

Hi all,

Got an emergency here, hope anyone can help.

I find that more and more people are encountering problems using CFIMAGE -- no error is thrown when reading/saving certain jpg images, but the result image is just blank and gray.

The code is just simple:

<CFSET IM=ImageRead("C:\DSCN1570.JPG")>

<cfset ImageResize(IM,300,200,"highPerformance")>
<cfset ImageWrite(IM,"C:\DSCN1570-2.JPG")>

or even just:

<CFSET IM=ImageRead("C:\DSCN1570.JPG")>
<cfset ImageWrite(IM,"C:\DSCN1570-2.JPG")>

This happens after applying the latest hotfix for 8.0.1 (Cumulative Hotfix 2 for CF 8.0.1). If this patch is not installed the processing works.

Attached is an offending file. The code works if i replace the file with another jpg.

Any help is much appreciated. I'm running CF 8,0,1,195765 devt edition on Windows XP and my java version is 1.6.0_04. My metadata-extractor is 2.3.1.

Thanks,

Andrew

    This topic has been closed for replies.
    Correct answer Adam Cameron.

    andrwo wrote:

    But I seemed to have found out quite conclusively that it is HF 71557 that is responsible for this problem.

    - When Cumulative Hotfix 2 is applied, then the error occurs,

    - When hf801-71557.jar is applied, then the error occurs,

    - When neither is applied, the image process successfully.

    Have you tried with cumulative hotfix 3?

    --

    Adam

    1 reply

    BKBK
    Community Expert
    Community Expert
    September 8, 2009

    There was a known problem with CFImage and Image functions, but I thought that was fixed before Cumulative HotFix 2. What happens when you apply the patch (Technote kb403411, hf801-71557.zip) again?

    andrwoAuthor
    Known Participant
    September 8, 2009

    Hi BKBK,

    Thanks for your reply, but no that is for a different issue to do with file-locking error using CFIMAGE (I should know -- i'm the one who reported that bug to the CF8 team in the first place...)

    But I seemed to have found out quite conclusively that it is HF 71557 that is responsible for this problem.

    - When Cumulative Hotfix 2 is applied, then the error occurs,

    - When hf801-71557.jar is applied, then the error occurs,

    - When neither is applied, the image process successfully.

    I've just tried in CF9 Centaur GMC -- the error does not occur (everything works fine).

    I've also tried updating the CF8.0.1 Java JDK to same version of CF9 (6 Update 14)... same old thing, no luck. I've changed the metadata extractor also to 2.4.0 beta as in CF9 -- also no luck.

    Regards,

    Andrew

    BKBK
    Community Expert
    Community Expert
    September 8, 2009

    These are indeed the most frustrating -- patches that fix one hole, only to open up another crack elsewhere. Have you tried saving the file with other extensions, like jpg(small letters) and jpeg?

    I opened the image in a text editor and saw that Nikon Coolpix was  probably used to make the image. I wonder whether Nikon puts a header in the image that obstructs Coldfusion.