How to resize an image?

Klaus Major klaus at major-k.de
Sun Jun 27 08:52:52 EDT 2004


Hallo Claus,

> Hi,
>
> I'm looking for an elegant way to resize (shrink) an image.
>
> Changing the width and the height only affects the display.
> Saving this image to file results in the original image with the 
> original size.
> So this won't do.
>
> Has anyone an elegant way to save a thumnail of an image?

There are probably 2 (or more ;-) ways to do this...

1. Use Trevors excellent QT External to create a preview image of ANY 
size...


2. Built-in solution: no external required :-)

Size your original image as you like (lock loc!)
Create a new image and script:

...
set the width of img "the new one" to the widht of img "the original 
one"
set the height of img "the new one" to the heigth of img "the original 
one"

set the imagedata of img "the new one" to the imagedata of img "the 
original one"
...

Now you have a new image that you can export as jpg or do whatever you 
want with :-)

Hope that helps...

> Regards,
> 	Claus.
>
> PS: Let's see who as nothing better to do on a sunday than reading 
> this list ;-)

ME! :-)
(But the Revolution knows NO weekend!)


Regards (und liebe Grüße :-)

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list