WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#24871 closed defect (bug) (fixed)

Imagick Preserve Alpha Unit Tests Broken

Reported by: bpetty Owned by: boonebgorges
Milestone: 4.1 Priority: low
Severity: minor Version: 3.5.2
Component: Media Keywords: has-patch
Focuses: Cc:

Description

I'm still not entirely sure why the following two tests aren't working correctly, however, alpha in the resulting files they are testing for do in fact preserve alpha correctly.

  1. Tests_Image_Editor_Imagick::test_image_preserves_alpha_on_resize
  2. Tests_Image_Editor_Imagick::test_image_preserves_alpha

It might be helpful though to at least update the code in WP_Image_UnitTestCase::assertImageAlphaAtPoint() to implement this in each editor engine so the Imagick tests actually use Imagick to check for alpha instead of GD, and in the process, that might resolve this.

Attachments (2)

24871.diff (2.4 KB) - added by voldemortensen 6 years ago.
24871(1).diff (3.6 KB) - added by voldemortensen 6 years ago.

Download all attachments as: .zip

Change History (11)

#1 @markoheijnen
7 years ago

I think it's broken in some versions of imagemagick but I'm not sure. Currently I do think some stuff needs to be rewritten but I haven't had the change yet to do so.

#2 @nacin
7 years ago

  • Component changed from Unit Tests to Media

#3 @wonderboymusic
6 years ago

  • Milestone changed from Awaiting Review to Future Release

This ticket was mentioned in Slack in #core by boone. View the logs.


6 years ago

This ticket was mentioned in Slack in #core by voldemortensen. View the logs.


6 years ago

@voldemortensen
6 years ago

#6 @voldemortensen
6 years ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in Slack in #core by voldemortensen. View the logs.


6 years ago

#8 @boonebgorges
6 years ago

  • Milestone changed from Future Release to 4.1

#9 @boonebgorges
6 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 30549:

Fix the unit tests for Imagick alpha.

These tests were written to use the assertImageAtAlpha() helper method, whose
internals were specific to GD. As a result, the tests could not pass. This
changeset introduces GD- and Imagick-specific versions of this method.

Props voldemortensen.
Fixes #24871.

Note: See TracTickets for help on using tickets.