Re-sizing imported images

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
chaucer345
Posts: 23
Joined: Thu Jul 24, 2014 8:08 pm

Re-sizing imported images

Post by chaucer345 » Sun Aug 03, 2014 7:42 pm

Hey everyone,

So, I'm working on a top-down 2d game in livecode and I'm trying to use image collision detection to tell when the player has bumped into something. I have a variety of images from our team artist which are great, but aren't scaled to fit in the level the way I want. I've tried re-sizing them with my cursor, but that causes them to pop right back to normal once I leave the card. I know there's probably something I can do with the geometry manager, but at the moment I'm very confused. I should also probably note that I've been importing the images as controls, but I'm not sure what to make of that or if there's another way I should be importing things to make this work.

I'm really lost and would be grateful for any advice that could be provided.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: Re-sizing imported images

Post by dunbarx » Sun Aug 03, 2014 9:47 pm

You need to lock the size, and perhaps the position as well?

Check out these properties (the LockLoc) in the dictionary, though they are also available in the inspector.

Craig Newman.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Re-sizing imported images

Post by Simon » Mon Aug 04, 2014 6:41 am

Actually for a game, I'd say get GIMP or some other image tool and re-size them permanently.
Craig's solution will work for you though.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Re-sizing imported images

Post by Klaus » Mon Aug 04, 2014 12:34 pm

Hi chaucer345,

1. welcome to the forum! :D

2. What Craig said!
Resize your image in Livecode and then select "Size and position" in the inspector palette for that image
and check "Lock location" (checkbox on top), that will prevent further unwanted resizing!

3. What Simon said! :D
It is alway to prefer to use images in 1:1 size, so no resizing is neccessary!
Will save memory and CPU time!


Best

Klaus

chaucer345
Posts: 23
Joined: Thu Jul 24, 2014 8:08 pm

Re: Re-sizing imported images

Post by chaucer345 » Tue Aug 05, 2014 10:14 pm

Thank you all for your help, locking size and position aided me a great deal!

Post Reply