Skip to content

Commit

Permalink
Fix Android bitmap decoding when non-standard stride sizes are used
Browse files Browse the repository at this point in the history
  • Loading branch information
mtehver committed Aug 2, 2021
1 parent 374bbfb commit 618bf7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion android/native/utils/BitmapUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace carto {
}
std::shared_ptr<Bitmap> bitmap;
try {
bitmap = std::make_shared<Bitmap>(uncompressedData, bitmapInfo.width, bitmapInfo.height, colorFormat, bitmapInfo.width * bytesPerPixel);
bitmap = std::make_shared<Bitmap>(uncompressedData, bitmapInfo.width, bitmapInfo.height, colorFormat, bitmapInfo.stride);
}
catch (const std::exception& ex) {
Log::Errorf("BitmapUtils::CreateBitmapFromAndroidBitmap: Failed to create bitmap: %s", ex.what());
Expand Down

0 comments on commit 618bf7a

Please sign in to comment.