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?
13 Answers
More detail on the colour space on Wikipedia and more information on bitmaps on Android Developers Documentation. A lpha, R ed, G reen and B lue channels are represented. The alpha channel denotes the level of transparency in the image. The '8' in the name refers to the number of bits per channel. So RGB is 8+8+8= 24 bits, and ARGB is 8+8+8+8 = 32 bits.
Drawing in RGB will allow you to choose the colour of the image for either, RGB888 assumes an alpha value of 255. Adding the Alpha value by using ARGB8888 will allow you to set the transparency yourself with a number between 0 (fully transparent) and 255 (fully opaque). An example of adding transparency badly to a menu in Android would be something like the image below:
![]()
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.