Fixed
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Andrew Dixon
Andrew DixonPriority
Labels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Created 3 November 2015 at 18:47
Updated 20 February 2022 at 15:23
Resolved 27 April 2020 at 09:16
*strong text*Using the example code + image found here: www.railodeveloper.com/jira/railo-imagegrayscale-bug.zip
I get an error "Metadata components != number of destination bands".
When line 3 is removed (the imageGrayScale function), the error does not occur. When the file is not written to disk on line 4, the error does not occur as well.
The example code is:
<cfset imgfile = "testimagebug.jpg" /> <cfimage source="#imgfile#" name="myImage" /> <cfset imageGrayscale(myImage) /> <cfimage action="WRITE" source="#myImage#" destination="#imgfile#_grayscale.jpg" overwrite="yes" /> done
I have checked this with multiple images, on both windows and mac.
Stack trace: Metadata components != number of destination bands at com.sun.imageio.plugins.jpeg.JPEGImageWriter.checkSOFBands(JPEGImageWriter.java:1279):1279 at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeOnThread(JPEGImageWriter.java:694):694 at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:339):339 at railo.runtime.img.Image._writeOut(Image.java:937):937 at railo.runtime.img.Image._writeOut(Image.java:896):896 at railo.runtime.img.Image.writeOut(Image.java:857):857 at railo.runtime.img.Image.writeOut(Image.java:835):835 at railo.runtime.tag.Image.doActionWrite(Image.java:484):484 at railo.runtime.tag.Image.doStartTag(Image.java:332):332 at railo_imagegrayscale_bug864.testimagebug_cfm$cf.call(/developing/meuk/railo-imagegrayscale-bug/testimagebug.cfm:4):4 at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:788):788 at railo.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:36):36 at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:24):24 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2143):2143 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2110):2110 at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:313):313 at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717):717 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290):290 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233):233 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191):191 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127):127 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102):102 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109):109 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298):298 at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190):190 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291):291 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769):769 at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698):698 at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891):891 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690):690 at java.lang.Thread.run(Thread.java:680):680