The NetBSD Project

CVS log for pkgsrc/graphics/libheif/Makefile

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / graphics / libheif

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.60.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 11 10:37:18 2026 UTC (5 days ago) by maya
Branches: pkgsrc-2026Q3
Diff to: previous 1.60.2.1: preferred, colored; branchpoint 1.60: preferred, colored; next MAIN 1.61: preferred, colored
Changes since revision 1.60.2.1: +2 -2 lines
Pullup ticket #7360 - requested by taca
graphics/libheif: Security fix

Revisions pulled up:
- graphics/libheif/Makefile                                     1.62-1.63
- graphics/libheif/distinfo                                     1.54-1.55

---
   Module Name:	pkgsrc
   Committed By:	wiz
   Date:		Sun Oct 11 16:12:13 UTC 2026

   Modified Files:
   	pkgsrc/graphics/libheif: Makefile distinfo

   Log Message:
   libheif: update to 1.23.6.

   v1.23.6 is a security and bugfix release.

---
   Module Name:	pkgsrc
   Committed By:	wiz
   Date:		Sun Nov  1 21:24:07 UTC 2026

   Modified Files:
   	pkgsrc/graphics/libheif: Makefile distinfo

   Log Message:
   libheif: update to 1.23.7.

   v1.23.7 is a security and bugfix release.

   Fourteen of the fixed issues are rated high, so all users are
   advised to upgrade.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Sun Nov 1 21:24:07 2026 UTC (2 weeks ago) by wiz
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +2 -2 lines
libheif: update to 1.23.7.

v1.23.7 is a security and bugfix release.

Fourteen of the fixed issues are rated high, so all users are
advised to upgrade.

Revision 1.60.2.1: download - view: text, markup, annotated - select for diffs
Tue Oct 20 23:32:49 2026 UTC (3 weeks, 5 days ago) by maya
Branches: pkgsrc-2026Q3
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -2 lines
Pullup ticket #7281 - requested by taca
graphics/libheif: Security fix

Revisions pulled up:
- graphics/libheif/Makefile                                     1.61
- graphics/libheif/distinfo                                     1.53

