Image File Size Reduction

Ray ray at linkit.com
Fri Aug 8 16:16:41 EDT 2014


Richard,

I finally got around to trying your suggestions regarding changing an 
image file's color depth.  I'm not sure what the syntax is. Here's the 
exact line of code:

    export img myImage to file myFilePath as png

I've tried inserting "as raw" or even just "raw" just about everywhere I 
can imagine in that command and I always come up with errors.

Your other suggestions are working out really well.  I'm especially 
having fun 'exporting with palette'

Many thanks!!!


On 8/6/2014 9:52 PM, Richard Gaskin wrote:
> Ray wrote:
>
> > Does anybody know of a way to reduce an image's disk size from within
> > Livecode?
> >
> > Specifically, I'd like to be able to:
> >     1)  change the file from PNG to JPEG
>
>  import PNG; export as JPEG
>
>
> >     2)  change the color depth for PNG's to 8 bit
>
>   "export <target> as raw..." might help, maybe even "export with 
> palette..." (filter the Dictionary for "export" to see the new options)
>
> But AFAIK JPEG is always full color anyway, so the biggest reduction 
> in size is likely to come from setting the JPEGQuality global property 
> before exporting in that format.
>
>
> >     3)  change the dimensions
>
>   set the rect...
>
>
>
> > Regarding the last of these I know you can set it up and take a
> > snapshot but I was kind of looking for a way to do all three of
> > these without a lot of fussing around.
>
> Any such transformations will involve some fussing around, but it's 
> often more fun to fuss around in LiveCode than anything else. :)
>





More information about the use-livecode mailing list