Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#48788 new defect (bug)

Run time crop image not working using wp_get_image_editor

Reported by: ahmed17's profile ahmed17 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3
Component: Media Keywords: reporter-feedback
Focuses: Cc:

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 (2)

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


5 years ago

#2 @antpb
5 years ago

  • Keywords reporter-feedback added

Hello @ahmed17 ! Thanks so much for submitting your first ticket!

This ticket came up in a recent Media triage and there was a bit of clarity needed around what the expected behavior is vs what is happening for you currently. If you could provide a summary of what is expected and what is happening that would be most helpful. I’m adding the reporter-feedback tag to this ticket so we can keep track that we are expecting more information still before moving this task forward.

Thanks again!

Note: See TracTickets for help on using tickets.