Adapting to Retina/HiDPI

I never had to deal with Retina or HiDPI (sic), but now I guess I have to.

I have lots of graphics, all PNG. Some naturally have Alpha channels, some don’t. I 99.99% of the time have two graphics for every one; e.g. mypic and mypic_mask. But mypic may have a Alpha channel anyway. And mypic always has Transparant=White.

So once I turn on Enable Hi-DPI, when I start my app I get lots of UnsupportedOperation Exception errors, “The Transparent property cannot be used with Pictures with alpha channels”, and this is simply caused by referencing the object.

I found I can either get rid of this by setting Transparant=None on all these pictures or perhaps I can get rid of all the Alpha channels on the offending picture files.

What is the best way of dealing with this?

Images with embedded alpha channel is the current standard.

1 Like

So the suggestion would be to:

  1. Take all my [mypic, mypic_mask] pairs and make a single mypic with the _mask as the embedded alpha channel
  2. Remove the _mask graphics, as they are now never used
  3. Change all the Transparent properties of the mypic’s to =NONE.

(I should say that I had all these mypic/mypic_mask pairs because of how REAL/Xojo worked in the past.)

Do I have that correct?

1 Like

Me, I’ve rmvd all the _mask graphics, plus had to re-create the picts with embedded transparency.

Remember to do a right-click onto a graphics object, then select “Convert to Image Set” to get the Retina capability.