Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/heif.imageio/heifinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,13 @@ HeifInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/,
#else
int ystride = 0;
#endif
#if LIBHEIF_NUMERIC_VERSION >= MAKE_LIBHEIF_VERSION(1, 20, 2, 0)
const uint8_t* hdata = m_himage.get_plane2(heif_channel_interleaved,
&ystride);
#else
const uint8_t* hdata = m_himage.get_plane(heif_channel_interleaved,
&ystride);
#endif
if (!hdata) {
errorfmt("Unknown read error");
return false;
Expand Down
4 changes: 4 additions & 0 deletions src/heif.imageio/heifoutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ HeifOutput::write_scanline(int y, int /*z*/, TypeDesc format, const void* data,
#else
int hystride = 0;
#endif
#if LIBHEIF_NUMERIC_VERSION >= MAKE_LIBHEIF_VERSION(1, 20, 2, 0)
uint8_t* hdata = m_himage.get_plane2(heif_channel_interleaved, &hystride);
#else
uint8_t* hdata = m_himage.get_plane(heif_channel_interleaved, &hystride);
#endif
hdata += hystride * (y - m_spec.y);
memcpy(hdata, data, hystride);
return true;
Expand Down
Loading