[ANN] Smagick

Norbert Hartl norbert at hartl.name
Mon Aug 6 17:25:02 UTC 2007


Wow, it is exact the tool I was looking for. I'm struggling
a bit with the supported formats in squeak. I did a lot of
imagemagick in the past mostly via shell scripts or perl. 
I'll test this very soon. The only caveat is that imagemagick
needs a lot memory to operate.

thanks for this,

Norbert

On Sun, 2007-08-05 at 13:42 +0200, stefan_reichhart at students.unibe.ch
wrote:
> Hi all,
> 
> 
> "Smagick" is a small high level interface to control "Image Magick"  
> from within a Smalltalk environment, eg. Squeak. The purpose of this  
> package is to provide high performance image manipulations without  
> the need to know all the low level details of image processing.
> 
> A possible use case could be a web application providing image up/ 
> download or even manipulation (for example thumbnailing, resizing,  
> recompression) to multiple users ...
> 
> 
> What can "Smagick" do right now:
>   - it can read all internal image properties  (examples: width,  
> height, colorspace, encoder, quality, bounding-box, ......)
>   - it can read most exif information  (examples: camera software,  
> date, orientation, shutter-speed, .....)
>   - it can convert any image format* to any other format*
>   - it can apply various image transformations concerning quality,  
> colors, effects, orientation, size, metas (examples: resize,  
> charcoal, emboss, colorspace, exif-auto-orientation, .....)
>   - it can compose [work in progress] multiple images (examples:  
> multiply, difference, add, ......)
> 
> * depends on your "Image Magick" installation
> 
> 
> I attached some more information about getting, installing and using  
> "Smagick" at the bottom of this mail ...
> 
> 
> I will add more features and try to make the interface more simple  
> and robust ... in the meantime I'm looking forward to some feedback
> 
> 
> Cheers,
> Stef
> 
> 
> --------------------------------------------
> 
> 
> GETTING "Smagick"
> 
> "Smagick" depends on
>   - OSProcess (+ UnixVM)
> 
> You can get "Smagick" from
>   - "http://www.squeaksource.com/SqueakAddOns"
> It will load all dependencies (except OSProcess)
> 
> 
> --------------------------------------------
> 
> INSTALLING "Smagick"
> 
> If you have "OmniBrowser" installed, execute the following after  
> loading "Smagick"
>     SmagickEnvironment setup
> This will ask you for the installation path of "Image Magick",  
> providing an example of how this could look like ;). Furthermore it  
> will check whether "Image Magick" really exists in the given location.
> 
> If you don't have Omnibrowser installed, use
>     SmagickEnvironment setupSilent: 'your installation path'
> This will set the path but not perform a check.
> 
> 
> --------------------------------------------
> 
> SOME SIMPLE EXAMPLES OF USING "Smagick"
> 
> " this will apply some transformations on aFile.JPG and then save it  
> to anotherFile.PNG "
> " NOTICE: the order of transformations is relevant !!! "
> (SmagickImage on: 'aFile.jpg')
>    convertTo: 'anotherFile.png'
>    with: [ :image | image
>      sharpen: 20;
>      negate;
>      autoOriented;
>      polaroid;
>      colors: 256;
>      quality: 20 ]
> 
> 
> " this will negate the cyan color channel only and then save  
> aFile.JPG to anotherFile.PNG "
> (SmagickImage on: 'aFile.jpg')
>    convertTo: 'anotherFile.png'
>    with: [ :image | image
>      image
>        with: SmagickConstants cyan
>        do: [ :channel |
>          channel negate ] ]
> 
> " get the compression ratio of aFile.JPG "
> (SmagickImage on: 'aFile.jpg')
>    compressionQuality inspect
> 




More information about the Squeak-dev mailing list