WAImage class>>fromByteArray: fix

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

WAImage class>>fromByteArray: fix

Boris Popov, DeepCove Labs (SNN)
Just came across this when trying to load files less than 6 bytes in
size where outer handler tests the file for being a picture by catching
NotAnImage exception; fix just adds the size check on the first line,

WAImage class>>fromByteArray: aByteArray
 | dim gifHeaders header |
 aByteArray size < 6 ifTrue: [NotAnImage raise].
 ...

Thanks!

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WAImage class>>fromByteArray: fix

Philippe Marschall
Is this a VW specific class?

Philippe

2007/3/8, Boris Popov <[hidden email]>:

> Just came across this when trying to load files less than 6 bytes in
> size where outer handler tests the file for being a picture by catching
> NotAnImage exception; fix just adds the size check on the first line,
>
> WAImage class>>fromByteArray: aByteArray
>  | dim gifHeaders header |
>  aByteArray size < 6 ifTrue: [NotAnImage raise].
>  ...
>
> Thanks!
>
> -Boris
>
> --
> +1.604.689.0322
> DeepCove Labs Ltd.
> 4th floor 595 Howe Street
> Vancouver, Canada V6C 2T5
> http://tinyurl.com/r7uw4
>
> [hidden email]
>
> CONFIDENTIALITY NOTICE
>
> This email is intended only for the persons named in the message
> header. Unless otherwise indicated, it contains information that is
> private and confidential. If you have received it in error, please
> notify the sender and delete the entire message including any
> attachments.
>
> Thank you.
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WAImage class>>fromByteArray: fix

Michel Bany
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Hi Boris,
Thanks for this bugfix. I will update the public store asap.
It may take some time because I will try to publish something that  
works with both Seaside 2.6 and 2.7.
Cheers,
Michel.


On 08 Mar 2007, at 20:05 , Boris Popov wrote:

> Just came across this when trying to load files less than 6 bytes in
> size where outer handler tests the file for being a picture by  
> catching
> NotAnImage exception; fix just adds the size check on the first line,
>
> WAImage class>>fromByteArray: aByteArray
>  | dim gifHeaders header |
>  aByteArray size < 6 ifTrue: [NotAnImage raise].
>  ...

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WAImage class>>fromByteArray: fix

Michel Bany
In reply to this post by Philippe Marschall

On 08 Mar 2007, at 21:35 , Philippe Marschall wrote:

> Is this a VW specific class?
>
> Philippe

Yes, this is a subclass of WAFile with some additional behavior that  
is specific to images.
It parses the image byte array to extract dimension information.
This is based on a contribution from Dmitry Dorofeev (that did not  
get lost).

Any interest of seing this backported to Squeak ?

Michel.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside