making a thumbnail from a snapshot

Ken Ray kray at sonsothunder.com
Sun Feb 14 13:18:59 EST 2010



> What I get is not a properly sized thumbnail -- I get an image that
> looks the size of the whole new (cloned) group, and it's not a
> miniature of the big image, it's a crop of the big image. I can't
> remember how to miniaturize an imported snapshot down to thumbnail
> size. I know this has been discussed before but can't find it in the
> gmane archives. Any help appreciated.

Here's a simple example of taking an existing image and making a 1/4 sized
thumbnail:

  export snapshot from img 1 to tPictData as PNG
  create image
  put it into tImg
  set the text of tImg to tPictData
  set the width of tImg to (the width of tImg/4)
  set the height of tImg to (the height of tImg/4)
  set the lockLoc of tImg to true
  set the imageData of tImg to the imageData of tImg

Hope this puts you on the right track...

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list