mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
ImageViewer: Transform the image's dimension accordingly to the metadata
Exif metadata have two tags to store the pixel density along each axis. If both values are different and no action is taken, the resulting image will appear deformed. This commit scales the displayed bitmap accordingly to these tags in order to show the image in its intended shape. This unfortunately includes a lot of plumbing to get this information through IPC.
This commit is contained in:
committed by
Sam Atkins
parent
8dd887b3c8
commit
8e2102fb73
@@ -48,6 +48,7 @@ Optional<DecodedImage> Client::decode_image(ReadonlyBytes encoded_data, Optional
|
||||
DecodedImage image;
|
||||
image.is_animated = response.is_animated();
|
||||
image.loop_count = response.loop_count();
|
||||
image.scale = response.scale();
|
||||
image.frames.ensure_capacity(response.bitmaps().size());
|
||||
auto bitmaps = response.take_bitmaps();
|
||||
for (size_t i = 0; i < bitmaps.size(); ++i) {
|
||||
|
||||
Reference in New Issue
Block a user