Image Color Downsizing

Thomas McGrath III mcgrath3 at mac.com
Tue Nov 27 09:16:46 EST 2012


Rick,

Have you checked out "export with palette" in the dictionary? It works on the palette of the image which could be set to 16 color count?

export "image1" to tImage as png with 16 optimized color palette

If the optimized palette form is used, then a palette with the colorCount colors will be generated that does its best to approximate all the colors present in the image. The image will be color-matched to this palette before export. If colorList is not specified, a 256 entry palette will be generated. 


export with palette

Type: command

Syntax: 
export image to {file filePath | container} as {gif | png} with standard palette
export image to {file filePath | container} as {gif | png} with optimized palette
export image to {file filePath | container} as {gif | png} with colorCount [optimized] color palette
export image to {file filePath | container} as {gif | png} with palette colorList


-- Tom McGrath III
http://lazyriver.on-rev.com
3mcgrath at comcast.net

On Nov 26, 2012, at 10:02 PM, Rick Harrison <harrison at all-auctions.com> wrote:

> Hi there,
> 
> I was wondering if anyone knew of a way to
> downsize the colors of an image using LiveCode.
> 
> Example:  The incoming image has millions of colors,
> and I want the color table of the image just to use 16 colors.
> 
> Any way to do this?  Suggestions?
> 
> Thanks,
> 
> Rick
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list