#62 closed defect (fixed)

Photon creates artifacts when scaling images with transparency

Reported by: koke Owned by:
Priority: major Component: photon
Keywords: Cc:


If you have a circle with antialiasing on a transparent background and scale it down a darker border will appear.

After some investigation, it seems to be GraphicMagick's fault so I reported a bug there #381. Their suggestion was to switch from scaleimage to resizeimage, and that seems to work better.

Attachments (3)

photon-resize-before.png (62.3 KB) - added by koke 21 months ago.
photon-resize-after.png (65.3 KB) - added by koke 21 months ago.
patch-photon-resizeimage.diff (529 bytes) - added by koke 21 months ago.

Download all attachments as: .zip

Change History (5)

Changed 21 months ago by koke

Changed 21 months ago by koke

Changed 21 months ago by koke

comment:1 Changed 21 months ago by koke

Either I can't modify the description or I forgot how to use Trac ;)

Before the patch:

After the patch:

The test image is https://s0.wordpress.com/i/store/plan-premium.png

I've also attached the patch. I only changed set_width and set_height as I'm not sure if this would have side effects for the other methods that currently use scaleimage. Also, I picked Gmagick::FILTER_LANCZOS as it seems that's what GM uses by default if no filter is specified.

comment:2 Changed 20 months ago by darthhexx

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

This was fixed in r399.

Note: See TracTickets for help on using tickets.