Changeset 31040 for trunk/tests/phpunit/tests/image/editor_imagick.php
- Timestamp:
- 01/03/2015 10:01:54 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/editor_imagick.php
r30990 r31040 508 508 unlink( $save_to_file ); 509 509 } 510 511 /** 512 * 513 * @ticket 30596 514 */ 515 public function test_image_peserves_alpha_on_rotate() { 516 $file = DIR_TESTDATA . '/images/transparent.png'; 517 518 $pre_rotate_editor = new Imagick( $file ); 519 $pre_rotate_pixel = $pre_rotate_editor->getImagePixelColor( 0, 0 ); 520 $pre_rotate_alpha = $pre_rotate_pixel->getColorValue( imagick::COLOR_ALPHA ); 521 $save_to_file = tempnam( get_temp_dir(),'' ) . '.png'; 522 $pre_rotate_editor->writeImage( $save_to_file ); 523 $pre_rotate_editor->destroy(); 524 525 $image_editor = new WP_Image_Editor_Imagick( $save_to_file ); 526 $image_editor->load(); 527 $this->assertNotInstanceOf( 'WP_Error', $image_editor ); 528 $image_editor->rotate( 180 ); 529 $image_editor->save( $save_to_file ); 530 531 $this->assertImageAlphaAtPointImagick( $save_to_file, array( 0, 0 ), $pre_rotate_alpha ); 532 unlink( $save_to_file ); 533 } 510 534 }
Note: See TracChangeset
for help on using the changeset viewer.