Commit Graph

21 Commits

Author SHA1 Message Date
Mark Jaquith 101031bcf4 @-silence an Imagick call that causes a warning in PHP 5.4.
props DH-Shredder. fixes #24539.

git-svn-id: https://develop.svn.wordpress.org/trunk@24568 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-05 18:43:45 +00:00
Andrew Nacin 88c8a08129 Image editors: multi_resize() should require height and width. Crop is now optional and defaults to false. props DH-Shredder. fixes #23884.
git-svn-id: https://develop.svn.wordpress.org/trunk@24055 602fd350-edb4-49c9-b593-d223f7449a82
2013-04-22 20:28:05 +00:00
Ryan Boren 0da872a785 Clarify phpdoc for the vertical and horizontal arguments to the flip() method in WP_Image_Editor*.
Props dh-shredder
fixes #23775


git-svn-id: https://develop.svn.wordpress.org/trunk@23750 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-19 03:30:04 +00:00
Andrew Nacin f9d1ca1da4 Only unset() after we have confirmed we are not dealing with a WP_Error. props DH-Shredder. fixes #22824.
git-svn-id: https://develop.svn.wordpress.org/trunk@23133 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-09 17:02:22 +00:00
Andrew Nacin 2413f5f58e Image editors: After cropping, request new sizes from the image. If we rely on the values passed in, they may be floats. We must see what the image results in.
Cast in update_size() for sanity.

props DH-Shredder.
fixes #22779.



git-svn-id: https://develop.svn.wordpress.org/trunk@23103 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 07:56:04 +00:00
Andrew Nacin a033ad1ab2 Image editor doc fixes. props DH-Shredder. see #6821.
git-svn-id: https://develop.svn.wordpress.org/trunk@23038 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-04 19:42:28 +00:00
Ryan Boren ecb18ffc05 Increase the PHP memory_limit to WP_MAX_MEMORY_LIMIT in WP_Image_Editor_Imagick.
Props DH-Shredder
fixes #22699


git-svn-id: https://develop.svn.wordpress.org/trunk@22997 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 19:44:58 +00:00
Andrew Nacin c121dfb0fc Explicitly check for version 2.2.0 or higher of the Imagick PHP module, to ensure we can call queryFormats() statically. props DH-Shredder, fixes #22308.
git-svn-id: https://develop.svn.wordpress.org/trunk@22904 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-28 21:41:44 +00:00
Ryan Boren 31c86e27c2 Clean up WP_Image_Editor_Imagick::test(). Props DH-Shredder. see #22543
git-svn-id: https://develop.svn.wordpress.org/trunk@22864 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 14:52:24 +00:00
Ryan Boren 40f11fff98 More feature detection in WP_Image_Editor_Imagick::test().
Check existence of setIteratorIndex().

Props DH-Shredder, markoheijnen
see #22543



git-svn-id: https://develop.svn.wordpress.org/trunk@22849 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 22:40:34 +00:00
Andrew Nacin f44d1d009e WP_Image_Editor: the last stand.
* Have wp_get_image_editor() rather than WP_Image_Editor::get_instance(). Having static factory methods would be less confusing if there weren't also static methods tied to individual editor implementations.
 * Lazy-load the WP_Image_Editor base class and editor implementations.
 * Have WP_Image_Editor_GD::supports_mime_type() actually check which types it supports.
 * Deprecate gd_edit_image_support() in favor of wp_image_editor_supports().

props DH-Shredder, scribu, markoheijnen. fixes #22356. see #6821.



git-svn-id: https://develop.svn.wordpress.org/trunk@22817 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 09:52:16 +00:00
Ryan Boren d5c96a1e8b Add abstract methods back to WP_Image_Editor and refresh phpdoc.
Props DH-Shredder, markoheijnen, kurtpayne, nacin
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22619 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-16 22:02:21 +00:00
Andrew Nacin d1e099ce09 Require Imagick 2.1.1 or greater, based on whether the queryFormats() method can be called statically.
props markoheijnen, DH-Shredder. fixes #22308.



git-svn-id: https://develop.svn.wordpress.org/trunk@22581 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-14 22:19:32 +00:00
Andrew Nacin 4bbe50bf7d Revert [22421]. see #6821. see #22308. see #22419.
git-svn-id: https://develop.svn.wordpress.org/trunk@22549 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-12 07:47:41 +00:00
Ryan Boren 5f92c0e7f4 Pass an attachment ID, not a file path, to _load_image_to_edit_path() from wp_crop_image(). This fixes handling of attachments that require url fopen to access the image.
Allow passing urls instead of just file paths to WP_Image_Editor_Imagick::load() and WP_Image_Editor_GD::load() so that attachments requiring URL fopen can be handled.

see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22538 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 20:42:27 +00:00
Ryan Boren e678b95a5a WP_Image_Editor improvements.
* Make test() and supports_mime_type() static.
* Add required_methods argument to get_instance(). Allows requesting an implementation that has certain methods/capabilities.
* Whitespace cleanup

Props markoheijnen
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22510 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 19:38:54 +00:00
Andrew Nacin 5395736356 In WP_Image_Editor / wp_load_image(), use is_file() rather than file_exists() so we do not accidentally load a directory.
props benkulbertis, DH-Shredder, scribu.
fixes #17814.



git-svn-id: https://develop.svn.wordpress.org/trunk@22463 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 02:02:03 +00:00
Ryan Boren 08a2d93b7c Call Imagick::queryformats() non-statically to preserve back compat with older versions of Imagick.
Props mpvanwinkle77
fixes #22308
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22421 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 17:50:38 +00:00
Ryan Boren a664c2d080 Avoid Strict Standards warnings. Props markoheijnen. see #6821
git-svn-id: https://develop.svn.wordpress.org/trunk@22119 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 21:59:36 +00:00
Andrew Nacin 52d0e40010 Don't declare the argument as optional for WP_Image_Editor_Imagick::supports_mime_type(), avoiding an error with inheritance. props SergeyBiryukov, fixes #22073.
git-svn-id: https://develop.svn.wordpress.org/trunk@22098 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-02 03:33:07 +00:00
Ryan Boren 7790af3154 Introduce WP_Image_Editor, WP_Image_Editor_Imagick, and WP_Image_Editor_GD. Abstracts image editing API and adds support for ImageMagick.
Props DH-Shredder, kurtpayne, markoheijnen
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22094 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 20:59:06 +00:00