Dmitry Dorofeev wrote:
Hi all,
just writting WAImage component for Seaside. Now at stage where i need
to detect image type.
For jpeg i have the following:
WAImage >> detectImageType: image
(image beginsWith: (String with: 16rFF asCharacter), (String with: 16rD8
asCharacter)) ifTrue: [^ 'jpg'].
(image beginsWith: (String with: 16rFF asCharacter with: 16rD8
asCharacter)) ifTrue: [^ 'jpg'].
this should also work.
cheers
wolfgang
Looks quite long comparing to Perl, i know there should be a shorter
solution :-)
Please help a newbie.
Thanks,
-Dmitry.
_______________________________________________
Seaside mailing list
Seaside@xxxxxxxxxxxxxxxxxxxxxxxxxx
http://lists.squeakfoundation.org/listinfo/seaside
|