[ANN] Smagick

Martial Boniou Martial.Boniou at ifrance.com
Mon Aug 6 12:21:59 UTC 2007


Excellent! I will try this as soon as possible. I was looking for such a
tool. As a Seaside user, I often need to add PHP in order to transform
text in images (with convenient fonts and the GD package); now I can do
everything in Squeak.

Cheers,

--
Martial

stefan_reichhart at students.unibe.ch a écrit :
| 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