• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 428
  • Last Modified:

copyPixels of large bitmap image into cast member containing smaller bitmap image

How do I do a copyPixels so that the resulting image is the SAME size (trimmed etc) as the original rect

  sr = sprite(1).rect
  mi = (the stage).image
  mt = member("picTemp")
  mt.image.copyPixels(mi, sr, sr)

If the original picTemp image is smaller than the sprite(1).rect, I don't get the whole image from sprite(1)

I want to have sprite(1) contain a bunch of different sized images, and to copy them EXACTLY into cast members At the Same Size, with no extra whitespace, or smaller, or cropped etc etc

0
Donelson
Asked:
Donelson
1 Solution
 
MediaMacrosCommented:
add a step

mt = image(sr.width, sr.height, 24)
mt.image.copyPixels(mi, sr, sr)
0
 
DonelsonAuthor Commented:
Thanks
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now