digideskio / zotonic

Automatically exported from code.google.com/p/zotonic
0 stars 0 forks source link

Error 500 when specifying quality in image tag #191

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Exact line I use in template
   {% image pid.media[1] quality=90 %}

In firebug I see the server gives 500 Internal server error

trace from zotonic shell - 

=ERROR REPORT==== 3-Aug-2011::04:32:50 ===
webmachine error: 
path="/image/2011/8/2/skanu_darzs.png%28%29%28quality-90%29%28804155D56745202155
E5777E5D55060C%29.jpg"
{error,function_clause,
       [{z_media_preview,filter2arg,[{quality,90},130,130]},
        {z_media_preview,'-cmd_args/3-fun-0-',2},
        {lists,foldl,3},
        {z_media_preview,cmd_args,3},
        {z_media_preview,convert,4},
        {resource_file_readonly,ensure_preview,2},
        {resource_file_readonly,service_available,2},
        {webmachine_resource,resource_call,3}]}

I am using the latest dev release - v0.8 r2246.
OS - OSX 10.6.8

Other parameters for image tag like "grey" and "mono" seem to work fine

Original issue reported on code.google.com by janis.pa...@gmail.com on 3 Aug 2011 at 1:44

GoogleCodeExporter commented 8 years ago
I just found out the "loseless" parameter doesn't work either.

In template:
{% image pid.media[1] loseless %}

Zotonic trace:

=ERROR REPORT==== 3-Aug-2011::04:49:47 ===
webmachine error: 
path="/image/2011/8/2/skanu_darzs.png%28%29%28loseless%29%28E2F4A9B261662C9B3070
03A26AA605C0%29.jpg"
{error,function_clause,
       [{z_media_preview,string2filter,["loseless",[]]},
        {z_media_tag,url2props1,2},
        {z_media_tag,url2props,2},
        {resource_file_readonly,rsc_media_check,2},
        {resource_file_readonly,ensure_file_info,2},
        {resource_file_readonly,service_available,2},
        {webmachine_resource,resource_call,3},
        {webmachine_resource,do,3}]}

Original comment by janis.pa...@gmail.com on 3 Aug 2011 at 1:51

GoogleCodeExporter commented 8 years ago
typo: "loseless" is "lossless".
but the quality parameter should indeed work.

Original comment by scherpenisse on 3 Aug 2011 at 6:06

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 3c0b03006157.

Original comment by scherpenisse on 3 Aug 2011 at 6:27