Converting a 32bpp image to a 16bpp image in Java -
How can a 32bpp image (ARGB) be converted using a 16bpp image (ARGB) Java libraries? For my curiosity, at the pixel level, what does this conversion do? If I have a full value that holds the value of a pixel (with all channels), how will the difference be different after conversion?
int argb = ((aarrggbb & 0x000000F0)) & Gt; & Gt; 4). ((Arggab and 0x0000F000) & gt; & gt; 8). ((Ergbb & amp; 0x00f00000) & gt; & gt; 12). ((Argbabs and 0xF0000000)> 16);
It sticks everything in at least 16 bits and leaves the top 16 bits in the form of 0.
For each channel, you lose less 4-bit color information, upper ones are more important, colors will be extended to the nearest 4-bit equivalent value, resulting in visually unpleasant color banding in the image Will affect
Incidentally, 16-bit colors are usually not an alpha component (although not always), it is 5 bits for red, 6 bits for green (since our eyes are green Colors are most sensitive to blue) and 5 bits are broken for blue color.
This conversion will only be lost, instead of 4 or 2 or 3 bit information on each channel, and assume that there is no alpha in the source pixel.
Comments
Post a Comment