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

Remove util::encodePNG - #7813

Merged
kkaefer merged 1 commit into
masterfrom
7813-replace-encodepng
Jan 25, 2017
Merged

kkaefer merged 1 commit into
masterfrom
7813-replace-encodepng

Conversation

@kkaefer

@kkaefer kkaefer commented Jan 24, 2017

Copy link
Copy Markdown
Member

We shouldn't supply that as part of the core library; that's something implementors can handle. On Android, #7329 will remove it, and on macOS, solving #7812 will remove the need for it as well. The only remaining user will be in the tests, and in the bin/render.cpp utility.

@friedbunny friedbunny added the Core The cross-platform C++ core, aka mbgl label Jan 24, 2017
@kkaefer

kkaefer commented Jan 24, 2017

Copy link
Copy Markdown
Member Author

We could implement encodePNG with custom bare bones write-only PNG implementation that doesn't use libpng and instead just runs the ARGB buffer through zlib and writes the minimal PNG header + footer + checksums.

@mention-bot

Copy link
Copy Markdown

@kkaefer, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @artemp and @tmpsantos to be potential reviewers.

rationale: encodePNG is only used in tests + sample apps, but shouldn't actually be part of the core library. In #7828, we're removing the libpng dependency for Android, and using a libpng-free version of encodePNG allows us to run the core unit tests on Android without pulling in libpng just for the test suite. In a next step, we should remove encodePNG() from the image.hpp header, which is a public header.

@tmpsantos tmpsantos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Qt has been using its own PNG writer for long time. Maybe we could move it from platform/qt/src/image.cpp to platform/qt/src/png_writer.cpp for the sake of consistency.

@kkaefer
kkaefer merged commit 1715bf9 into master Jan 25, 2017
@kkaefer
kkaefer deleted the 7813-replace-encodepng branch January 25, 2017 09:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Core The cross-platform C++ core, aka mbgl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants