Reducing image file size

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
grovecat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 99
Joined: Thu Aug 04, 2011 10:32 am

Reducing image file size

Post by grovecat » Thu Dec 13, 2012 8:25 am

I need to save images selected by the photo picker, and they only have to be at screen resolution. Otherwise there is considerable processing time needed to restore a group of images when they could each be up to 12 MB.

Is there any way to reduce the resolution of an imported image? Or alternatively, is there a way to take a picture of a portion of the screen and save that as a jpg?

TIA
Don

grovecat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 99
Joined: Thu Aug 04, 2011 10:32 am

Re: Reducing image file size

Post by grovecat » Thu Dec 13, 2012 8:30 am

Sorry, I just found the export snapshot command so please ignore my question.

Cheers
Don

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Reducing image file size

Post by Mark » Thu Dec 13, 2012 1:09 pm

Hi Don,

It might be quicker to use the imageData property. First set the desired rect of the image object, then get the imageData of the image object, set the text and the filename of the image object to empty and finally set the imageData of the image object to the stored imageData.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply