Possible to list storage size of images stored within a stack?

Mark Schonewille m.schonewille at economy-x-talk.com
Sun Dec 11 09:56:53 EST 2011


Hi Andy,

You can set conditional proprties in a savingStandalone handler or the revSaveAsStandalone command, although this would be a little complicated (using the cRevStandaloneSettings property). 

You can export images to JPEG after setting the paintCompression to JPEG,the JPEGQuality to 50 (anything lower is probably unacceptable) and the resizeQuality to "best". The steps are:

set the filename of an image
resize the image
store the imageData, maskData en alphaData of the image in variables
set the filename of the image to empty
set the imageData, maskData en alphaData to the variables
export the image as JPEG to a file

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Become our partner in sales http://qery.us/1bq Start selling Color Converter today. 20% commission!

On 11 dec 2011, at 15:43, Andrew Henshaw wrote:

> Thanks Mark,
> 
> I ran into problems with an app submitted to the Apple store which had images in a folder containing references in their name to android as I was planning on porting it over,  so ive tended to put the images in the stacks as they are then hidden and never really given the memory issue a thought!
> 
> It would be nice if livecode could make the included files conditional so I could create a folder for each one and then when selecting the files to include,  be able to set the platforms to include that file or folder for when the app is built.  That would help on the desktop as well.  In the meantime the only way seems to be to remember to remove the other platforms which isnt ideal for my goldfish memory,  so putting them in the stack works for me for now :)
> 
> Ive run the script and there are about 60 images @ over 10k so thats a good start,  now I just need to squash them all,  is that possible in Livecode as well?????
> 
> Andy





More information about the use-livecode mailing list