All factories fail for the operation "filestore" writing ARGB images out as JPEGs

Description

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)

Environment

None

Activity

Show:

Pothys - MitrahSoft 15 February 2021 at 10:37

Ok, I close this ticket.

Zac Spitzer 13 February 2021 at 13:56

as https://luceeserver.atlassian.net/browse/LDEV-3082

has a patch https://github.com/lucee/extension-image/pull/11 and we have filed separate issues for all the other bugs, yeah we can probably closed this one

Pothys - MitrahSoft 5 January 2021 at 13:35

as per the above comments the first issue was solved by the fixed version and second issue we have a separate issue. So shall I close this ticket?

Pothys - MitrahSoft 29 December 2020 at 15:20

I reproduced the first problem and that issue was solved in lucee version 5.3.8.21-SNAPSHOT with image extension 1.0.0.37-SNAPSHOT. And I added a fixed version

Zac Spitzer 24 September 2020 at 08:21

Seems that the new Image 1.0.0.37 snapshot fixes the first problem with 5.3.8.21 (can someone add that fix version?)

https://github.com/lucee/extension-image/commit/ed202bfe0d5042726450d6f9e211ee78c467bc86

I have logged a separate bug for the second problem

https://luceeserver.atlassian.net/browse/LDEV-3082

Fixed

Details

Assignee

Reporter

Priority

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

Flag notifications