Generated images always converted to gif

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Generated images always converted to gif

Stuart Herring-2
Hi All,

I found a problem in Seaside3.0 when trying to render a generated
image as a jpeg via WAImageTag>>document:mimeType:
Because of the way WADocumentHandler>>document:mimeType:fileName and
Form>>seasideMimeDocument  are implemented, it results in the image
always being converted to a gif.

See: http://code.google.com/p/seaside/issues/detail?id=577 for more
details and proposed fix.

Regards,
Stuart
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Generated images always converted to gif

Lukas Renggli
Excellent, thank you for reporting!

Lukas

On 17 June 2010 11:51, Stuart Herring <[hidden email]> wrote:

> Hi All,
>
> I found a problem in Seaside3.0 when trying to render a generated
> image as a jpeg via WAImageTag>>document:mimeType:
> Because of the way WADocumentHandler>>document:mimeType:fileName and
> Form>>seasideMimeDocument  are implemented, it results in the image
> always being converted to a gif.
>
> See: http://code.google.com/p/seaside/issues/detail?id=577 for more
> details and proposed fix.
>
> Regards,
> Stuart
> _______________________________________________
> seaside-dev mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Generated images always converted to gif

Stuart Herring-2
Unfortunately it turns out my fix is a little too naive, it breaks a
whole bunch of tests, due to the fact that #seasideMimeDocumentType:
isn't implemented on everything that might be called by
WADocumentHandler.

I'm not entirely sure how to fix it properly now, but here's a test
case for the issue:

WASqueakDocumentHandlerTest>>testFormWithMimeType
        | handler |
        "Test that requesting a form as JPEG actually results in a JPEG"
        self formClassExists ifFalse: [ ^ self ].
       
        handler := WADocumentHandler
                document: self sampleForm
                mimeType: WAMimeType imageJpeg
                fileName: nil.
       
        self assert: (handler document contents beginsWith: #( 255 216 ))
"JPEG Magic number"


I tried to comment on the issue, but Google Code keeps throwing a 500 at me...

Regards,
Stuart

On Thu, Jun 17, 2010 at 8:21 PM, Lukas Renggli <[hidden email]> wrote:
> Excellent, thank you for reporting!
>
> Lukas
>
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: Generated images always converted to gif

Lukas Renggli
> I tried to comment on the issue, but Google Code keeps throwing a 500 at me...

Yeah, their service is broken. I just noticed on the Pharo bug tracker.
Lukas

--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev