I'm new to image processing and game development. I was following a tutorial in which it suggest to use background image of format RGB888and for sprites, buttons and other rest icons it suggest to use ARGB8888 format.
Most basic difference is there Bits RGB888 is 24bit and ARGB8888 is 32 bit.
So I want to know what is real difference between these two format and how they effect in visual representation?
RGB888. In TouchGFX, a color of 24 bpp color depth will have the color format RGB888. This means that 8 bits are used for each of the color components red, green and blue.
public static final Bitmap.Config ARGB_8888. Each pixel is stored on 4 bytes. Each channel (RGB and alpha for translucency) is stored with 8 bits of precision (256 possible values.) This configuration is very flexible and offers the best quality. It should be used whenever possible.
RGB888 is 24-bit, not 8-bit. Both formats you mention are 8 bits per channel, but one has three channels and one has four.
The difference is that ARGB adds an alpha channel that specifies opacity for each pixel. It's how you get semi-transparent images.
RGB is the same as ARGB with an implicit assumption that the alpha value is 255, or, in other words, fully opaque.
A - Alpha
R - Red
G - Green
B - Blue
The difference is that ARGB adds an alpha channel that specifies opacity for each pixel. By using it you can get semi-transparent images/overlays.
RGB888 is 24-bit, not 8-bit.
It has Three channels with 8 bits per channel,
ARGB8888
It has Four channels with 8 bits per channel.
Alpha value is 0-255, where 0 being fully transparent and 255 being fully opaque.
ARGB_8888 Documentation says: Each pixel is stored on 4 bytes. Each channel (RGB and alpha for translucency) is stored with 8 bits of precision (256 possible values.) This configuration is very flexible and offers the best quality. It should be used whenever possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With