Home > Back-end > Please everyone a great god, and how to use for synthesis of transparent mask bitmap images?
Please everyone a great god, and how to use for synthesis of transparent mask bitmap images?
Time:10-01
Images 1, for example, add pictures 2 (mask), how to get the effect of the 3 picture? Picture 3 is just a display in the middle, surrounded by transparent or translucent, so you can get a smooth edge of picture effect,
Request the great god can grant instruction, best can have a code, thank you!
CodePudding user response:
Forgot to say, what I use is delphi7, thank humbly you becoming
CodePudding user response:
BitBlt function, twice, the first draw pictures with srcCopy parameters correctly, the second drawing mask images, with srcand with it
CodePudding user response:
Bitblt (image3. Picture. Bitmap. Canvas. Handle, 0, 0, 23, 22, image1. The Picture. The Bitmap. The Canvas, Handle, 0, 0, SRCCOPY);
Bitblt (image3. Picture. Bitmap. Canvas. Handle, 0, 0, 23, 22, image2. The Picture. The Bitmap. The Canvas, Handle, 0, 0, SRCAND);
Image3. Refresh;
Can you tell me isn't it? But there is no effect, Use bitblt all sorts of way has been tried and have the desired effect,
This mask figure, figure 1 should be according to the color of figure 2, figure 2 is black, if the corresponding pixels from figure 1, transparent, grey, translucent, according to the grey value decision transparent degree?