CFIMAGE results in out of bands with PNG files

Description

As in Railo 4.2.1 already as bug called, CFIMAGE Fails with PNG files to convert.
The PNG file was created with Windows Snipping Tool.
This was a blocking Point because our CMS is no longer able to save Images from PNG source and customers use it.

Metadata components != number of destination bands

Lucee 4.5.1.000 Error (javax.imageio.IIOException)
Message Metadata components != number of destination bands
Cause javax.imageio.IIOException
Stacktrace The Error Occurred in
C:\programme_custom\lucee-4.5.1.000-express\webapps\testalex\index.cfm: line 1
1: <cfimage action="convert" destination="test123.jpg" source="test.PNG" overwrite="yes">

Java Stacktrace Metadata components != number of destination bands
at com.sun.imageio.plugins.jpeg.JPEGImageWriter.checkSOFBands(JPEGImageWriter.java:1352):1352
at com.sun.imageio.plugins.jpeg.JPEGImageWriter.writeOnThread(JPEGImageWriter.java:720):720
at com.sun.imageio.plugins.jpeg.JPEGImageWriter.write(JPEGImageWriter.java:365):365
at lucee.runtime.img.Image._writeOut(Unknown Source):-1
at lucee.runtime.img.Image._writeOut(Unknown Source):-1
at lucee.runtime.img.Image.writeOut(Unknown Source):-1
at lucee.runtime.img.Image.writeOut(Unknown Source):-1
at lucee.runtime.tag.Image.doActionWrite(Unknown Source):-1
at lucee.runtime.tag.Image.write(Unknown Source):-1
at lucee.runtime.tag.Image.doActionConvert(Unknown Source):-1
at lucee.runtime.tag.Image.doStartTag(Unknown Source):-1
at index_cfm$cf.call(C:\programme_custom\lucee-4.5.1.000-express\webapps\testalex\index.cfm:1):1
at lucee.runtime.PageContextImpl.doInclude(Unknown Source):-1
at lucee.runtime.listener.ClassicAppListener._onRequest(Unknown Source):-1
at lucee.runtime.listener.MixedAppListener.onRequest(Unknown Source):-1
at lucee.runtime.PageContextImpl.execute(Unknown Source):-1
at lucee.runtime.PageContextImpl.execute(Unknown Source):-1
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(Unknown Source):-1
at lucee.loader.servlet.CFMLServlet.service(Unknown Source):-1
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725):725
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291):291
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52):52
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239):239
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219):219
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106):106
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501):501
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142):142
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79):79
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610):610
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88):88
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537):537
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085):1085
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658):658
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222):222
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1556):1556
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1513):1513
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142):1142
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617):617
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61):61
at java.lang.Thread.run(Thread.java:745):745

Timestamp 6/12/15 5:58:03 PM CEST

Environment

Windows 8 x64, Lucee 4.5.1.000 express called with Port 8888

Attachments

2
  • 23 Oct 2015, 08:21 am
  • 12 Jun 2015, 04:03 pm

Activity

Pothys - MitrahSoft 14 December 2016 at 15:38

I've added test case for this ticket, When we try to convert PNG image to JPG by using cfimage action='convert'. It results 'Metadata components != number of destination bands' error.

Pull request: https://github.com/lucee/Lucee/pull/137

Alexander Diedler 23 October 2015 at 08:20

Also same problem in latest BETA 5.0.0.98

Alexander Diedler 27 August 2015 at 14:07

Not touched yet?

Fixed

Details

Assignee

Reporter

Priority

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

Sprint

Affects versions

Created 12 June 2015 at 16:04
Updated 24 September 2020 at 08:26
Resolved 17 May 2017 at 10:47