[Seaside] Smalltalk String and Character question
bert at impara.de
Sun Mar 20 13:42:25 CET 2005
Am 20.03.2005 um 13:38 schrieb Avi Bryant:
> On Sun, 20 Mar 2005 00:18:50 +0300, Dmitry Dorofeev
> <dima-sender-3c337a at yasp.com> 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'].
>> Looks quite long comparing to Perl, i know there should be a shorter
>> solution :-)
> JPEGReadWriter understandsImageFormat: image readStream
That was my first reaction, too. But unfortunately this will not work
because some moro^h^h^h^h person decided to answer false to this *if*
the newer JPEGReadWriter2 can handle it. Sigh.
- Bert -
More information about the Seaside