• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 444
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

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