Filters whether to preempt calculating the image resize dimensions. Returning a non-null value from the filter will effectively short-circuit image_resize_dimensions(), returning that value instead.
$file, $width, $height, $crop = false
Sortie :
@param null|mixed $null Whether to preempt output of the resize dimensions.
@param int $orig_w Original width in pixels.
@param int $orig_h Original height in pixels.
@param int $dest_w New width in pixels.
@param int $dest_h New height in pixels.
@param bool|array $crop Whether to crop image to specified width and height or resize.
@param bool $proceed The filtered value.
@param int $orig_w Original image width.
@param int $orig_h Original image height.
@param string $file File path.
@param int $width Image width.
@param int $height Image height.
@param bool|array $crop {
@return array|false Metadata array on success. False if no image was created.
// Utilisation de la fonction image_make_intermediate_size
$result = image_make_intermediate_size($file, $width, $height, $crop = false);
if ($result) {
// Votre logique ici
}
Chargement des actualités...