> Hello all,
>
> I'd like to make a gallery, which auto-creates thumbnails for
> the pictures upon upload.
>
> Having used PHP's GD library extensively in the past, I was
> curious to know which (if any) library is available for
> squeak, and which is recommended by other Seasider's. :)
>
> Many thanks,
> John
I just use Squeak for this and keep the thumb in a Magritte
MAMemoryFileModel so it's easy to render, something like...
scaleImage: aFile width: aWidth height: aHeight
| form |
form := Form fromBinaryStream: (aFile contents
asMIMEDocumentType: aFile
mimetype) contentStream
binary.
^ (MAMemoryFileModel new)
contents: ((form scaledToSize: aWidth @ aHeight)
asMIMEDocumentType: 'image/jpeg')
contents
asString;
mimetype: 'image/jpeg';
yourself
Ramon Leon
http://onsmalltalk.com
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside