diff options
author | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2009-04-03 12:00:51 +0000 |
---|---|---|
committer | dcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db> | 2009-04-03 12:00:51 +0000 |
commit | 1a9967cd2bec4abc039aac111bfa61ef37266fe1 (patch) | |
tree | 4cf0d62b0ee4a8f5656fdb7ded0e985da403f764 /jquant1.c | |
parent | 803e3a287a29ba05e60a74b77f8cb41017164bd1 (diff) |
Implement new colorspaces to allow directly compressing from/decompressing to RGB/RGBX/BGR/BGRX/XBGR/XRGB without conversion
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@35 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jquant1.c')
-rw-r--r-- | jquant1.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -193,7 +193,10 @@ select_ncolors (j_decompress_ptr cinfo, int Ncolors[]) int total_colors, iroot, i, j; boolean changed; long temp; - static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE }; + int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE }; + RGB_order[0] = rgb_green[cinfo->out_color_space]; + RGB_order[1] = rgb_red[cinfo->out_color_space]; + RGB_order[2] = rgb_blue[cinfo->out_color_space]; /* We can allocate at least the nc'th root of max_colors per component. */ /* Compute floor(nc'th root of max_colors). */ |