[wp-trac] [WordPress Trac] #48788: Run time crop image not working using wp_get_image_editor
WordPress Trac
noreply at wordpress.org
Mon Nov 25 14:16:27 UTC 2019
#48788: Run time crop image not working using wp_get_image_editor
--------------------------+-----------------------------
Reporter: ahmed17 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.3
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
it's not working run time crop image
{{{#!php
<?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
<?php
$editor->crop($srcX, $srcY, $srcW, $srcH, $destWidth, $destHeight);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48788>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list