Changeset 62029
- Timestamp:
- 03/14/2026 11:54:43 PM (8 weeks ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-avif-info.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-avif-info.php
r58049 r62029 10 10 * PATENTS file, you can obtain it at www.aomedia.org/license/patent. 11 11 * 12 * Note: this class is from libavifinfo - https://aomedia.googlesource.com/libavifinfo/+/refs/heads/main/avifinfo.php at f509487.12 * Note: this class is from libavifinfo - https://aomedia.googlesource.com/libavifinfo/+/refs/heads/main/avifinfo.php at 2b924de. 13 13 * It is used as a fallback to parse AVIF files when the server doesn't support AVIF, 14 14 * primarily to identify the width and height of the image. … … 110 110 public $primary_item_features = array( // Deduced from the data below. 111 111 'width' => UNDEFINED, // In number of pixels. 112 'height' => UNDEFINED, // Ignores mirrorand rotation.112 'height' => UNDEFINED, // Ignores crop and rotation. 113 113 'bit_depth' => UNDEFINED, // Likely 8, 10 or 12 bits per channel per pixel. 114 114 'num_channels' => UNDEFINED // Likely 1, 2, 3 or 4 channels: … … 257 257 $this->size = read_big_endian( substr( $data, 4, 4 ), 4 ); 258 258 } else if ( $this->size == 0 ) { 259 // ISO/IEC 14496-12 4.2.2: 260 // if size is 0, then this box shall be in a top-level box 261 // (i.e. not contained in another box) 262 // Unfortunately the presence of a parent box is unknown here. 259 263 $this->size = $num_remaining_bytes; 260 264 } … … 265 269 return INVALID; 266 270 } 271 272 // 16 bytes of usertype should be read here if the box type is 'uuid'. 273 // 'uuid' boxes are skipped so usertype is part of the skipped body. 267 274 268 275 $has_fullbox_header = $this->type == 'meta' || $this->type == 'pitm' || … … 303 310 // Instead of considering this file as invalid, skip unparsable boxes. 304 311 if ( !$is_parsable ) { 305 $this->type = ' unknownversion';312 $this->type = 'skip'; // FreeSpaceBox. To be ignored by readers. 306 313 } 307 314 } … … 484 491 * Parses an "iprp" box. 485 492 * 486 * The "ipco" box contain the properties which are linked to items by the "ipma" box.493 * The "ipco" box contains the properties which are linked to items by the "ipma" box. 487 494 * 488 495 * @param stream $handle The resource the box will be parsed from. … … 597 604 */ 598 605 private function parse_iref( $num_remaining_bytes ) { 599 do{606 while ( $num_remaining_bytes > 0 ) { 600 607 $box = new Box(); 601 608 $status = $box->parse( $this->handle, $this->num_parsed_boxes, $num_remaining_bytes ); … … 657 664 } 658 665 $num_remaining_bytes -= $box->size; 659 } while ( $num_remaining_bytes > 0 );666 } 660 667 return NOT_FOUND; 661 668 }
Note: See TracChangeset
for help on using the changeset viewer.