Mask image is not scaling on FHD resolution.

I am trying to achieve rounded corners in our Roku app, and I have been trying with a MaskGroup and a 9-patch image(to make the mask compatible with posters of all sizes). And it looks perfectly fine when I run it on an HD Roku device, but when loaded on the FHD device, the mask image’s stretchable area is scaling, but the corners remain in the exact place. You can see the rounded corners circled in blue.

I thought the issue was with the 9-patch, but when I tried the same with a normal PNG, I got the same result (I am assigning the maskSize with exact dimensions as the poster).

I tried increasing the DPI, too, yet got the same result :frowning:

What could I have gone wrong? Or isn’t this the way to do it all together?

Any assistance would be appreciated. Thanks in advance.

I think about 16 minutes in may apply:

So, there isn’t a solution yet?

Apparently not. For what it’s worth, @TheEndless (the requester) is (was?) a legend around here. If he can’t get any traction on this, no one can.

It is easier to design the masks in 1080p at the size you require. Then use brightscript to scale them to either stay FHD or use HD. No need for 9-patch as MaskGroup doesn’t fully support them.

device = createobject(“roDeviceInfo”)
for each resolution in device.GetSupportedGraphicsResolutions()
if resolution.preferred = true exit for ’ this will always match one of the entries
next
If resolution.height = 720
MaskScale = 0.666
else
MaskScale = 1
end if

maskGroup.maskSize = [widthMaskScale, heightMaskScale]

You can store the MaskScale as a global and reference it into components rather than rerun the logic to obtain the MaskScale every time. You need to write a function to build your masks that makes use of the MaskScale variable so you can reference it. This should basically be enough to get you started.

Not going to give away the entire method and share the complete functions we use to do this since I myself discovered how to do this years ago. Just feel like it is time to give a little bit back since others are having problems.

The rounding of your corners may get less or more dramatic and stretch/skew the farther you are away from the true resolution of the mask stored as the image in zip. But that is an acceptable trade-off to have them working on both resolutions.

Thank you @renojim and @speechles . You’ve been more than helpful.