Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

IMAGE-LAB Function

 [1/3] from: robbo1mark::aol::com at: 2-Mar-2001 13:45


JEFF / EVERYBODY I've slightly amended Jeff's excellent implementation of my Image-Lab function! to include a RESIZE refinement which suprise suprise enables image resizing. This takes a pair! pixel size as it's additional parameter. Here's the func, enjoy, Mark image-lab: func [ in [file!] out [file!] effects [block!] /bmp /png /preview /resize new-size [pair!] /local f ][ in: to-image f: make face [ image: load-image in size: image/size effect: effects ] if resize [f/size: new-size insert effects [aspect fit] in: to-image f] if preview [view f] any [all [bmp save/bmp out in] all [png save/png out in]] ]

 [2/3] from: jeff:rebol at: 2-Mar-2001 12:02


image-lab: func [ in [file!] out [file!] effects [block!] /bmp /png /preview /resize new-size [pair!] /local f ][ in: to-image f: make face [ image: load-image in size: any [new-size image/size] effect: head insert effects pick [[aspect fit]] []] found? resize ] if preview [view f] any [all [bmp save/bmp out in] all [png save/png out in]] ]

 [3/3] from: robbo1mark:aol at: 2-Mar-2001 22:10


Jeff I don't understand - your functions are better than mine - well at least in a REBOLlish / Forth hybrid way. You only seem to post code with minimal / non-existant commentary, Any particular reason? I do like your style of REBOL though, very 1x programming, no cruft, no extraneous detail, minimalism is cool! Mark Dickson