- const uint8_t palrgb1[] = { c1>>16 & 0xff, c1>> 8 & 0xff, c1 & 0xff };
- const uint8_t palrgb2[] = { c2>>16 & 0xff, c2>> 8 & 0xff, c2 & 0xff };
- const int d1 = diff(palrgb1, rgb, trans_thresh);
- const int d2 = diff(palrgb2, rgb, trans_thresh);
+ const uint8_t palargb1[] = { 0xff, c1>>16 & 0xff, c1>> 8 & 0xff, c1 & 0xff };
+ const uint8_t palargb2[] = { 0xff, c2>>16 & 0xff, c2>> 8 & 0xff, c2 & 0xff };
+ const int d1 = diff(palargb1, argb, trans_thresh);
+ const int d2 = diff(palargb2, argb, trans_thresh);