[core] Fix image type of Map::renderStill
It's a premultiplied image. This implies that we were misusing encodePNG in most cases, as we were passing premultiplied pixels which were then interpreted as unmultiplied. I changed encodePNG to accept premultipled pixels, and unpremultiply in the implementations.
This commit is contained in:
@@ -300,7 +300,7 @@ void NodeMap::startRender(std::unique_ptr<NodeMap::RenderOptions> options) {
|
||||
map->setBearing(options->bearing);
|
||||
map->setPitch(options->pitch);
|
||||
|
||||
map->renderStill([this](const std::exception_ptr eptr, mbgl::UnassociatedImage&& result) {
|
||||
map->renderStill([this](const std::exception_ptr eptr, mbgl::PremultipliedImage&& result) {
|
||||
if (eptr) {
|
||||
error = std::move(eptr);
|
||||
uv_async_send(async);
|
||||
|
||||
Reference in New Issue
Block a user