Reputation: 103
I am now working on a image processing function. I am trying to overlay two image in wp7. In the photoshop, there is a opacity option when blending two images, i would like to do similar in wp7. But i am get no idea on how to set the opacity using WriteableBitmap.
Can anyone help to give me some light on how to set the opacity of a WriteableBitmap in windows phone 7?
Thanks a lot.
Upvotes: 1
Views: 629
Reputation: 4189
There is no opacity option because WriteableBitmap is not an image processing class. You have to read pixels from WriteableBitmap and change alpha values (I guess alpha occurs every 4 byte in the byte[]
array).
If you don't need to change images, but just need to display them with an opacity/transparency effect, you may consider using shaders (HLSL).
Last of all, take a look at WriteableBitmapEx. You can blit two WriteableBitmaps with some blending options.
Upvotes: 2