[Q] converting pictures to different formats
John M McIntosh
johnmci at smalltalkconsulting.com
Thu Jan 23 18:43:05 UTC 2003
On Thursday, January 23, 2003, at 04:11 AM, Adrian Lienhard wrote:
> Hi all
> What possibilities do exist in squeak to transform a picture from one
> to another format?
> e.g. tif -> jpg.
For tif you need to visit
I've used that to convert from raw TIFF files that some electronic
to JPEG files using the plugin, gives one way more control that some of
consumer converters. I'll note it's done for the mac cross compiled
from the intel
unix platform. Someone might have done an intel back-port however I
don't believe I've
Also note this
From: Bob Hartwig <bob at bobjectsinc.com>
Juan Manuel Vuletich reminded me that WarpBlt does antialiasing! And it
looks pretty good, so that part is done for us. I did some
using this script:
| form |
form _ Form fromBMPFileNamed: 'foo.bmp'.
#( "('downsample-1.bmp' 0.2 1)
('downsample-2.bmp' 0.2 2)
('downsample-3.bmp' 0.2 3)"
('tinysample-1.bmp' 0.1 1)
('tinysample-2.bmp' 0.1 2)
('tinysample-3.bmp' 0.1 3)
('upsample-1.bmp' 5 1)
('upsample-2.bmp' 5 2)
('upsample-3.bmp' 5 3) ) do:
[:each| | filename scaling smoothing scaledForm |
filename _ each first.
scaling _ each at:2.
smoothing _ each last.
scaledForm _ (WarpBlt rotate: form degrees:0 center: 1 @ 1 scaleBy:
scaling @ scaling smoothing: smoothing) first.
scaledForm writeBMPfileNamed: filename.
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
More information about the Squeak-dev