You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Implement transparency in MGLMapSnapshotter #10118
As is asserted in this comment a MGLMapView is not necessarily opaque. MGLMapSnapshotter should implement an alpha channel if the background style layer has a non-opaque fill color.
UIGraphicsBeginImageContextWithOptions(mglImage.size, NO, self.options.scale);
If the image ends up getting saved out in a format that doesn't support transparency, like JPEG, the output will be no worse than it would be without this change. For images that require no alpha channel, which is the usual case, I suppose there would be a marginal increase in file size, but it shouldn't matter greatly.
Activity
1ec5 commentedon Oct 4, 2017
This should just be a matter of passing
YESin as the second parameter toUIGraphicsBeginImageContextWithOptions():mapbox-gl-native/platform/darwin/src/MGLMapSnapshotter.mm
Line 139 in 736e9d6
If the image ends up getting saved out in a format that doesn't support transparency, like JPEG, the output will be no worse than it would be without this change. For images that require no alpha channel, which is the usual case, I suppose there would be a marginal increase in file size, but it shouldn't matter greatly.
[-]Implement opaqueness in MGLMapSnapshotter[/-][+]Implement transparency in MGLMapSnapshotter[/+]1ec5 commentedon Oct 4, 2017
This would require #9914, although per #10118 (comment), I don’t think it’s strictly necessary to enable opacity in any case.
stale commentedon Dec 3, 2018
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.