Select to view content in your preferred language

ImageElement api cannot display transparent png in mapview

1125
7
Jump to solution
07-27-2022 08:40 PM
Lzy
by
Emerging Contributor

Hello

I found a problem when using the ImageElement api, using MediaLayer ImageElement in the mapview api to add a transparent png image to the map, the white color does not achieve the transparent effect.


It is found that the problem occurs in the bit depth. The bit depth of the png image is 8, and the bit depth of the png image is 32, which cannot be displayed normally.


Hope it will be resolved in the next version.

Tags (1)
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

This issue will be fixed at version 4.25 which will be released in October. In meantime, you can test the fix by pointing your app to our `next` version: https://github.com/Esri/feedback-js-api-next

-Undral

View solution in original post

0 Kudos
7 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

I tested the MediaLayer with a 8 bit png with a transparent background and was not able to reproduce the issue you described. Here is the image I used: https://i.stack.imgur.com/RPEQQ.png

The one with red background is added as img on a div with a red background. The one on the map is added to the MediaLayer. The transparency is working expected.

Screen Shot 2022-07-28 at 11.01.00 AM.png

If you see issue can you please provide a reproducible case? 

 

Thanks

0 Kudos
Lzy
by
Emerging Contributor

I'm sorry. I think I didn't express myself clearly. 32-bit PNG images are opaque .The 8-bit PNG image is normal

0 Kudos
UndralBatsukh
Esri Regular Contributor

Hi there, 

Ah should have realized that. I am able to reproduce the issue. We are tracking this issue and will update you as soon as it is fixed. Thanks for bringing this issue to our attention. 

-Undral

0 Kudos
Lzy
by
Emerging Contributor

Okay, thanks

0 Kudos
UndralBatsukh
Esri Regular Contributor

Hi there, 

This issue will be fixed at version 4.25 which will be released in October. In meantime, you can test the fix by pointing your app to our `next` version: https://github.com/Esri/feedback-js-api-next

-Undral

0 Kudos
Lzy
by
Emerging Contributor

Thanks!

0 Kudos
Lzy
by
Emerging Contributor

Hello, I have seen the optimization of the media layer in 4.25, and I would like to see if the resolution of the media layer can be increased later, for example, 30000 * 30000

0 Kudos