php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71283 resizeImage fails when bestfit is true
Submitted: 2016-01-05 13:04 UTC Modified: 2016-01-13 00:19 UTC
From: mj at munio dot no Assigned: danack (profile)
Status: Closed Package: imagick (PECL)
PHP Version: 7.0.1 OS: Windows 10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mj at munio dot no
New email:
PHP Version: OS:

 

 [2016-01-05 13:04 UTC] mj at munio dot no
Description:
------------
The resizeImage() function is broken in RC3 and RC4 when $bestfit parameter is set to true. This is working in RC2.

The error given is: 'Invalid image geometry'

I am running PHP 7.0.1 VC14 x64 Non Thread Safe

Test script:
---------------
$img = new Imagick($file->getRealPath());

$bestfit = true;
$img->resizeImage(100, 100, 1, 1, $bestfit);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-05 16:18 UTC] danack@php.net
-Status: Open +Status: Feedback
 [2016-01-05 16:18 UTC] danack@php.net
Can you provide an example image this happens for? There is a small chance it is related to the exact size or other properties of the image.

I am unable to replicate the issue.
 [2016-01-05 16:50 UTC] danack@php.net
btw if there is a problem, it is likely to be one of these two commits:

https://github.com/mkoppanen/imagick/commit/df7d59c0a6b6c9b397bfe8322b2b0d7cf5a28aeb
https://github.com/mkoppanen/imagick/commit/88e557b23c054c23a414a566ac54c28f12db9611

However a manual inspection or testing isn't showing an error.
 [2016-01-11 23:25 UTC] danack@php.net
This should be fixed now in Imagick 3.4.0RC5.
 [2016-01-12 08:22 UTC] mj at munio dot no
Tested RC5 and the problem is fixed. Thank you Dan.
 [2016-01-13 00:19 UTC] danack@php.net
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: danack
 [2016-01-13 00:19 UTC] danack@php.net
Great success.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 11:01:32 2025 UTC