Can't read a .tif image

Since Version “Lucee 5.3.2.77” I have the problem that I can’t read out .tif files. PNG files work perfectly fine with the same code as the .tif image (and same path). Can somebody help?

<cfimage action="info" source="/web-data/sven.bwise.ch/http/bilder/15_1800_01.tif" structname="t_bild">
<!---<cfimage action="info" source="/web-data/sven.bwise.ch/http/bilder/test.png" structname="t_bild">--->
<cfdump var="#t_bild#">```



>**Stacktrace:**
>Lucee 5.3.2.77 Error (java.io.IOException)
>Message can not read in image
>Stacktrace The Error Occurred in
>**/web-data/sven.bwise.ch/http/bilder/test2.cfm: line 5**  
>
> 1: 
> 2: <cfscript>
> **3: img = ImageRead("/web-data/sven.bwise.ch/http/bilder/15_1800_01.tif");**
> 4: //img = ImageRead("/web-data/sven.bwise.ch/http/bilder/test.png");
> 5:
Java Stacktrace lucee.runtime.exp.NativeException: can not read in image
 at org.lucee.extension.image.Image.(Image.java:239)
 at org.lucee.extension.image.Image.createImage(Image.java:1553)
 at org.lucee.extension.image.functions.ImageRead.call(ImageRead.java:31)
 at org.lucee.extension.image.functions.ImageRead.invoke(ImageRead.java:36)
 at lucee.runtime.functions.FunctionHandlerPool.invoke(FunctionHandlerPool.java:39)
 at bilder.test2_cfm$cf.call(/bilder/test2.cfm:5)
 at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:942)
 at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:834)
 at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:64)
 at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
 at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2409)
 at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2399)
 at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2374)
 at lucee.runtime.engine.Request.exe(Request.java:43)
 at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1037)
 at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:983)
 at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102)
 at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
 at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:685)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
 at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
 at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
 at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
 at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: can not read in image
 ... 41 more

That error is from Lucee trying to read that as a base64 image?

I even have an open PR to improve that error message to say just that!

I don’t quite understand how that helps me in any way, could you explain pls?

I’ve checked this with .tif file as per you said. But, I can’t able to reproduce the issue. In my test, it is working fine. so, could you please share a .tif file you used?

Ofc, but since I’m not allowed to upload attachments you’ll have to download it here: https://drive.google.com/open?id=1qSpH6zCEVCbGqeOJnryqtshvPoYvAtaw

If this is a linux box my suggestion is making sure Imagemagik is installed.

At the command line run
convert --version

You should get back something like.
Version: ImageMagick 6.9.X

It’s already installed

disable selinux temporarily and rerun the script
if you made any system updates lately you may need to restart Lucee / Apache as that has been known to cause issues in some environments as well.

Can you do a file read and dump the tiff contents, i think it might be a permissions problem

Lucee handles a range of input types for source, a url, a path, an image, a base64 string…

I think it’s failing to access the file via a path and is falling back on trying base64