Skip to content

Commit

Permalink
fix(heic): Correctly set imagespec size for heif images
Browse files Browse the repository at this point in the history
Signed-off-by: Gerrard Tai <[email protected]>
  • Loading branch information
flyyee authored and lgritz committed Jul 15, 2024
1 parent aeba5fd commit 0a2dcb4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/heif.imageio/heifinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ HeifInput::seek_subimage(int subimage, int miplevel)
#endif

int bits = m_himage.get_bits_per_pixel(heif_channel_interleaved);
m_spec = ImageSpec(m_ihandle.get_width(), m_ihandle.get_height(), bits / 8,
TypeUInt8);
m_spec = ImageSpec(m_himage.get_width(heif_channel_interleaved),
m_himage.get_height(heif_channel_interleaved), bits / 8,
TypeUInt8);

m_spec.attribute("oiio:ColorSpace", "sRGB");

Expand Down

0 comments on commit 0a2dcb4

Please sign in to comment.