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

Optimize image assets #5688

Closed
frederoni opened this issue Jul 14, 2016 · 5 comments
Closed

Optimize image assets #5688

frederoni opened this issue Jul 14, 2016 · 5 comments
Assignees
Labels
good first issue Good for newcomers iOS Mapbox Maps SDK for iOS
Milestone

Comments

@frederoni
Copy link
Contributor

Noticed that there are room for improvements in terms of image assets:

  • Compass.png is incorrect scale (2x = 1,8x, 3x = 2,81) (3x downscaling should be handled automatically) which results in half pixels when loading from resources.
  • Logo is positioned on half pixels which prevents pixel perfect rendering.
  • App Thinning cannot slice resources unless they're in an asset catalog. (would save ~12KB on 2x devices) (Cocoapods supports asset catalogs as of version 1.0)
@frederoni frederoni added the iOS Mapbox Maps SDK for iOS label Jul 14, 2016
@friedbunny
Copy link
Contributor

Sounds great. Asset catalogs are iOS 7+, so we’re good there.

@1ec5
Copy link
Contributor

1ec5 commented Jul 14, 2016

Logo is positioned on half pixels which prevents pixel perfect rendering.

We mitigate this with fractional alignment rect insets. It would be great to get these images and their insets into an asset catalog.

@pveugen pveugen added this to the ios-v3.4.0 milestone Jul 14, 2016
@1ec5
Copy link
Contributor

1ec5 commented Jul 14, 2016

Using an asset catalog would also allow us to replace the existing default_marker.png with default_marker.pdf, which is scalable.

@boundsj boundsj modified the milestones: ios-future, ios-v3.4.0 Aug 12, 2016
@1ec5 1ec5 added the good first issue Good for newcomers label Oct 18, 2016
@1ec5
Copy link
Contributor

1ec5 commented May 13, 2017

#8703 proposes to replace these PNGs with PDFs.

@friedbunny
Copy link
Contributor

Fixed by #9060, will be in v3.6.0-beta.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

5 participants