Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Implement transparency in MGLMapSnapshotter #10118

Closed

Description

@fabian-guerra

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.

Activity

  1. added
    iOS
    macOS
    on Oct 3, 2017
  2. 1ec5 commented on Oct 4, 2017

    @1ec5
    Contributor

    This should just be a matter of passing YES in as the second parameter to UIGraphicsBeginImageContextWithOptions():

    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.

  3. changed the title [-]Implement opaqueness in MGLMapSnapshotter[/-] [+]Implement transparency in MGLMapSnapshotter[/+] on Oct 4, 2017
  4. 1ec5 commented on Oct 4, 2017

    @1ec5
    Contributor

    if the background style layer has a non-opaque fill color

    This would require #9914, although per #10118 (comment), I don’t think it’s strictly necessary to enable opacity in any case.

  5. added
    archived
    on Nov 3, 2018
  6. stale commented on Dec 3, 2018

    @stale

    This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    archivedfeatureiOSmacOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions