Plugin Directory

Changeset 380081


Ignore:
Timestamp:
05/03/2011 07:49:52 AM (15 years ago)
Author:
orangelab
Message:

Fix bug in resize-all handling, tag version 1.2.3

Location:
imagemagick-engine
Files:
2 added
2 deleted
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • imagemagick-engine/tags/1.2.3/imagemagick-engine.php

    r377749 r380081  
    66  Author: Orangelab
    77  Author URI: http://www.orangelab.se
    8   Version: 1.2.2
     8  Version: 1.2.3
    99  Text Domain: imagemagick-engine
    1010
     
    4040 * - handle TIF and other IM formats if possible
    4141 * - can we use IM instead of GD in more places?
     42 * - custom crop of images instead of blindly going for the middle
    4243 */
    4344
     
    107108         */
    108109        if (ime_script_version_compare('jquery-ui-core', '1.8', '>=')) {
    109             wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.8.7.js', __FILE__), array('jquery-ui-core', 'jquery-ui-widget'), '1.8.7');
     110            wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.8.9.js', __FILE__), array('jquery-ui-core', 'jquery-ui-widget'), '1.8.9');
    110111        } else {
    111112            wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.7.2.js', __FILE__), array('jquery-ui-core'), '1.7.2');
     
    293294    else
    294295        $new_ext = "jpg";
    295 
     296   
    296297    /*
    297298     * Do the actual resize
     
    323324                          , 'height' => $dst_h
    324325                          );
     326
     327        if (!isset($metadata['image-converter']) || !is_array($metadata['image-converter']))
     328            $metadata['image-converter'] = array();
     329       
    325330        $metadata['image-converter'][$size] = 'IME';
    326331
     
    583588    $metadata = wp_get_attachment_metadata($id);
    584589
    585     if (!$force) {
     590    // Do not re-encode IME images unless forced
     591    if (!$force && isset($metadata['image-converter']) && is_array($metadata['image-converter'])) {
     592        $converter = $metadata['image-converter'];
     593       
    586594        foreach ($sizes AS $s => $ignore) {
    587             if ($metadata['image-converter'][$s] == 'IME')
     595            if (isset($converter[$s]) && $converter[$s] == 'IME')
    588596                unset($sizes[$s]);
    589597        }
  • imagemagick-engine/tags/1.2.3/readme.txt

    r377749 r380081  
    44Requires at least: 2.9
    55Tested up to: 3.1.2
    6 Stable tag: 1.2.2
     6Stable tag: 1.2.3
    77
    88Improve the quality of re-sized images by replacing standard GD library with ImageMagick.
     
    7575== Changelog ==
    7676
     77= 1.2.3 =
     78* Fix bug in resize all images handling, also remove some PHP notices. Thanks to Andreas Kleinschmidt for the report
     79* Upgrade jQuery UI Progressbar to version 1.8.9, to match version of UI Core in WordPress
     80
    7781= 1.2.2 =
    7882* Fixed filepath with spaces on Windows
  • imagemagick-engine/trunk/imagemagick-engine.php

    r377749 r380081  
    66  Author: Orangelab
    77  Author URI: http://www.orangelab.se
    8   Version: 1.2.2
     8  Version: 1.2.3
    99  Text Domain: imagemagick-engine
    1010
     
    4040 * - handle TIF and other IM formats if possible
    4141 * - can we use IM instead of GD in more places?
     42 * - custom crop of images instead of blindly going for the middle
    4243 */
    4344
     
    107108         */
    108109        if (ime_script_version_compare('jquery-ui-core', '1.8', '>=')) {
    109             wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.8.7.js', __FILE__), array('jquery-ui-core', 'jquery-ui-widget'), '1.8.7');
     110            wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.8.9.js', __FILE__), array('jquery-ui-core', 'jquery-ui-widget'), '1.8.9');
    110111        } else {
    111112            wp_register_script('jquery-ui-progressbar', plugins_url('/js/ui.progressbar-1.7.2.js', __FILE__), array('jquery-ui-core'), '1.7.2');
     
    293294    else
    294295        $new_ext = "jpg";
    295 
     296   
    296297    /*
    297298     * Do the actual resize
     
    323324                          , 'height' => $dst_h
    324325                          );
     326
     327        if (!isset($metadata['image-converter']) || !is_array($metadata['image-converter']))
     328            $metadata['image-converter'] = array();
     329       
    325330        $metadata['image-converter'][$size] = 'IME';
    326331
     
    583588    $metadata = wp_get_attachment_metadata($id);
    584589
    585     if (!$force) {
     590    // Do not re-encode IME images unless forced
     591    if (!$force && isset($metadata['image-converter']) && is_array($metadata['image-converter'])) {
     592        $converter = $metadata['image-converter'];
     593       
    586594        foreach ($sizes AS $s => $ignore) {
    587             if ($metadata['image-converter'][$s] == 'IME')
     595            if (isset($converter[$s]) && $converter[$s] == 'IME')
    588596                unset($sizes[$s]);
    589597        }
  • imagemagick-engine/trunk/readme.txt

    r377749 r380081  
    44Requires at least: 2.9
    55Tested up to: 3.1.2
    6 Stable tag: 1.2.2
     6Stable tag: 1.2.3
    77
    88Improve the quality of re-sized images by replacing standard GD library with ImageMagick.
     
    7575== Changelog ==
    7676
     77= 1.2.3 =
     78* Fix bug in resize all images handling, also remove some PHP notices. Thanks to Andreas Kleinschmidt for the report
     79* Upgrade jQuery UI Progressbar to version 1.8.9, to match version of UI Core in WordPress
     80
    7781= 1.2.2 =
    7882* Fixed filepath with spaces on Windows
Note: See TracChangeset for help on using the changeset viewer.