---
   Module Name:	pkgsrc
   Committed By:	ryoon
   Date:		Sat Sep 26 08:39:28 UTC 2026

   Modified Files:
   	pkgsrc/graphics/libheif: Makefile distinfo

   Log Message:
   graphics/libheif: Update to 1.23.5

   Changelog:
   v1.23.5 is a security and bugfix release. It is ABI- and API-compatible
   with v1.23.4 and is a drop-in replacement.

   One of the fixed issues is rated high, so all users are advised to
   upgrade.

   ## Security fixes

   (CVE numbers will be added when assigned.)

     * CVE-2026-XXXXX (GHSA-v8qw-hwjv-44hw) Memory exhaustion through
     a mismatch between the container and the bitstream image size.
     A crafted image can declare a small size in its ispe property
     while the bitstream declares a much larger coded frame. The
     container-level checks used the ispe size, so the oversized
     bitstream reached the decoder, which allocated a frame buffer
     for the in-band size before libheif rejected the mismatch. The
     advisory demonstrated this for AV1 with the libaom backend (a
     351-byte AVIF declaring 64x64 but coding up to 27648x27648,
     allocating hundreds of MB to more than 10 GB), but the same class
     affects every codec whose real frame size lives in the bitstream.
     The coded size is now checked against max_image_size_pixels in
     the codec-independent decode path, before any bytes reach a
     decoder plugin: all AV1 sequence headers, all HEVC/AVC/VVC SPS
     NAL units (including those carried in the item data, not only
     the ones in the configuration record), the JPEG SOF marker and
     the JPEG 2000 SIZ reference grid are scanned for the largest
     coded size. (high)

     * CVE-2026-XXXXX (GHSA-qwpf-5wf7-r996) Heap use-after-free and
     double free when encoding an image that carries a TAI timestamp,
     including transcoding a file with an itai property. ImageDescription
     shallow-copied its raw heif_tai_timestamp_packet pointer, and a
     temporary in ImageItem::encode_to_bitstream_and_boxes() freed
     the packet while the item and the source image still held it.
     The timestamp is now stored by value. (medium)

     * CVE-2026-XXXXX (GHSA-9c75-9g8r-4728) Memory amplification
     through a JPEG 2000 pclr box declaring zero palette columns. The
     entry-count bound was skipped for zero columns, so an 11-byte
     box allocated 65,535 empty palette entries, and nested j2kH
     containers could repeat this within the child and nesting limits:
     a 3 KB file reached about 330 MB RSS, none of it charged to
     max_total_memory. Zero columns are rejected (ISO/IEC 15444-1
     requires 1 to 255), the byte bound is unconditional, and the
     palette storage is charged to the memory limits. (medium)

     * CVE-2026-XXXXX (GHSA-r7gr-2xm2-23wf) Heap out-of-bounds read
     in alpha compositing for uncompressed (unci) images whose colour
     planes have different bit depths. Op_flatten_alpha_plane read
     every plane through the sample type of the first colour plane,
     so an 8-bit blue plane next to 16-bit red and green planes was
     read with a halved stride past its end, and the bytes ended up
     in the composited output. ColorState now tracks one bit depth
     per plane, and the operator declines mixed sample widths at
     planning time. (medium)

     * CVE-2026-XXXXX (GHSA-q492-cfcm-895h) The OpenJPEG decoder
     plugin's pre-decode size check bounded the JPEG 2000 window span
     (x1-x0)*(y1-y0) but not the absolute reference-grid coordinates,
     so a codestream with a 17-pixel window on a grid near the 32-bit
     boundary reached opj_decode(). Against OpenJPEG 2.3.1 this produced
     a heap-buffer-overflow write inside OpenJPEG (the class of
     CVE-2020-6851); OpenJPEG 2.5.4 rejects the input. The reference-grid
     area is now bounded as well. (low)

     * (GHSA-qfj5-c4pq-q998) Heap out-of-bounds read in the uncompressed
     encoder when an application attached a separate alpha plane to
     an image with an interleaved chroma format. The interleaved
     encoders took their component list from the chroma format (three
     entries) but decided whether to write alpha from the presence of
     an alpha plane, and indexed the list at [3]. heif_image_add_plane()
     now rejects a separate alpha plane on interleaved images, and
     the encoders derive both decisions from the chroma format. Only
     reachable through the public API; decoding never produces such
     an image. (low)

     * (GHSA-7pwf-qh74-p35w) The caller's heif_security_limits were
     not applied when parsing a mini box (the MIAF minimized image
     format) or the av1C/hvcC blob embedded in it; the built-in defaults
     were used instead. An application that tightened the limits got
     no enforcement of its max_memory_block_size or max_total_memory
     on such files. The allocations are bounded by the bytes present
     in the box, so this could not amplify memory use. (low)

   Thanks to @homm, @jitxie (Yunding Lab, Tencent Security), @peter-hendy,
   @joelczk, @adamyordan, @k3mlol, @bruhdev1290 and @hyunjungdoh for
   reporting these issues, and to @SomnathDas, @sil3ntwizard and
   @iceray00 for the reports behind the API-contract and UBSan items
   under Hardening.

   ## Hardening

     * Colour conversion tracks one bit depth per plane instead of
     one image-wide value, and every operator declares the sample
     width and the per-plane depths it can read, so images with mixed
     plane depths (which unci allows) are declined at planning time
     instead of being caught, or not, by runtime checks. The blanket
     check that refused every mixed-depth YCbCr conversion
     (GHSA-w7mc-p8jc-p853) is replaced by per-operator constraints

     * The colour-conversion and encoder entry points verify the plane
     layout: the planes that an image's colorspace and chroma format
     imply must be present exactly once, at the implied sizes. Missing,
     duplicate or foreign planes previously failed deep inside an
     operator, passed through as a no-op, or hit an assert() in the
     x265 plugin that release builds compile out

     * heif_image_add_plane() rejects a Cb or Cr plane whose size does
     not match the chroma subsampling of the image. An oversized plane
     built this way fooled the row fill in
     heif_image_extend_to_size_fill_with_zero() into a 4 GB out-of-bounds
     write (GHSA-j2rv-58fh-w8pw), an undersized one caused out-of-bounds
     reads in the RGB conversion (#1796). Only reachable by an
     application constructing an inconsistent image through the public
     API

     * heif_image_extend_to_size_fill_with_zero() rejects a target
     smaller than the current image with a usage error instead of
     underflowing the fill length and writing past the plane
     (GHSA-hqc2-cx5m-g6ff, only reachable by out-of-contract API use)

     * memcpy() is never called with a NULL pointer, even for zero-length
     copies (empty box payloads, zero-length iloc extents, empty ICC
     profiles or masks). This is undefined behaviour in C17 and C++
     and was reported by UBSan (GHSA-2764-mqj2-c458, GHSA-x8qp-vqp7-mm4r)

     * JPEG 2000 pclr: the palette precision field is read and written
     as the specification defines it (the low 7 bits hold the precision
     minus one), and the entry count is returned as the 16-bit value
     it is

   ## Bug fixes

     * Overlay (iovl) images with negative 16-bit offsets lost the
     affected layer: the sign extension was wrong for the 2-byte offset
     form, so the layer was placed far outside the canvas (since
     v1.19.2, conformance files C019 and C021)

     * Overlay layers with a negative offset were clipped wrongly: a
     layer whose negative offset was at least half its size was not
     drawn at all, smaller negative offsets drew a truncated part,
     and the alpha path wrote to the wrong column (since v1.20.0)

     * An item may be referenced repeatedly within one iref entry. An
     overlay that places the same input image at two positions references
     it twice in its dimg entry, and such files (conformance file
     C021) were rejected since v1.17.0; heif_context_add_overlay_image()
     could not write them either. The same applies to a repeated track
     ID within one tref reference type box

     * Visual sequences: each decoded frame received the duration of
     the next pushed sample instead of its own, so a variable frame
     rate sequence with the durations {100, 250, 400} decoded as {250,
     400, 100} (#1914)

     * Sequence encoding with x265 aborted on the header-only first
     drain in builds with the libstdc++ assertions enabled (Fedora's
     default), because the pending output was moved out of a std::optional
     instead of being extracted (#1907)

     * kvazaar: monochrome and alpha auxiliary images crashed with
     kvazaar git master, which keeps the chroma format in new config
     fields that only the input-format parser updates. The input format
     is now set through config_parse(), and chroma formats a kvazaar
     build does not support return an error (#1915)

     * Uncompressed Bayer (filter array) images could not be decoded
     to a different bit depth: 8-bit to 16-bit interleaved RGB and
     12-bit to 8-bit RGB failed with "Invalid bit depth", and a native
     decode of a 12-bit Bayer image with convert_hdr_to_8bit returned
     an image without planes

     * Compositing the alpha of a monochrome image failed with
     "unsupported color conversion" for monochrome and RGB targets;
     luma-only images are now composited directly on their Y plane

     * Decoding uncompressed images whose colour planes have different
     depths to 8 bits depended on the order of the planes (RGB 8/8/16
     was refused while 16/8/8 worked), and mixed-depth YCbCr images
     (16/16/8) could not be decoded to 8-bit RGB at all

     * FFmpeg decoder plugin: fixed a link failure with MSVC when
     built as a dynamic plugin (#1854)

   ## Behavior changes

     * The coded image size in the bitstream is checked against
     max_image_size_pixels before decoding, for all codecs. Files
     whose bitstream declares a frame larger than the limit are rejected
     even when their ispe property is small

     * heif_image_add_plane() rejects a separate alpha plane on an
     image with an interleaved chroma format, and a Cb/Cr plane with
     a size that does not match the chroma subsampling

     * heif_image_extend_to_size_fill_with_zero() returns a usage
     error for a target smaller than the current image

     * Encoding an image whose planes do not match its colorspace and
     chroma format returns a usage error; converting such an image
     returns Unsupported_image_type

     * Repeated references within one iref entry or one tref reference
     type box are accepted

     * JPEG 2000 pclr boxes with zero columns are rejected

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sun Oct 11 16:12:13 2026 UTC (5 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +2 -2 lines
libheif: update to 1.23.6.

v1.23.6 is a security and bugfix release.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sat Sep 26 08:39:28 2026 UTC (7 weeks, 2 days ago) by ryoon
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +2 -2 lines
graphics/libheif: Update to 1.23.5

Changelog:
v1.23.5 is a security and bugfix release. It is ABI- and API-compatible
with v1.23.4 and is a drop-in replacement.

One of the fixed issues is rated high, so all users are advised to
upgrade.

## Security fixes

(CVE numbers will be added when assigned.)

  * CVE-2026-XXXXX (GHSA-v8qw-hwjv-44hw) Memory exhaustion through
  a mismatch between the container and the bitstream image size.
  A crafted image can declare a small size in its ispe property
  while the bitstream declares a much larger coded frame. The
  container-level checks used the ispe size, so the oversized
  bitstream reached the decoder, which allocated a frame buffer
  for the in-band size before libheif rejected the mismatch. The
  advisory demonstrated this for AV1 with the libaom backend (a
  351-byte AVIF declaring 64x64 but coding up to 27648x27648,
  allocating hundreds of MB to more than 10 GB), but the same class
  affects every codec whose real frame size lives in the bitstream.
  The coded size is now checked against max_image_size_pixels in
  the codec-independent decode path, before any bytes reach a
  decoder plugin: all AV1 sequence headers, all HEVC/AVC/VVC SPS
  NAL units (including those carried in the item data, not only
  the ones in the configuration record), the JPEG SOF marker and
  the JPEG 2000 SIZ reference grid are scanned for the largest
  coded size. (high)

  * CVE-2026-XXXXX (GHSA-qwpf-5wf7-r996) Heap use-after-free and
  double free when encoding an image that carries a TAI timestamp,
  including transcoding a file with an itai property. ImageDescription
  shallow-copied its raw heif_tai_timestamp_packet pointer, and a
  temporary in ImageItem::encode_to_bitstream_and_boxes() freed
  the packet while the item and the source image still held it.
  The timestamp is now stored by value. (medium)

  * CVE-2026-XXXXX (GHSA-9c75-9g8r-4728) Memory amplification
  through a JPEG 2000 pclr box declaring zero palette columns. The
  entry-count bound was skipped for zero columns, so an 11-byte
  box allocated 65,535 empty palette entries, and nested j2kH
  containers could repeat this within the child and nesting limits:
  a 3 KB file reached about 330 MB RSS, none of it charged to
  max_total_memory. Zero columns are rejected (ISO/IEC 15444-1
  requires 1 to 255), the byte bound is unconditional, and the
  palette storage is charged to the memory limits. (medium)

  * CVE-2026-XXXXX (GHSA-r7gr-2xm2-23wf) Heap out-of-bounds read
  in alpha compositing for uncompressed (unci) images whose colour
  planes have different bit depths. Op_flatten_alpha_plane read
  every plane through the sample type of the first colour plane,
  so an 8-bit blue plane next to 16-bit red and green planes was
  read with a halved stride past its end, and the bytes ended up
  in the composited output. ColorState now tracks one bit depth
  per plane, and the operator declines mixed sample widths at
  planning time. (medium)

  * CVE-2026-XXXXX (GHSA-q492-cfcm-895h) The OpenJPEG decoder
  plugin's pre-decode size check bounded the JPEG 2000 window span
  (x1-x0)*(y1-y0) but not the absolute reference-grid coordinates,
  so a codestream with a 17-pixel window on a grid near the 32-bit
  boundary reached opj_decode(). Against OpenJPEG 2.3.1 this produced
  a heap-buffer-overflow write inside OpenJPEG (the class of
  CVE-2020-6851); OpenJPEG 2.5.4 rejects the input. The reference-grid
  area is now bounded as well. (low)

  * (GHSA-qfj5-c4pq-q998) Heap out-of-bounds read in the uncompressed
  encoder when an application attached a separate alpha plane to
  an image with an interleaved chroma format. The interleaved
  encoders took their component list from the chroma format (three
  entries) but decided whether to write alpha from the presence of
  an alpha plane, and indexed the list at [3]. heif_image_add_plane()
  now rejects a separate alpha plane on interleaved images, and
  the encoders derive both decisions from the chroma format. Only
  reachable through the public API; decoding never produces such
  an image. (low)

  * (GHSA-7pwf-qh74-p35w) The caller's heif_security_limits were
  not applied when parsing a mini box (the MIAF minimized image
  format) or the av1C/hvcC blob embedded in it; the built-in defaults
  were used instead. An application that tightened the limits got
  no enforcement of its max_memory_block_size or max_total_memory
  on such files. The allocations are bounded by the bytes present
  in the box, so this could not amplify memory use. (low)

Thanks to @homm, @jitxie (Yunding Lab, Tencent Security), @peter-hendy,
@joelczk, @adamyordan, @k3mlol, @bruhdev1290 and @hyunjungdoh for
reporting these issues, and to @SomnathDas, @sil3ntwizard and
@iceray00 for the reports behind the API-contract and UBSan items
under Hardening.

## Hardening

  * Colour conversion tracks one bit depth per plane instead of
  one image-wide value, and every operator declares the sample
  width and the per-plane depths it can read, so images with mixed
  plane depths (which unci allows) are declined at planning time
  instead of being caught, or not, by runtime checks. The blanket
  check that refused every mixed-depth YCbCr conversion
  (GHSA-w7mc-p8jc-p853) is replaced by per-operator constraints

  * The colour-conversion and encoder entry points verify the plane
  layout: the planes that an image's colorspace and chroma format
  imply must be present exactly once, at the implied sizes. Missing,
  duplicate or foreign planes previously failed deep inside an
  operator, passed through as a no-op, or hit an assert() in the
  x265 plugin that release builds compile out

  * heif_image_add_plane() rejects a Cb or Cr plane whose size does
  not match the chroma subsampling of the image. An oversized plane
  built this way fooled the row fill in
  heif_image_extend_to_size_fill_with_zero() into a 4 GB out-of-bounds
  write (GHSA-j2rv-58fh-w8pw), an undersized one caused out-of-bounds
  reads in the RGB conversion (#1796). Only reachable by an
  application constructing an inconsistent image through the public
  API

  * heif_image_extend_to_size_fill_with_zero() rejects a target
  smaller than the current image with a usage error instead of
  underflowing the fill length and writing past the plane
  (GHSA-hqc2-cx5m-g6ff, only reachable by out-of-contract API use)

  * memcpy() is never called with a NULL pointer, even for zero-length
  copies (empty box payloads, zero-length iloc extents, empty ICC
  profiles or masks). This is undefined behaviour in C17 and C++
  and was reported by UBSan (GHSA-2764-mqj2-c458, GHSA-x8qp-vqp7-mm4r)

  * JPEG 2000 pclr: the palette precision field is read and written
  as the specification defines it (the low 7 bits hold the precision
  minus one), and the entry count is returned as the 16-bit value
  it is

## Bug fixes

  * Overlay (iovl) images with negative 16-bit offsets lost the
  affected layer: the sign extension was wrong for the 2-byte offset
  form, so the layer was placed far outside the canvas (since
  v1.19.2, conformance files C019 and C021)

  * Overlay layers with a negative offset were clipped wrongly: a
  layer whose negative offset was at least half its size was not
  drawn at all, smaller negative offsets drew a truncated part,
  and the alpha path wrote to the wrong column (since v1.20.0)

  * An item may be referenced repeatedly within one iref entry. An
  overlay that places the same input image at two positions references
  it twice in its dimg entry, and such files (conformance file
  C021) were rejected since v1.17.0; heif_context_add_overlay_image()
  could not write them either. The same applies to a repeated track
  ID within one tref reference type box

  * Visual sequences: each decoded frame received the duration of
  the next pushed sample instead of its own, so a variable frame
  rate sequence with the durations {100, 250, 400} decoded as {250,
  400, 100} (#1914)

  * Sequence encoding with x265 aborted on the header-only first
  drain in builds with the libstdc++ assertions enabled (Fedora's
  default), because the pending output was moved out of a std::optional
  instead of being extracted (#1907)

  * kvazaar: monochrome and alpha auxiliary images crashed with
  kvazaar git master, which keeps the chroma format in new config
  fields that only the input-format parser updates. The input format
  is now set through config_parse(), and chroma formats a kvazaar
  build does not support return an error (#1915)

  * Uncompressed Bayer (filter array) images could not be decoded
  to a different bit depth: 8-bit to 16-bit interleaved RGB and
  12-bit to 8-bit RGB failed with "Invalid bit depth", and a native
  decode of a 12-bit Bayer image with convert_hdr_to_8bit returned
  an image without planes

  * Compositing the alpha of a monochrome image failed with
  "unsupported color conversion" for monochrome and RGB targets;
  luma-only images are now composited directly on their Y plane

  * Decoding uncompressed images whose colour planes have different
  depths to 8 bits depended on the order of the planes (RGB 8/8/16
  was refused while 16/8/8 worked), and mixed-depth YCbCr images
  (16/16/8) could not be decoded to 8-bit RGB at all

  * FFmpeg decoder plugin: fixed a link failure with MSVC when
  built as a dynamic plugin (#1854)

## Behavior changes

  * The coded image size in the bitstream is checked against
  max_image_size_pixels before decoding, for all codecs. Files
  whose bitstream declares a frame larger than the limit are rejected
  even when their ispe property is small

  * heif_image_add_plane() rejects a separate alpha plane on an
  image with an interleaved chroma format, and a Cb/Cr plane with
  a size that does not match the chroma subsampling

  * heif_image_extend_to_size_fill_with_zero() returns a usage
  error for a target smaller than the current image

  * Encoding an image whose planes do not match its colorspace and
  chroma format returns a usage error; converting such an image
  returns Unsupported_image_type

  * Repeated references within one iref entry or one tref reference
  type box are accepted

  * JPEG 2000 pclr boxes with zero columns are rejected

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Sep 13 10:43:15 2026 UTC (2 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2026Q3-base
Branch point for: pkgsrc-2026Q3
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +2 -2 lines
libheif: update to 1.23.4.

v1.23.4 is a security and bugfix release. It is ABI- and API-compatible
with v1.23.3 and is a drop-in replacement.

Three of the fixed issues are rated high, so all users are advised
to upgrade.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Wed Sep 2 14:50:24 2026 UTC (2 months, 2 weeks ago) by ryoon
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +2 -2 lines
graphics/libheif: Update to 1.23.3

Changelog:
1.23.3:
v1.23.3 is a security and bugfix release. It is ABI- and API-compatible with
v1.23.2 and is a drop-in replacement.

One of the fixed issues is rated critical, so all users are strongly advised to
upgrade.

Security fixes

(CVE numbers will be added when assigned.)

  * CVE-2026-XXXXX (GHSA-x8r2-mggj-j6wr) Heap buffer overflow (write) in the
    uncompressed (unci) mixed-interleave decoder when the two chroma components
    declare different bit depths. Both the written bytes and the overflow
    length are controlled by the file. (critical)
  * CVE-2026-XXXXX (GHSA-8fmq-r4pf-7m57) Permanent decoder deadlock through a
    reference cycle between an image and its alpha auxiliary image. The alpha
    edge was not covered by the cycle guard and re-entered a held mutex. (high)
  * CVE-2026-XXXXX (GHSA-w7mc-p8jc-p853) Heap out-of-bounds read in the YCbCr
    4:2:0 to 16-bit interleaved RGB conversion when the chroma planes have a
    lower bit depth than luma. Heap memory could end up in the decoded image.
    YCbCr conversions with mismatched luma and chroma bit depths are now
    rejected. (high)
  * CVE-2026-XXXXX (GHSA-4jqm-2x34-6f6r) Heap buffer overflow in the SVT-AV1
    encoder plugin when encoding a high-bit-depth alpha channel, and a double
    free on its send-picture error path. (high)
  * CVE-2026-XXXXX (GHSA-hh47-fhqr-cj2r) Incomplete fix for GHSA-73p7-m7gg-w2jv
    : the tile range check of the unci decoder (without icef) could still
    overflow, allowing an out-of-bounds read. (medium)
  * CVE-2026-XXXXX (GHSA-4h82-g446-83fm) Heap out-of-bounds read when
    converting odd-height 4:2:0 frames of an uncompressed (uncv) image sequence
    to RGB. (medium)
  * CVE-2026-XXXXX (GHSA-9rj8-5mp5-26c9) Out-of-bounds read in the RGB to YCbCr
    identity-matrix color conversion when the R, G, and B planes have different
    bit depths. (medium)
  * CVE-2026-XXXXX (GHSA-gh5q-69gg-c964) A clap property combined with an
    oversized ispe reached an assert() in the Fraction arithmetic and aborted
    the process (incomplete fix for GHSA-jc8f-p23p-5hjg). An error is returned
    instead. (medium)
  * (GHSA-mw6f-29j3-76f4) Several smaller findings:
    heif_image_handle_get_depth_image_handle() and
    heif_image_handle_get_depth_image_representation_info() dereferenced a null
    pointer on files without a depth image; the TIFF input decoder of the
    example tools had an unbounded EXIF tag allocation and a division by zero
    on zero YCbCr subsampling; assert()s in the PNG input decoder are now error
    returns; integer overflow in the Go binding's ImageAccess.GetPlane();
    heif-view now verifies the decoded frame size before display. (medium)
  * (GHSA-8857-r8x5-7499) Undefined behavior (negative shift) in the HDR
    bit-depth up-conversion for target bit depths above 16. Such conversions
    are now rejected. (low)

Hardening

  * unci: fixed a pointer wrap on 32-bit builds in the tile decoders that walk
    the data with a raw pointer (bytealign and block component-interleave,
    block pixel-interleave). A huge row_align_size wrapped the pointer past the
    bounds check and read out of bounds (found by OSS-Fuzz)
  * unci: the per-tile decode path (heif_image_handle_decode_image_tile()) now
    runs the same uncC layout checks as the full-image path; a block-pixel
    layout with oversized component bit depths caused an undefined shift
  * unci: the sequence decode path rejects an oversized row_align_size like the
    still-image path
  * AVC SPS: variable-length fields are validated
  * Color conversion: fixed a negative shift when up-converting an alpha
    channel to more than twice its bit depth (e.g. 2-bit alpha with 12-bit
    color in an unci image), a signed overflow when compositing alpha on 16-bit
    images, and a missing chroma bit-depth check in the YCbCr 4:2:0 to 16-bit
    RGB conversion
  * Pixel plane allocation: the size computation is guarded against 64-bit
    overflow (reachable only with the image-size security limit disabled)
  * heif_region_item_add_region_polygon() checks its parameters (NULL pointer,
    negative point count)
  * Fixed a data race (broken double-checked locking) when pasting decoded grid
    tiles into the output image (#1888)
  * ID allocation: avoid an unsigned wrap when the maximum ID is reserved
    (fuzzer with -fsanitize=integer)

Bug fixes

  * Regression since v1.22.0: images with a clap crop, and small images whose
    coded frame is padded (hardware encoders), failed with "Security limit
    exceeded" even with limits disabled. The tightened decode size limit
    introduced with #1798 is now derived from the ispe size with a floor of
    256x256 (#1856)
  * Regression since v1.21.0: YCbCr images with more than 14 bits per pixel
    could not be converted to RGB. The 14-bit limit now applies only to the
    YCgCo-Re integer path (#1881)
  * ftyp box parse errors are reported as such instead of "No 'ftyp' box", and
    a brands security limit of 0 (LIBHEIF_SECURITY_LIMITS=off) is treated as no
    limit (#1872)
  * When no tile of a grid image could be decoded, the tile decoding error is
    returned instead of an unspecific error, and the missing-decoder error now
    names the compression format and an example plugin (#1876)
  * AVC: fixed the SPS conformance window crop unit scaling. Encoded AVC images
    with dimensions that are not a multiple of 16 got an oversized ispe and a
    spurious clap property, and then failed to decode (#1866)
  * iloc: reading a sub-range of an extent stored in idat failed with "Not
    enough data present in 'iloc'", so multi-tile or icef-compressed
    uncompressed images stored in idat could not be decoded
  * Files with a mime item whose content encoding is unknown or whose
    decompressor is not compiled in are no longer rejected as a whole. The
    item's raw data stays accessible through heif_item_get_item_data(). The
    "identity" content encoding is treated as no encoding
  * heif_item_get_item_data() crashed on an item that was just added to a
    context (in-memory extents are now served directly)
  * heif_context_add_item(), heif_context_add_mime_item(),
    heif_context_add_precompressed_mime_item(), and heif_context_add_uri_item()
    aborted on NULL strings or data and on a negative size; they return a usage
    error now. heif_context_add_item() wrote a file with a 'pict' handler and a
    bogus pitm that no reader accepted
  * Encoders write the pixel aspect ratio into the bitstream where the codec
    supports it (Extended_SAR in the HEVC/AVC/VVC VUI, JFIF density fields), so
    the bitstream agrees with the pasp property (#1860)
  * x264: nclx color signalling was silently not written into the SPS VUI,
    producing a warning about disagreeing colr box and bitstream on decode
  * SVT-AV1 (>= 4.0.0): the QP derived from the quality setting is no longer
    rounded to an integer (quarter-QP steps). The value is written directly
    into the encoder configuration, avoiding a locale-dependent string round
    trip and an unintended switch from CRF to CQP rate control (#1867)
  * aom: wrong chroma plane height for 4:2:2 input
  * rav1e: the encoder was configured with the storage bit depth instead of the
    actual bit depth
  * OpenJPH: high-bit-depth source samples were read as 8-bit
  * uvg266: the high-bit-depth plane copy dropped the bytes-per-sample factor
  * OpenJPEG: lossless encoding was still rate-limited, producing truncated
    codestreams with visible errors
  * FFmpeg decoder: 12, 14, and 16-bit monochrome images (including alpha
    planes of such images) are decoded; high-bit-depth JPEG and JPEG 2000 are
    returned at the coded bit depth instead of as scaled 16-bit; an nclx
    profile is only attached for codecs that carry CICP signalling (AVC, HEVC,
    VVC, AV1), fixing wrong colors of JPEG 2000 images; big-endian hosts are
    supported
  * gdk-pixbuf: GError is set when stop_load() fails
  * Box_udes: fixed the dump output of the 'tags' field
  * CMake: HAVE_BROTLI and HAVE_LIBSHARPYUV are no longer propagated in the
    public interface; fixed the Brotli configuration

Behavior changes

  * heif_context_write() / heif_context_write_to_file() refuse a context that
    was read from a file (Unsupported_feature). Item and sample data were never
    copied from the input, so the written file was truncated. Writing a context
    that contains only metadata items (no image, no sequence) returns a usage
    error instead of writing an invalid ftyp box
  * YCbCr to RGB conversions where the chroma planes have a different bit depth
    than luma return heif_suberror_Unsupported_color_conversion
  * Alpha compositing (flattening) rejects images with more than 16 bits per
    sample; HDR up-conversion to more than 16 bits is rejected
  * The x265 encoder returns an error for images with more than 142,606,336
    luma samples (the HEVC Level 7.2 maximum, e.g. 16384x8704) instead of
    crashing inside x265 (GHSA-2c3g-p585-8rpq)

Other

  * New heif_item_type_* and heif_entity_group_* fourcc constants, and
    documentation of the entity group types, in the API headers (#1864)
  * The uncompressed codec is no longer labeled experimental in heif-enc and
    the CMake options (#1869)
  * CI: Linux jobs moved to Ubuntu 24.04, GCC 16 added to the compiler matrix,
    clang-tidy performance checks enabled, all GitHub Actions pinned to commit
    SHAs, Coverity scan re-enabled

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sun Aug 30 15:07:40 2026 UTC (2 months, 2 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +2 -2 lines
libheif: update to 1.23.2.

v1.23.2 is a security and bugfix release. It is ABI- and API-compatible with v1.23.1 and is a drop-in replacement.

Two of the fixed issues are rated critical, so all users are strongly advised to upgrade.
Security fixes

(CVE numbers will be added when assigned.)

    CVE-2026-XXXXX (GHSA-g89c-p67h-r497) Heap buffer overflow in scale_nearest_neighbor() via duplicate alpha planes from nested iden/auxl items. (critical)
    (GHSA-2jg2-4ch7-h545) Out-of-bounds read and write in derived-item and pixel-plane handling. Through iden and auxl item chains, a crafted file could attach pixel planes whose size differs from the image geometry; crop, scale, and plane-extraction code then indexed those planes with the wrong size. A working code-execution exploit was confirmed. Plane sizes are now validated wherever they are consumed. (critical)
    CVE-2026-XXXXX (GHSA-24wx-9w62-c96w) brotli/zlib decompression of mime metadata and unci image data had no effective output-size limit, so a decompression bomb could exhaust memory. Decompressed output is now bounded by the security limits. (high)
    CVE-2026-XXXXX (GHSA-x8xm-cm2c-cfc8) Chains of derived-image references (grid, iovl, iden) bypassed decode caching and memory limits, causing CPU and memory amplification. (high)
    CVE-2026-XXXXX (GHSA-xw34-mjcp-jqh8) Sequence sample-timing initialization could produce non-terminating decode loops and unbounded memory, bypassing max_sequence_frames. (high)
    CVE-2026-XXXXX (GHSA-j264-xvrp-5v7q) Out-of-bounds write in the unci encoder when heif_context_add_image_tile() is given a tile whose planes do not match its declared size. (high)
    CVE-2026-XXXXX (GHSA-p58j-h3vm-3fp5) Heap out-of-bounds read in the inline-mask region API when mask_data_len does not match the region geometry. (medium)

Thanks to David Schutz (Meta Product Security), @rootxharsh, @KarimPwnz, @hacktronai-research, @Nora-Qiu, @holimart, @buraks1998, and @zenniskayy2k4 for reporting these issues.
Hardening

    C++ exceptions such as std::bad_alloc can no longer escape the C API read/decode entry points; they are returned as a heif_error instead of aborting the process
    assert()s in the pixel-image plane allocation were replaced by runtime errors
    stts/ctts tables describing more samples than the track can have are rejected
    pclr (JPEG 2000 palette) box: the number of palette entries is bounded by the box size
    BitReader::skip_bytes() is now constant time (fixes a fuzzer timeout on bogus alignment values)
    iden items now validate the decoded image size like all other items
    The uncompressed (unci) encoder rejects images without pixel planes

Bug fixes

    meta, mini, and moov boxes with size 0 (extending to the end of the file) are now parsed correctly (#1857)
    Fixed an integer overflow when probing the file size (#1857)
    Fixed undefined behavior (signed shift) when reading the NAL unit length in the OpenH264 decoder

Behavior changes

    heif_region_item_add_region_inline_mask_data() now requires non-zero width and height and the mask_data_len must equal the expected (width * height + 7) / 8; otherwise it returns an error instead of storing the mask
    heif_image_add_plane() returns an error instead of aborting for bit depths outside 1..128 or interleaved component counts outside 1..255

Revision 1.57: download - view: text, markup, annotated - select for diffs
Sun Jun 28 14:00:09 2026 UTC (4 months, 2 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -2 lines
libheif: update to 1.23.1.

This is primarily a bugfix release with a few new decoder/encoder capabilities.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Jun 1 11:05:37 2026 UTC (5 months, 2 weeks ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2026Q2-base, pkgsrc-2026Q2
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +2 -3 lines
libheif: update to 1.23.0.

This is a smaller release that adds API functions to read and write metadata:

    ambient viewing environment
    nominal diffuse white luminance

It also adds a output_image_nclx_profile_passthrough option to
heif_decoding_options to pass through the input image NCLX without
doing any internal color conversion.

Security

    CVS TBD (GHSA-jvmp-j3cw-84mh) - unbounded heap allocation in HEIF sequence parser (stsz fixed-size mode missing bound check)

Revision 1.55: download - view: text, markup, annotated - select for diffs
Mon May 25 03:32:42 2026 UTC (5 months, 3 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +2 -1 lines
libheif: add upstream bugfix

Bump PKGREVISION.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun May 24 18:01:14 2026 UTC (5 months, 3 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +2 -3 lines
libheif: update to 1.22.0.

This is a large release with substantial new functionality, mainly
focusing on generalized image formats (e.g., multi-spectral images)
and a reworked implementation of ISO/IEC 23001-17 (lossless image
codec).

Revision 1.53: download - view: text, markup, annotated - select for diffs
Mon Apr 20 18:14:07 2026 UTC (6 months, 3 weeks ago) by adam
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -1 lines
revbump for x265

Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Jan 19 10:32:08 2026 UTC (9 months, 3 weeks ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2026Q1-base, pkgsrc-2026Q1
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -2 lines
libheif: update to 1.21.2.

This release contains various bug fixes and these new features:

    build script for JS/WASM now supports building with JPEG2000 and "ISO23001-17 Uncompressed" support.
    image sequence SAI data now works when using the OpenH264 decoder plugin

Revision 1.51: download - view: text, markup, annotated - select for diffs
Mon Jan 5 01:55:49 2026 UTC (10 months, 1 week ago) by wiz
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -3 lines
libheif: update to 1.21.1.

Workaround for c++17 stopped working, now really needs c++20 (like
it said for a couple releases already).

Changes:

1.21.1

This patch release only fixes a build error with some GCC versions because of a missing #include.
If you didn't get any build error, you do not need this updated patch release.

1.21.0

This release adds full support for reading and writing HEIF image sequences.
libheif will now encode HEIF image sequences with all included codecs.
Since HEIF image sequences are very similar to MP4 videos, this new version is also capable of decoding most MP4 videos (without audio, of course).

heif-enc documentation for sequence encoding
API documentation for reading and writing sequences

Other major changes:

    Support for image sequences with alpha channels. For most codecs, the alpha channel will be stored in a separate, auxiliary, monochrome track. For ISO/IEC 23001-17 (uncompressed) streams, the alpha channel is stored in the main video track.
    Support for sequence track edit lists to define the number of sequence repetitions (without actually repeating the video data).
    New encoder plugin using x264 to write H.264-compressed video streams and images.
    The FFmpeg decoder plugin will now decode both H.265 and H.264.
    Support for HEIF text items and language properties (thanks to @bradh).

CVEs fixed:

    CVE-2025-68431

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Aug 10 10:51:32 2025 UTC (15 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2025Q4-base, pkgsrc-2025Q4, pkgsrc-2025Q3-base, pkgsrc-2025Q3
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +4 -3 lines
libheif: update to 1.20.2.

pkgsrc change: remove unused svt-av1 dependency

1.20.2:

When opening tiled images, do not check against maximum image size
immediately to allow for tile-based decoding of very large images.

Several smaller fixes in writing image sequences

CMake option to disable building of heif-view, which pulls in dependency on SDL

Fixes reading/writing of GIMI content IDs

Some build fixes

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sun Jul 6 09:29:13 2025 UTC (16 months, 1 week ago) by wiz
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -2 lines
libheif: update to 1.20.1.

1.20.1

Fixes a bug in decoder plugin loading.

1.20.0

Sequences:

    API for reading and writing image sequences.
    You can read and write sequences for all codecs (not just H.265 / AV1, but also JPEG-2000, ISO-23001-17 uncompressed, ...).
    Currently only intra-coded sequences are supported.
    API for reading and writing metadata sequences.
    The metadata tracks can contain any raw timed data.
    Support for SAI (sample auxiliary information).
    Timed samples (from image sequences or metadata) can have auxiliary data attached.
    Currently we support TAI timestamps and GIMI content description IDs.
    Support for track references.
    The API for sequences is described here:
    https://github.com/strukturag/libheif/wiki/Reading-and-Writing-Sequences
    New command line tool heif-view to show HEIF sequences (requires libSDL).

Other new features:

    You can specify a security limit for the maximum total memory libheif may use for decoding.
    This is easier to handle than specifying limits on the maximum image size or single memory allocations.
    Support for TAI timestamps (in images and sequences) has been promoted from
    experimental to stable.
    FFMPEG plugin now supports HDR decoding
    Header files are now split into individual headers by topic.
    However, it should still be backwards compatible with heif.h being a catch-all covering the old content.
    For new functionality (sequences, TAI), you will need to include the specific headers.
    All struct names of the API are now also typedefs.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sun May 4 14:55:21 2025 UTC (18 months, 1 week ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2025Q2-base, pkgsrc-2025Q2
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -3 lines
libheif: update to 1.19.8.

    Set essential flag for transformative properties as required
    by MIAF. This fixes the display of AVIF images with transformations
    encoded by libheif in Chrome, which checks whether this flag
    is set.

    If the environment variable LIBHEIF_SECURITY_LIMITS is set to
    OFF, libheif will not check any security limits. This can be
    used if a user wants to work with large images that were blocked
    by the security limits, but the application software does not
    allow to adjust the libheif security limits.

    Resolved processing 16-bit JPEG-2000

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Apr 24 14:14:29 2025 UTC (18 months, 3 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -2 lines
*: recursive bump for jpeg -> libjpeg-turbo switch

Revision 1.46: download - view: text, markup, annotated - select for diffs
Tue Apr 8 21:56:57 2025 UTC (19 months, 1 week ago) by wiz
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -2 lines
libheif: also needs <filesystem>

Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Apr 3 07:03:48 2025 UTC (19 months, 2 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -3 lines
libheif: remove unused dav1d dependency

Noted by dholland@ in PR 59248.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Wed Apr 2 22:21:04 2025 UTC (19 months, 2 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -1 lines
graphics/libheif: Give tests a chance to pass on macOS too.

No change to the build, so no revbump.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Wed Apr 2 22:19:11 2025 UTC (19 months, 2 weeks ago) by riastradh
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +6 -4 lines
graphics/libheif: C++20 is not needed, only C++17.

libheif uses std::optional, which is new in C++17, so C++11 is not
enough.

Tested on netbsd-9 with pkgsrc gcc10.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Mar 10 15:45:24 2025 UTC (20 months, 1 week ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2025Q1-base, pkgsrc-2025Q1
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -3 lines
libheif: update to 1.19.7.

1.19.7

Fixes a build error with SVT-AV1 encoder plugin when using reduced symbol visibility (#1480).

1.19.6

Bugfix release.

Additionally, there are the following changes:

    C++ and Go wrapper licenses have been changed to MIT
    supports SVT-AV1 v3.0.0 encoder
    support emscripten builds for ES6 modules

Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue Feb 18 10:33:21 2025 UTC (20 months, 3 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -1 lines
*: recursive bump for openh264

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Nov 24 10:07:53 2024 UTC (23 months, 3 weeks ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2024Q4-base, pkgsrc-2024Q4
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -2 lines
libheif: update to 1.19.5.

1.19.5

fix heif_image_handle_is_premultiplied_alpha() #1394

1.19.4

Fixes a few minor bugs:

    fix crash when encoding tiled unci images
    fix crash in heif_context_encode_grid()
    fix querying the preferred colorspace for monochrome AVIF files
    error when using a chroma format or bit depth that is not supported by the Kvazaar plugin
    output proper error message when memory allocation failed and use user-defined security limits
    heif-dec: do not show progress when option --quiet it given

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sun Nov 17 09:16:24 2024 UTC (23 months, 4 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +2 -3 lines
libheif: update to 1.19.3.

fixes a race condition that may lead to some image tiles not being included in the output image (#1379)
fix a potential crash when querying overlay image information

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Nov 9 10:57:04 2024 UTC (2 years ago) by wiz
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -1 lines
libheif: now requires c++20.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Nov 7 18:42:14 2024 UTC (2 years ago) by wiz
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -1 lines
libheif: add upstream commit to revert API change

Fixes py-pillow_heif.

Bump PKGREVISION.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Nov 7 10:56:43 2024 UTC (2 years ago) by wiz
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +4 -2 lines
libheif: update to 1.19.2.

fix DLL symbol export for non MSVC-compilers on Windows
fix running the unit tests from the build directory when building with plugins
switch to catch2 testing framework. We can now check for prerequisites at runtime and skip tests accordingly

Revision 1.35: download - view: text, markup, annotated - select for diffs
Mon Nov 4 21:07:34 2024 UTC (2 years ago) by adam
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -1 lines
libheif: depend on openh264 (building fails when openh264 is installed)

Revision 1.34: download - view: text, markup, annotated - select for diffs
Mon Nov 4 17:07:34 2024 UTC (2 years ago) by wiz
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -3 lines
libheif: update to 1.19.1.

1.19.1

Fixes backwards compatibility of heif_context_set_maximum_image_size_limit() (#1359).

v1.19.0 - tile access for high-resolution images

The major new feature in this release is the decoding of separate image tiles and also encoding an image tile by tile. This allows to process high-resolution images that do not fit into memory.
We support three tiling methods:

    grid, which is the default tiling method used in most existing HEIC or AVIF images.
    unci, which is the built-in tiling method of the ISO 23001-17 uncompressed codec.
    tili, which is a proprietary scheme with much less overhead than grid and which supports efficient streaming of high-resolution images over networks without having to download huge amounts of metadata before the first tile can be decoded. It also supports much larger images than possible with grid. As an extra, it supports the processing of multi-dimensional images, like 3D image cubes, or image sets addressed by several parameter dimensions, for example multi-spectral images. See the specification of this format.

Developers will find more information in the tiling API documentation. Also check out the example viewer for tiled images and the example images on this page.
The heif-enc command line tool can now also encode tiled and multi-resolution pyramids. See the description.

Other changes:

    decoding is faster, especially if you let libheif decide on the best colorspace to work in by passing heif_colorspace_unknown and heif_chroma_unknown to heif_decode_image(). It will then use the input colorspace and avoid unnecessary conversions.
    support for multi-resolution pyramids (pymd) to show downscaled versions of high-resolution images
    improved reader interface that enables to connect libheif to a network source. Libheif will request the portions of the image file that have to be downloaded from the server. This is especially useful in connection with the tiling / multi-resolution pyramid feature.
    function to generate overlay images
    decoding progress is signaled to the client application and decoding can be cancelled
    decoding of AVC encoded images through OpenH264
    security limits can be changed to be able to read very large images

This is a big release with the help of many people reporting issues or providing contributions. Thank you to all of them!

Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Sep 16 07:20:15 2024 UTC (2 years, 2 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2024Q3-base, pkgsrc-2024Q3
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
Revbump for x265

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Sep 15 15:11:25 2024 UTC (2 years, 2 months ago) by ryoon
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -1 lines
graphics/libheif: Fix build failure with multimedia/x265-4.0

Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Aug 21 17:00:41 2024 UTC (2 years, 2 months ago) by wiz
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -1 lines
*: revbump for svt-av1 shlib bump

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Aug 11 06:40:35 2024 UTC (2 years, 3 months ago) by wiz
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -2 lines
libheif: update to 1.18.2.

fixes:

fix regression that Exif orientation was not correctly reset when converting rotated HEIF (heif-dec)
swap Exif width/height when rotating image by 90 degrees
fix memory leak in OpenJPEG decoding plugin
pay attention to DESTDIR variable when installing heif-convert symlink

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Jul 28 11:45:17 2024 UTC (2 years, 3 months ago) by wiz
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +2 -2 lines
libheif: update to 1.18.1.

This releases fixes the syntax of the vvcC box and a few build issues.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Jul 15 02:51:34 2024 UTC (2 years, 4 months ago) by wiz
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -1 lines
ilibheif: disable libtiff detection

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Jul 14 13:01:25 2024 UTC (2 years, 4 months ago) by wiz
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -3 lines
libheif: update to 1.18.0.

now reads images generated by iOS 18
heif-convert has been renamed to heif-dec
encoding: property item boxes with identical content are reused
experimental codec plugins for VVC (vvenc/vvdec and uvg266)
experimental codec plugin for OpenJPH (High-throughput JPEG2000)
support ISO 23001-17 version 1 uncC minimized headers
support ISO 23001-17 images with 'deflate', 'zlib' and Brotli compression
heif-enc can read TIFF images
API functions to read/write raw items and item properties
many bug fixes and smaller enhancements

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Apr 6 09:32:58 2024 UTC (2 years, 7 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2024Q2-base, pkgsrc-2024Q2
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -1 lines
*: bump for x265 API change

Reported by Marc Baudoin

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sat Dec 30 10:18:17 2023 UTC (2 years, 10 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2024Q1-base, pkgsrc-2024Q1
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
libheif: update to 1.17.6.

A couple of build fixes and bug fixes detected by fuzzing.

Corrects these issues:

    CVE-2023-49462 - #1043
    CVE-2023-49463 - #1042

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Dec 7 08:23:12 2023 UTC (2 years, 11 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2023Q4-base, pkgsrc-2023Q4
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
libheif: update to 1.17.5.

1.17.5

Fixes installation of the Gnome "heif.thumbnailer" config file.
No other fixes than that.

1.17.4

Fixes:

    ispe boxes in AVIF images with clap boxes were written with the wrong size (would only happen with svt-av1 encoder),
    always output MIAF brand for AVIF images
    fix kvazaar encoding with odd image sizes and encodings with non-4:2:0 chroma

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Nov 7 21:39:17 2023 UTC (3 years ago) by wiz
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +2 -3 lines
libheif: update to 1.17.3.

1.17.3

Bug fix #1026: corrected transform box generation for heif_orientation_flip_vertically and heif_orientation_rotate_90_cw_then_flip_vertically

1.17.2

Corrections:

    #1010 loading of HEIF files with extra zero bytes at the end
    #1015 / #1017 default nclx values now match sRGB
    support JPEG2000 images with alpha channel
    various smaller fixes

1.17.1

This release mainly fixes compilation and build issues for various platforms.

Other changes:

    fix issue of loading images with premultiplied alpha channel,
    correctly set compatible_version for macOS dylib builds,
    fix loading HDR PNGs, but encoding them as 8-bit SDR,
    fix saving AVIF with alpha using the SVT-AV1 encoder,
    @kleisauke has modernized the JS wrapper (thanks!).

v1.17.0 - Many new compression formats and codecs

This release introduces support for new compression formats:

    JPEG in HEIF
    JPEG2000

It contains these new codec plugins:

    Kvazaar encoder (HEIC) as alternative to x265
    ffmpeg decoder (HEIC) decoding with potential hardware decoder support
    jpegdec, jpegenc codecs for JPEG in HEIF
    j2kdec, j2kenc codecs for JPEG-2000 in HEIF (still experimental)

Moreover:

    added support for region masks
    added support for alpha channels in images decoded with JS/WASM
    heif-enc and heif-convert can be called with only input filenames, input and output filename, or with -o option. This makes the use of the two commands more consistent.
    added 4:2:2 <-> 4:4:4 color conversion with bilinear upscaling / average filtering

Some more notable changes:

    heif_context_get_image_handle() can now also access non-top-level images
    add script to build Android libraries for all platforms
    again, known bugs have been fixed

Thank you everyone who contributed with code or issue reports.
Special thanks go to @bradh for work on the regions support and
the uncompressed codec, to @dukesook for his work on JPEG2000
support, to @palemieux for our discussions on interpreting the
JPEG2000-in-HEIF standard, to @Edi61 for providing the ffmpeg
decoder plugin, to @fancycode who will again do the Debian packaging,
and to @kmilos for continuously reporting and fixing compilation
and configuration issues.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Oct 19 15:08:32 2023 UTC (3 years ago) by wiz
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -2 lines
*: recursive bump for dav1d 1.3

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Jul 22 08:37:49 2023 UTC (3 years, 3 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2023Q3-base, pkgsrc-2023Q3
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -3 lines
libheif: fix build on Darwin, remove unused patch, cleanups

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Jul 11 22:36:43 2023 UTC (3 years, 4 months ago) by abs
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -1 lines
Add svt-av1 buildlink3.mk

Fixed build issue if svt-av1 is installed. Bump PKGREVISION

(Timeout from "OK to commit?" email sent 2023-05-09)

Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Jun 7 14:40:47 2023 UTC (3 years, 5 months ago) by ryoon
Branches: MAIN
CVS tags: pkgsrc-2023Q2-base, pkgsrc-2023Q2
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -1 lines
libheif: Disable rav1e option explicitly

If you have installed multimedia/rav1e, the build fails.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sun May 28 17:08:43 2023 UTC (3 years, 5 months ago) by wiz
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
libheif: update to 1.16.2.

This release

    adds an option to heif-convert to set the PNG compression level,
    fixes a few build issues with some compilers,
    fixes the --encoder option in heif-enc,
    fixes heif_item_get_properties_of_type and heif_item_get_transformation_properties.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun May 7 12:08:07 2023 UTC (3 years, 6 months ago) by wiz
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -3 lines
libheif: update to 1.16.1.

v1.16.1 - fix building gdk-pixbuf loader Latest

Small maintenance update that fixes building the gdk-pixbuf loader.
The source package name has also been changed back to the old naming scheme.

v1.16.0 - Regions / chroma quality / uncompressed codec

This is a large release with many new features.

    Support for HEIFv2 regions (rgan) and user annotations (udes). This enables to annotate regions in the image with several geometric primitives and assign user text descriptions to them. Thank you @bradh for the contributions. Mask support will be added soon.
    Previously, chroma was downsampled and upsampled with a simple nearest-neighbor method. We now included the sharp-yuv chroma downsampling algorithm. This gives improved image quality when images are downsampled to 4:2:0 and upsampled with bilinear interpolation. Thank you @maryla-uc for the contributions.
    The bilinear chroma upsampling and averaging downsampling algorithms are also new. You can choose what to use.
    We added experimental support for decoding uncompressed images according to ISO/IEC 23001-17:2023. This is work in progress and currently decoding only. Thank you @bradh for the contributions.
    There are new APIs to query the image transformations. Thus, you may choose to get the original image and apply the transformations yourself.
    A longstanding bug writing non-compliant 'ispe' boxes (image size) has been fixed. Files should be standard compliant now.
    When building binary packages, you can now make use of a CMake presets to set a default configuration.
    The deprecated autotools build files have been removed.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Mar 30 21:47:07 2023 UTC (3 years, 7 months ago) by wiz
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +3 -7 lines
libheif: enable dav1d

Remove gcc workaround, not needed on NetBSD 10.

Bump PKGREVISION.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Mar 30 21:41:50 2023 UTC (3 years, 7 months ago) by wiz
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +5 -7 lines
libheif: update to 1.15.2.

Switch to CMake since upstream will deprecate autoconf.
Remove merged patch.

v1.15.2 - maintenance release Latest

    Fixes an incompatibility with AOM v3.6.0.
    A couple of smaller fixes.

v1.15.1 - fix compilation without plugins

build fix only


v1.15.0 - Windows plugins / CLLI, MDCV, PASP boxes

    codec plugin system now also works with Windows
    heif_convert: manually choose which decoder should be used
    support for CLLI (content light level box), MDCV (mastering display colour volume), PASP (pixel aspect) information
    ICC profile support in gdk-pixbuf loader
    various fixes

v1.14.2 - maintenance

A function name typo in the C++ wrapper was corrected in v1.14.1, but the old function name should not have been removed from the API
(ColorProfile_nclx::set_color_primaries()). The old name is added to the API again in this release.

This is the only change in this update.

v1.14.1 - maintenance release

This release fixes

    various issues is the build system
    encoding images smaller than 64x64 with svt-av1
    the 'quality' parameter for svt-av1
    a potentially wrong image orientation for PNG inputs
    crash on non-null terminated XMP input
    HDR RGB to YCbCr conversion coefficients for limited range coefficients

1.14.0 - codec plugins / svt-av1 backend

    adds SVT-AV1 encoder as AVIF backend
    dynamic plugin interface for installing codecs independently from libheif (currently Unix only)
    add XMP header compression (using zlib)
    library should now be initialized with heif_init()
    heif_convert: extract EXIF and XMP to separate files
    heif_enc: add benchmarking function to compare codecs
    copy EXIF/XMP between HEIC/AVIF files and JPEG/PNG in all kinds of combinations
    remove EXIF orientation tag from input when converting to HEIC/AVIF and generate irot/imir boxes matching the input orientation

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Sep 9 15:35:16 2022 UTC (4 years, 2 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +2 -3 lines
libheif: update to 1.13.0.

    pay attention to the correct chroma sample positions
    heif_image now holds a list of decoding warnings
    use AOM AOM_USAGE_ALL_INTRA mode instead of AOM_USAGE_GOOD_QUALITY
    'strict' decoding mode with more checks for standard conformity of input
    support for EXIF data >64k in JPEG output
    proper library initialization and cleanup
    separate quality settings for alpha channel (AOM)
    improve color conversion speed (no lroundf)
    build and packaging fixes

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Oct 9 15:35:06 2021 UTC (5 years, 1 month ago) by nia
Branches: MAIN
CVS tags: pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +2 -1 lines
Recursive revbump for multimedia/libaom

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Jul 14 17:24:54 2021 UTC (5 years, 4 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +5 -2 lines
libheif: fix building with Clang

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu May 20 08:21:21 2021 UTC (5 years, 5 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2021Q2-base, pkgsrc-2021Q2
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -3 lines
libheif: update to 1.12.0.

    check for MIAF conformance and add as compatible brand
    signaling of premultiplied alpha
    parse AV1 obu_sequence_header for av1C box
    write pixi box in AVIFs
    save alpha as monochrome in AVIF if possible
    many build fixes (thanks to the numerous external contributors)

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Apr 12 08:29:59 2021 UTC (5 years, 7 months ago) by adam
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -1 lines
Revbump for multimedia/x265 update

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Feb 6 05:53:07 2021 UTC (5 years, 9 months ago) by ryoon
Branches: MAIN
CVS tags: pkgsrc-2021Q1-base, pkgsrc-2021Q1
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2 lines
libheif: Update to 1.11.0

Changelog:
    fix writing ispe box in HEIFs
    nclx output profile encoding parameters
    change the way nclx profiles is written so that macOS can read them
    API for listing file brands and checking file type
    fix heif_image_handle_get_depth_image_representation_info()

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Jan 4 11:06:21 2021 UTC (5 years, 10 months ago) by wiz
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -3 lines
libheif: update to 1.10.0.

v1.10.0 - read all auxiliary images, improve macOS compatibility

    new API: may access all (vendor-dependent) auxiliary images (e.g. hdrgainmap, semanticskinmatte, ...)
    change the way images with odd sizes are written so that macOS can read them
    when ICC profile is present, will now write two colr boxes (nclx and ICC) into AVIF files. Also reads files with two colr boxes
    alpha image is now saved as monochrome
    loading of 16bit greyscale PNGs in heif_enc
    heif_enc, option "-E" deprecated
    remove dependency on alloca()
    fix known bugs

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Nov 16 11:05:52 2020 UTC (6 years ago) by ryoon
Branches: MAIN
CVS tags: pkgsrc-2020Q4-base, pkgsrc-2020Q4
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -1 lines
libheif: Fix build under NetBSD/amd64 8

Disable -Werror=maybe-uninitialized for NetBSD.
Reported by gdt@. Thank you.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Oct 11 23:47:31 2020 UTC (6 years, 1 month ago) by joerg
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -1 lines
Do not pick up GCC's Go backend.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Sep 29 06:04:58 2020 UTC (6 years, 1 month ago) by triaxx
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -1 lines
libheif: Fix build on FreeBSD

pkgsrc changes:
---------------
  * Add preprocessor test for stdlib.h inclusion on FreeBSD
  * Bump revision

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Sep 28 13:38:13 2020 UTC (6 years, 1 month ago) by ryoon
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -2 lines
libheif: Update to 1.9.1

Changelog:
1.9.1
    fixed missing inline definition in C++ wrapper

1.9.0
    add dav1d decoder plugin for faster decoding of AVIF images
    support for images having both ICC and NCLX profiles
    save NCLX profiles to AV1/HEVC bitstreams and also read them from the bitstream
    add color profile API to C++ wrapper
    improve rounding in color conversions
    conformant encoding of AVIF images <16 pixels
    many fixes and small improvements

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Sep 3 19:07:59 2020 UTC (6 years, 2 months ago) by otis
Branches: MAIN
CVS tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +1 -3 lines
libheif: Remove stray erroneous line

Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Sep 3 19:07:19 2020 UTC (6 years, 2 months ago) by otis
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -2 lines
graphics/libheif: Fix build with gcc 7.5

Fix build on platforms with gcc 7.5, like SmartOS.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Mon Aug 31 17:24:12 2020 UTC (6 years, 2 months ago) by ryoon
Branches: MAIN
graphics/libheif: import libheif-1.8.0

libheif is an ISO/IEC 23008-12:2017 HEIF and AVIF (AV1 Image File
Format) file format decoder and encoder.

HEIF and AVIF are new image file formats employing HEVC (h.265) or
AV1 image coding, respectively, for the best compression ratios
currently possible.

libheif makes use of libde265 for HEIF image decoding and x265 for
encoding.  For AVIF, libaom is used as encoder and decoder.
Alternative codecs for, e.g., AVC and JPEG can be provided as
plugins.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>