Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Scaling images in a FileDirectory (keysDo:)
Last updated at 7:53 pm UTC on 10 December 2021
Example

 dir := FileDirectory on: 'd:\\images'. "add some image files to this directory first"
 dir keysDo: [:name |
	form = Form fromBinaryStream: (dir fileNamed: name).
	ImageReadWriter
		putForm: (form scaledToSize: 512@512) onFileNamed: 'scaled_',name;
		putForm: (form scaledToSize: 80@80) onFileNamed: 'thumb_',name] 

Source:
From: goran.hultgren@bluefish.se
Date: Wed, 7 Nov 2001 12:23:50 +0100