摘要 |
<p>A method for determining transparency of images in extraction comprises various steps, including: set transparent areas in Image 1 to black; set transparent areas in Image 2 to white; to perform an 'exclusive or' operation on Image 1 and Image 2; subtract 1 from the resulting bitmap of the 'exclusive or' operation, wherein the resulting bitmap after the 'subtraction' operaton is called first mask bitmap; fill a first temporary bitmap with pixels all set to (254, 254, 254); perform an 'exclusive or' operation on the first temporary bitmap and the bitmap for Image 1; fill a second temporary bitmap with pixels all set to (0, 0, 0); divide the resulting bitmap of the 'exclusive or' operation on the first temporary bitmap and the bitmap for Image 1 by the second temporary bitmap, wherein the resulting bitmap after the 'division' operation is called second mask bitmap; perform an 'or' operation on the second mask bitmap and the original bitmap for Image 1; and perform an 'or' operation on the first mask bitmap and the second mask bitmap. As a result, the pixels in the exporting image which have rgb values (254, 254, 254) are transparent; and the pixels in the exporting image, corresponding to the pixels in image 1 that had rgb values (254, 254, 254), now have rgb values (255, 255, 255).</p> |