How do I fit an image in a sprite without squishing it

Get help using Construct 2

Post » Tue Oct 20, 2015 12:03 am

Hi everyone, I'm having a heck of a time finding a solution to this one. If I have a sprite that needs to always stay the same but I have images that might be different sizes than the sprite. How do I resize the image so that it decreases in size until it fits into the sprite?
www.h1k3.tech

We are here for you!
B
87
S
23
G
16
Posts: 715
Reputation: 16,835

Post » Tue Oct 20, 2015 12:21 am

How do I User Upload Image

maybe this will help you
.............................................check example2.capx...
... maybe not
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Fri Oct 23, 2015 2:03 am

Thanks but I found a different solution. The canvas plugin allows you to snapshot just a part of th construct 2 canvas. So I loaded my images into a "holder" Sprite off th visible screen while keeping the original size of the image. I then center my canvas plugin object over the holder Sprite and take a snapshot of just the center portion. Finally I load the base64 string from the canvas into the "thumbnail" Sprite already perfectly centered and clipped. I lose some in this process but it avoids having empty space and squishing.
www.h1k3.tech

We are here for you!
B
87
S
23
G
16
Posts: 715
Reputation: 16,835


Return to How do I....?

Who is online

Users browsing this forum: AnD4D, Google [Bot] and 21 guests