WordPress.org

Make WordPress Core

Opened 11 days ago

#48788 new defect (bug)

Run time crop image not working using wp_get_image_editor

Reported by: ahmed17 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3
Component: Media Keywords:
Focuses: Cc:
PR Number:

Description

it's not working run time crop image

<?php
$editor = wp_get_image_editor($filePath);

$editor->set_quality($quality);

$editor->crop($srcX, $srcY, $srcW, $srcH, $destWidth, $destHeight);

$saved = $editor->save($destFileName);

=============================
Problem for "$editor->crop()" while source image size is smaller than destination image size.

<?php
$editor->crop($srcX, $srcY, $srcW, $srcH, $destWidth, $destHeight);

Change History (0)

Note: See TracTickets for help on using tickets.