[Seaside] image handling (thumbnails)

Robert Sirois watchlala at hotmail.com
Wed Sep 26 00:58:36 UTC 2012


Here's some random code I have from an unfinished project a couple years ago. Not sure how useful it is.
	" accepts PNGs only "	(picture isNil not) ifTrue: [
	aForm := (PNGReadWriter createAFormFrom: picture contents) first.		" create avatar and save under name avatarBlahblahPng "	thumbnail := PNGReadWriter on: (RWBinaryOrTextStream on: '').	thumbnail nextPutImage: (aForm scaledToSize: (Point x: 75 y: 75)).	UGFileLibrary addFileNamed: 'avatar', user username, 'Png' contents: thumbnail contents.
RS
Date: Tue, 25 Sep 2012 19:39:27 +0100
Subject: Re: [Seaside] image handling (thumbnails)
From: ocorrain at gmail.com
To: seaside at lists.squeakfoundation.org

Hi--
that sounds very interesting.  Could you post some example code, or even a skeleton?
thanks
Tiarnán

On Tue, Sep 25, 2012 at 6:20 PM, Francois Stephany <tulipe.moutarde at gmail.com> wrote:

Smagick works well but beware that it blocks the VM when processing an image.



For Wapict (images are sometimes ~50mb), I simply have an external queue with workers using OSProcess to convert images. Not terribly efficient but works well enough.



To generate thumbnails of, say, profile pictures on a website, I don't really know what I would use. Have you found any pure-smalltalk image manipulation library?







On 25/09/12 08:42, Tiarnán Ó Corráin wrote:


Hi--



what's the recommended / popular way of doing basic image handling in

Seaside?  My requirements are to take uploaded images and make

thumbnails in a few different sizes.  I see some references so SMagick

and to Smalltalk-local image handling around, but I'm wondering what

general practice is among posters on this list.



thanks



Tiarnán



--

The law, in its majestic equality, forbids the rich as well as the poor

to sleep under bridges, to beg in the streets, and to steal bread --

Anatole France





_______________________________________________

seaside mailing list

seaside at lists.squeakfoundation.org

http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside






-- 

http://tulipemoutarde.be

CA: +1 778 558 3225

BE: +32 65 709 131

_______________________________________________

seaside mailing list

seaside at lists.squeakfoundation.org

http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



-- 
The law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and to steal bread -- Anatole France




_______________________________________________
seaside mailing list
seaside at lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120925/ef89a504/attachment.htm


More information about the seaside mailing list