apply_filters( ‘image_max_bit_depth’, int $max_depth, int $image_depth )

In this article

Filters the maximum bit depth of resized images.

Description

This filter only applies when resizing using the Imagick editor since GD does not support getting or setting bit depth.

Use this to adjust the maximum bit depth of resized images.

Parameters

$max_depthint
The maximum bit depth. Default is the input depth.
$image_depthint
The bit depth of the original image.

Source

$max_depth = apply_filters( 'image_max_bit_depth', $this->image->getImageDepth(), $this->image->getImageDepth() );

Changelog

VersionDescription
6.8.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.