Avifinfo
Features::get_primary_item_features()
Finds the width, height, bit depth and number of channels of the primary item.
Метод класса: Features{}
Хуков нет.
Возвращает
Status
. FOUND on success or NOT_FOUND on failure.
Использование
$Features = new Features(); $Features->get_primary_item_features();
Код Features::get_primary_item_features() Features::get primary item features WP 6.6.2
public function get_primary_item_features() { // Nothing to do without the primary item ID. if ( !$this->has_primary_item ) { return NOT_FOUND; } // Early exit. if ( empty( $this->dim_props ) || empty( $this->chan_props ) ) { return NOT_FOUND; } $status = $this->get_item_features( $this->primary_item_id, /*tile_depth=*/ 0 ); if ( $status != FOUND ) { return $status; } // "auxC" is parsed before the "ipma" properties so it is known now, if any. if ( $this->has_alpha ) { ++$this->primary_item_features['num_channels']; } return FOUND; }