Blind resizing
[1/5] from: patrick:philipot:laposte at: 9-Oct-2003 19:20
Hi List
To create image thumbnails, I am using View and a box with the desired
size (for example the picture is 1024x780 and the box is 128x96).
mybox/image: load mypicture
The resizing is implicit. To actually create the thumbnail, I use
save/png %small-pic.png to-image mybox
This works but is it possible to do the same just in memory? Something
like
mypict: load-image mypicture
mypict/size: 128x96
save/png ...
Regards
Patrick
[2/5] from: patrick:philipot:laposte at: 9-Oct-2003 19:25
Hi List,
To create image thumbnails, I am using View and a box with the desired
size (for example the picture is 1024x780 and the box is 128x96).
mybox/image: load mypicture
The resizing is implicit. To actually create the thumbnail, I use
save/png %small-pic.png to-image mybox
This works but is it possible to do the same just in memory? Something
like
mypict: load-image mypicture
mypict/size: 128x96
save/png ...
Regards
Patrick
[3/5] from: atruter:labyrinth:au at: 10-Oct-2003 11:09
Hi Patrick,
From the rebol documentation
(http://www.rebol.com/docs/changes.html#section-5.7):
bin: make binary! 20000 ; (auto expands if necessary)
image: load %fred.gif
save/png bin image
Regards,
Ashley
[4/5] from: antonr::iinet::net::au at: 10-Oct-2003 14:27
img: load %my-image.png
img2: to-image layout [origin 0 image 50x50 img]
save/png %my-image2.png img2
Anton.
[5/5] from: patrick:philipot:laposte at: 10-Oct-2003 9:13
Hello Anton,
Friday, October 10, 2003, 6:27:47 AM, you wrote:
AR> img: load %my-image.png
AR> img2: to-image layout [origin 0 image 50x50 img]
AR> save/png %my-image2.png img2
AR> Anton.
Thank you Anton, exactly what I was looking for. The trick is to use
'layout to perform the resizing.
--
Best regards,
Patrick