Skip to main content
Participant
June 23, 2009
Question

cfimage error

  • June 23, 2009
  • 2 replies
  • 1039 views

I've been using cfimage successfully throughout my site until this page when i get the following

http://64.78.25.130/results.cfm?Form__category=credenza

The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
Flash
Flash

But this is not a flash site!

The error happens when it tries to write the image -- the bolded line below.  This code checks out on other pages of my site and doesnt throw an error.  I have no idea what that "flash flash" error means.  I'm running coldfusion version 8,0,1,195765.  Permissions on my server are set up correctly for the directory in question. Thanks for any tips.

<cfset currentPath = getBaseTemplatePath() >
<!---  original location --->
<cfset dbloc = getDirectoryFromPath(currentPath) & 'images\products\#PHOTO#' >
<!--- image processed location --->
<cfset cfProcessLocDir = getDirectoryFromPath(currentPath) & 'pix\'>
<cfset cfProcessLocThumbsDir = getDirectoryFromPath(currentPath) & 'pix\pixthumbs'>
<cfset cfProcessLoc = getDirectoryFromPath(currentPath) & 'pix\#PHOTO#' >
<cfset cfProcessLocThumbs = getDirectoryFromPath(currentPath) & 'pix\pixthumbs\#PHOTO#' >


    <cfif not FileExists(cfProcessLoc)>
        <cfif FileExists(dbLoc)>
            <cfimage source="#dbLoc#" name="imgforResize">
            <cfset ImageSetAntialiasing(imgforResize,"on")>
            <cfset ImageScaleToFit(imgforResize,"380","","highQuality")>
            <cfif not DirectoryExists(cfProcessLocDir)>
               <cfdirectory action = "create" directory = "#cfProcessLocDir#" >
            </cfif>
            <cfimage source="#imgforResize#" action="write" destination="#cfProcessLoc#" overwrite="true">
        </cfif>
    </cfif>
   
    <cfif not FileExists(cfProcessLocThumbs)>
       
        <cfimage source="#cfProcessLoc#" name="imgforResize">
       
      
        <cfset ImageSetAntialiasing(imgforResize,"on")>
        <cfset ImageScaleToFit(imgforResize,"150","","highQuality")>
        <cfimage source="#imgforResize#" action="write" destination="#cfProcessLocThumbs#" overwrite="true">
    </cfif>

    This topic has been closed for replies.

    2 replies

    Inspiring
    June 23, 2009

    Right now I can see the error message says

    "The Image@13c2132 image format is not supported on this operating system."

    What kind of image is it?

    bigfreshAuthor
    Participant
    June 23, 2009

    I've been testing on the page in the mean time, so that was a totally different error.

    I actually just found something that works.  If I recreate the images as a new image with no EXIF data it seems to not crash when processing the metadata and writes the file successfullly

    <cfset blank = ImageNew("",imgforResize.width,imgforResize.height,"rgb")>
    <cfset clipboard = ImageCopy(imgforResize,0,0,imgforResize.width,imgforResize.height)>

    <cfset ImagePaste(blank,clipboard,0,0) >
    <cfset ImageWrite(blank,"#cfProcessLocThumbs#",0.8) >

    Thanks to this thread

    http://www.coldfusiondeveloper.com.au/go/blog/2009/02/14/remove-exif-data/

    This works for me but doesnt solve the fundamental issue...cfimage bug?

    Inspiring
    June 23, 2009

    Assuming it is a valid image, it could well be a bug.  You might verify you are running the latest updates.  There were some image fixes along the way. I do not know if they involve EXIF data, but you might see if later updates fix the problem.

    http://kb2.adobe.com/cps/402/kb402604.html

    http://www.adobe.com/support/coldfusion/downloads_updates.html

    There was also a mention of an updated meta-data jar fixing one type of exif problem.

    http://www.webapper.com/blog/index.php/2007/10/26/coldfusion-8-exif-error/

    Inspiring
    June 23, 2009

    That is not the full error message.  Follow the instructions beneath that

    "Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debug Output".

    If you do not have access to the Administrator, add a try/catch clause and dump the exception to see more details

    <cftry>
       <cfimage source="#imgforResize#" action="write" destination="#cfProcessLocThumbs#" overwrite="true">
       <cfcatch>
          <cfdump var="#cfcatch#">
       </cfcarch>
    </cftry>

    bigfreshAuthor
    Participant
    June 23, 2009

    Thanks for the reply... the error message now follows

    struct
    DetailFlash
    MessageFlash
    StackTracecoldfusion.image.Image$ReadImageMetadataException: Flash      at coldfusion.image.Image.getExifMetadata(Image.java:2435)      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)      at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)      at cfresults2ecfm1819568044.runPage(D:\ftp\twojakes2\Htdocs\results.cfm:197)      at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)      at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)      at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)      at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)      at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)      at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)      at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)      at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)      at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)      at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)      at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)      at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)      at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)      at coldfusion.CfmServlet.service(CfmServlet.java:175)      at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)      at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)      at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)      at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)      at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)      at jrun.servlet.FilterChain.service(FilterChain.java:101)      at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)      at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)      at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)      at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)      at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)      at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)      at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)      at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)      at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    TagContext
    array
    1
    struct
    COLUMN0
    IDCFIMAGE
    LINE197
    RAW_TRACEat cfresults2ecfm1819568044.runPage(D:\ftp\twojakes2\Htdocs\results.cfm:197)
    TEMPLATED:\ftp\twojakes2\Htdocs\results.cfm
    TYPECFML
    TypeApplication

    update: similarly, if i run:

    ImageGetEXIFMetaData() on the image i get the same error.

    would it solve the problem to bypass metadata processing when writing the image?  is that even possible?