/[public]/psiconv/trunk/lib/psiconv/parse_image.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/parse_image.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 238 Revision 239
1002 psiconv_progress(config,lev+2,off, "Handling pixel %04x (%04x)",i,*pixel); 1002 psiconv_progress(config,lev+2,off, "Handling pixel %04x (%04x)",i,*pixel);
1003#endif 1003#endif
1004 if (!palet.length) { 1004 if (!palet.length) {
1005 if (color) { 1005 if (color) {
1006 (*floats).blue[i] = ((float) (*pixel & ((1 << bluebits) - 1))) / 1006 (*floats).blue[i] = ((float) (*pixel & ((1 << bluebits) - 1))) /
1007 (1 << bluebits); 1007 ((1 << bluebits) - 1);
1008 (*floats).green[i] = ((float) ((*pixel >> bluebits) & 1008 (*floats).green[i] = ((float) ((*pixel >> bluebits) &
1009 ((1 << greenbits) - 1))) / (1 << greenbits); 1009 ((1 << greenbits) - 1))) / ((1 << greenbits) - 1);
1010 (*floats).red[i] = ((float) ((*pixel >> (bluebits+greenbits)) & 1010 (*floats).red[i] = ((float) ((*pixel >> (bluebits+greenbits)) &
1011 ((1 << redbits) - 1))) / (1 << redbits); 1011 ((1 << redbits) - 1))) / ((1 << redbits) - 1);
1012 } else { 1012 } else {
1013 (*floats).red[i] = (*floats).green[i] = 1013 (*floats).red[i] = (*floats).green[i] =
1014 (*floats).blue[i] = ((float) *pixel) / 1014 (*floats).blue[i] = ((float) *pixel) /
1015 (1 << colordepth); 1015 ((1 << colordepth) - 1);
1016 } 1016 }
1017 } else { 1017 } else {
1018 if (*pixel >= palet.length) { 1018 if (*pixel >= palet.length) {
1019 psiconv_warn(config,lev+2,off, 1019 psiconv_warn(config,lev+2,off,
1020 "Invalid palet color found (using color 0x00)"); 1020 "Invalid palet color found (using color 0x00)");

Legend:
Removed from v.238  
changed lines
  Added in v.239

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26