Scaling an Image to a Rect

Richard Gaskin ambassador at fourthworld.com
Tue Oct 15 19:00:43 EDT 2013


Mark Wieder wrote:
> ...here's what I do to generate thumbnail images...

You probably already know this, but in order to make the new Project 
Browser the RunRev team added the ability to create thumbnails from the 
import and export commands with the addition of "at" args:

    import snapshot [from rect[angle] rectangle] [of object]
      [(with | without) effects] [at size width, height]

You still need to calculate the desired width and height, but the time 
saved by letting the engine do this on the image buffer internally 
rather than resizing an image and re-setting its contents is pretty amazing.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the Use-livecode mailing list