source:Industry Trends release time:2023-07-03 Hits: Popular:led screen wholesaler
In fact, the ubiquitous icons in Windows are a typical example of a transparent bitmap.
The icon is composed of two separate bitmaps. The first bitmap is composed of a black (all color bits are 0) background and a colored icon pattern. This bitmap will be combined with the current screen display through XOR operation, so it is called an XOR bitmap. The second bitmap is composed of a white (all color bits are 1) background and a black (all color bits are 0) icon pattern. This bitmap will be combined with the current screen display through (AND) operation, so it is called an AND bitmap. The display of icons is achieved through two steps:
As we all know, the result of 1 and any numerical AND operation will maintain the original value, while the result of 0 and any numerical AND operation will be 0. Therefore, in step 1, the white (1) and screen display in the AND bitmap will be masked by the original color after AND operation, while the black (0) will be masked by the original color. After step 1, a black icon pattern will be left on the screen. In subsequent step 2, as the result of XOR between 0 and any numerical value will be the original value, after XOR operation, the black part of the XOR bitmap and screen display will be masked by their respective colored parts. After step 2, an irregularly shaped icon pattern appears on the screen. This is the principle of icon display.
The usual method for drawing transparent bitmaps is to use masks. The so-called mask is a black and white dual color bitmap, which corresponds to the bitmap that needs to be transparent. The mask describes the parts of the bitmap that need to be transparent. The transparent parts are black, while the opaque parts are white, and the white parts are the transparent parts.
Assuming Figure A is the transparent bitmap to be drawn, Figure B is the mask, and there is a capital letter A on Figure A, with a red letter and a black background. Figure B has a white background and a black letter A on top, which is the same shape as Figure A.
For example, if we want to draw Figure A transparently on a background of blue sky and white clouds, we will only draw the red letter A. We can first manipulate Figure B with the background, and then manipulate Figure B with the background
Read recommendations:
outdoor electronic advertising led display screen
FC series outdoor common cathode energy-saving full-color LED display
Maintenance methods that must be known for DLP seamless splicing of large screens