- Timestamp:
- 02/08/2021 08:57:54 PM (4 years ago)
- Location:
- branches/3.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
- Property svn:mergeinfo changed
/branches/5.0 merged: 43836 /trunk merged: 44176,45445,45745,45762,45783-45784,45800,45819,45885,46320,46999,47225,47912,48121,49267,49335,49358,49360,49362
- Property svn:mergeinfo changed
-
branches/3.8/tests/phpunit/tests/image/editor_imagick.php
r47338 r50250 39 39 /** 40 40 * Check support for Image Magick compatible mime types. 41 * 41 * 42 42 */ 43 43 public function test_supports_mime_type() { … … 52 52 /** 53 53 * Test resizing an image, not using crop 54 * 54 * 55 55 */ 56 56 public function test_resize() { … … 68 68 /** 69 69 * Test resizing an image including cropping 70 * 70 * 71 71 */ 72 72 public function test_resize_and_crop() { … … 151 151 $editor->resize(5,5); 152 152 $save_to_file = tempnam( get_temp_dir(), '' ) . '.png'; 153 153 154 154 $editor->save( $save_to_file ); 155 155 156 $this->assertImageAlphaAtPoint( $save_to_file, array( 0,0 ), 127 ); 156 $im = new Imagick( $save_to_file ); 157 $pixel = $im->getImagePixelColor( 0, 0 ); 158 $expected = $pixel->getColorValue( imagick::COLOR_ALPHA ); 159 160 $this->assertImageAlphaAtPointImagick( $save_to_file, array( 0,0 ), $expected ); 157 161 158 162 unlink( $save_to_file ); 159 163 } 160 164 161 165 /** 162 166 * Test the image created with WP_Image_Edior_Imagick preserves alpha with no resizing etc … … 175 179 $editor->save( $save_to_file ); 176 180 177 $this->assertImageAlphaAtPoint( $save_to_file, array( 0,0 ), 127 ); 181 $im = new Imagick( $save_to_file ); 182 $pixel = $im->getImagePixelColor( 0, 0 ); 183 $expected = $pixel->getColorValue( imagick::COLOR_ALPHA ); 184 185 $this->assertImageAlphaAtPointImagick( $save_to_file, array( 0,0 ), $expected ); 178 186 179 187 unlink( $save_to_file );
Note: See TracChangeset
for help on using the changeset viewer.