Importing 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
dsquance
Posts: 40
Joined: Mon Jan 18, 2010 2:47 am

Importing images

Post by dsquance » Thu Nov 28, 2013 6:52 am

I want to import an image and base the action taken with the image on its dimensions. I've been using the answer file command, but don't see how to test the dimensions, because it appears it just fills whatever blank image is waiting for it. Is there a better way than answer file, or have I missed something that should be obvious.

Dave

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

Re: Importing images

Post by Simon » Thu Nov 28, 2013 8:02 am

Hi Dave,
I think you can keep using answer file, just put "it" into an invisible image then;
put the formattedHeight of image "hiddenImage" into tHeight
put formattedWidth of image "hiddenImage" into tWidth
Then you can do what you like with the info before showing the image.

Important, put "it" into another variable.

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

dsquance
Posts: 40
Joined: Mon Jan 18, 2010 2:47 am

Re: Importing images

Post by dsquance » Thu Nov 28, 2013 10:51 pm

Thanks, Simon. Formattedheight and formattedwidth was what I needed. The rest was already in place.

Dave

Post Reply