Fixed
Details
Assignee
Pothys - MitrahSoftPothys - MitrahSoftReporter
Zac SpitzerZac SpitzerPriority
NewLabels
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
Affects versions
Details
Details
Assignee
Pothys - MitrahSoft
Pothys - MitrahSoftReporter
Zac Spitzer
Zac SpitzerPriority
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
Affects versions
Created 1 September 2020 at 11:56
Updated 15 March 2021 at 07:08
Resolved 15 February 2021 at 10:37
WriteToBrowser jpeg with an ARGB image throws
All factories fail for the operation "filestore"
because jpeg doesn't support ARGB images
<cfscript> dump(server.lucee.version); w = 250; h = 250; image= ImageNew(source="", width=w, height=h, imageType="rgb", canvascolor='red'); transparentBorder = ImageNew(source="", width=w, height=h, imageType="argb"); ImagePaste(image1=transparentBorder, image2=image, x=5, y=5);dump(transparentBorder); image action="writetobrowser" source="#transparentBorder#" format="png"; try { // throws All factories fail for the operation "filestore" image action="writetobrowser" source="#transparentBorder#" format="jpeg"; } catch (e){ dump(cfcatch); } </cfscript>
https://trycf.com/gist/af55c50bcb9d4cdf7ea1afb2c87aaeaa/lucee5?theme=monokai
(crashes with 5.3.8.49-SNAPSHOT, but not 5.3.6.61 aka trycf:latest)
rather than this cryptic error, it should throw "Cannot convert image to jpeg, jpeg doesn't support ARGB images"
another problem is
<cfscript> image=ImageNew("", 50,50); addBorder=5; w = 250 + (addBorder *2); h = 250 + (addBorder *2);; transparentBorder = ImageNew(source="", width=w, height=h, imageType="argb"); transparentBorder.paste(image2=image, x=addBorder, y=addBorder); </cfscript>
https://trycf.com/gist/cdc9ed3f9dbb3114cee42012d17da4b1/lucee5?theme=monokai
throws the extremely cryptic error message
lucee.runtime.exp.NativeException: lucee.runtime.type.util.MemberUtil.call(lucee.runtime.PageContext, java.lang.Object, lucee.runtime.type.Collection$Key, lucee.runtime.type.Struct, short, java.lang.String) at java.base/java.lang.Class.getMethod(Class.java:2108) at org.lucee.extension.image.util.CommonUtil.callWithNamedValues(CommonUtil.java:99) at org.lucee.extension.image.Image.callWithNamedValues(Image.java:1591) at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:864)