ImageMagick Engine - Version 1.6.4

Version Description

  • Critical bugfix for .jpeg files
Download this release

Release Info

Developer rickardw
Plugin Icon 128x128 ImageMagick Engine
Version 1.6.4
Comparing to
See all releases

Code changes from version 1.6.3 to 1.6.4

Files changed (2) hide show
  1. imagemagick-engine.php +3 -10
  2. readme.txt +4 -1
imagemagick-engine.php CHANGED
@@ -5,7 +5,7 @@
5
  Description: Improve the quality of re-sized images by replacing standard GD library with ImageMagick
6
  Author: Orangelab
7
  Author URI: https://orangelab.com/
8
- Version: 1.6.3
9
  Text Domain: imagemagick-engine
10
 
11
  Copyright @ 2020 Orangelab AB
@@ -35,7 +35,7 @@ if ( ! defined( 'ABSPATH' ) ) {
35
  * Constants
36
  */
37
  define( 'IME_OPTION_VERSION', 1 );
38
- define( 'IME_VERSION', '1.6.3' );
39
 
40
  /*
41
  * Global variables
@@ -334,18 +334,11 @@ function ime_filter_attachment_metadata( $metadata, $attachment_id ) {
334
 
335
  /*
336
  * Sort out the filename, extension (and image type) of resized images
337
- *
338
- * If image type is PNG or GIF keep it, otherwise make sure it is JPG
339
  */
340
  $info = pathinfo( $ime_image_file );
341
  $dir = $info['dirname'];
342
  $ext = $info['extension'];
343
  $namebase = basename( $ime_image_file, ".{$ext}" );
344
- if ( $orig_type == IMAGETYPE_PNG || $orig_type == IMAGETYPE_GIF ) {
345
- $new_ext = $ext;
346
- } else {
347
- $new_ext = 'jpg';
348
- }
349
 
350
  /*
351
  * Do the actual resize
@@ -368,7 +361,7 @@ function ime_filter_attachment_metadata( $metadata, $attachment_id ) {
368
  list($dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) = $dims;
369
 
370
  $suffix = "{$dst_w}x{$dst_h}";
371
- $new_filename = "{$dir}/{$namebase}-{$suffix}.{$new_ext}";
372
 
373
  $resized = ime_im_resize( $ime_image_file, $new_filename, $dst_w, $dst_h, $crop, ime_get_resize_mode( $size ) );
374
  if ( ! $resized ) {
5
  Description: Improve the quality of re-sized images by replacing standard GD library with ImageMagick
6
  Author: Orangelab
7
  Author URI: https://orangelab.com/
8
+ Version: 1.6.4
9
  Text Domain: imagemagick-engine
10
 
11
  Copyright @ 2020 Orangelab AB
35
  * Constants
36
  */
37
  define( 'IME_OPTION_VERSION', 1 );
38
+ define( 'IME_VERSION', '1.6.4' );
39
 
40
  /*
41
  * Global variables
334
 
335
  /*
336
  * Sort out the filename, extension (and image type) of resized images
 
 
337
  */
338
  $info = pathinfo( $ime_image_file );
339
  $dir = $info['dirname'];
340
  $ext = $info['extension'];
341
  $namebase = basename( $ime_image_file, ".{$ext}" );
 
 
 
 
 
342
 
343
  /*
344
  * Do the actual resize
361
  list($dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) = $dims;
362
 
363
  $suffix = "{$dst_w}x{$dst_h}";
364
+ $new_filename = "{$dir}/{$namebase}-{$suffix}.{$ext}";
365
 
366
  $resized = ime_im_resize( $ime_image_file, $new_filename, $dst_w, $dst_h, $crop, ime_get_resize_mode( $size ) );
367
  if ( ! $resized ) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: rickardw, orangelab
3
  Tags: image, images, picture, imagemagick, gd
4
  Requires at least: 3.0
5
  Tested up to: 5.4.1
6
- Stable tag: 1.6.3
7
 
8
  Improve the quality of re-sized images by replacing standard GD library with ImageMagick.
9
 
@@ -74,6 +74,9 @@ You'll probably have problems with various other plugins too unless you fix this
74
 
75
  == Changelog ==
76
 
 
 
 
77
  = 1.6.3 =
78
  * Clean up code and constant for version (thanks @paulschreiber)
79
  * Disable warning for is_executable if open_basedir active
3
  Tags: image, images, picture, imagemagick, gd
4
  Requires at least: 3.0
5
  Tested up to: 5.4.1
6
+ Stable tag: 1.6.4
7
 
8
  Improve the quality of re-sized images by replacing standard GD library with ImageMagick.
9
 
74
 
75
  == Changelog ==
76
 
77
+ = 1.6.4 =
78
+ * Critical bugfix for .jpeg files
79
+
80
  = 1.6.3 =
81
  * Clean up code and constant for version (thanks @paulschreiber)
82
  * Disable warning for is_executable if open_basedir active