[Seaside] Image manipulation package?

Ramon Leon ramon.leon at allresnet.com
Tue Nov 13 15:18:13 UTC 2007

> 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 
	^ (MAMemoryFileModel new)
		contents: ((form scaledToSize: aWidth @ aHeight) 
					asMIMEDocumentType: 'image/jpeg')
		mimetype: 'image/jpeg';

Ramon Leon

More information about the seaside mailing list