Thanks for checking.[quote=310294:@Greg O’Lone]Have you tried setting the Graphics.Transparency property?[/quote]
No. It doesn’t work. With this code:
Dim Pic as new Picture(100,100)
Pic.Graphics.Transparency = 100
Pic.Graphics.ForeColor = &c000000FF
pic.Graphics.FillRect(0, 0, 100, 100)
I have the same result.
In fact I had already filed a bug report <https://xojo.com/issue/46626>
The example that I am working on takes many pictures and either blends or overlays them based on their alpha values. The alpha values are read pixel-by-pixel and the final alpha value is used when overlapping pictures.
Its also really handy to know the alpha value when working with mixing pictures with masks and alpha values. I just spent a few hours on code that had the alpha value returned as a 0 when it was actually 255.
[quote=316999:@Eugene Dakin]Here are some links on Transparency Flattening - I usually call it alpha flattening. Transparency Flattening or Transparency Flattening[/quote]
Ok. I was just making sure that you’re not expecting it to change the opacity of the overall canvas.
Your correct, I was not expecting it to change the opacity of the overall canvas. I am expecting this to change the opacity of a picture so that when many pictures are added together, then the single merged final picture can be shown on a Canvas.