jorgebastida / glue

Glue is a simple command line tool to generate CSS sprites
http://glue.readthedocs.org
BSD 3-Clause "New" or "Revised" License
2.55k stars 170 forks source link

Anti-aliasing issues on retina #159

Open litchfield opened 10 years ago

litchfield commented 10 years ago

I'm seeing severe anti-aliasing issues on the edges of transparent png sprites that have been shrunk for the lower ratio versions in retina mode

Is there a way to control the anti-aliasing algorithm being used?

litchfield commented 10 years ago

Also. When using multiple ratios, do I need to ensure all source image dimensions are divisible by the target ratios? Eg for retina, width/height of source images should be even numbers?

Or does glue automatically append whitespace to ensure a clean shrink? So for retina, odd dimensions might automatically pad by one pixel.

litchfield commented 10 years ago

sprite sprite 2x

litchfield commented 10 years ago

Notice the hideous grey lines on the edges of the reduced images.

pixelbreaker commented 10 years ago

I'm also seeing this, any ideas?

pixelbreaker commented 10 years ago

I've fixed this for me. Try running glue --version see what you have. I only had 0.3!!!

As I'm on mavericks, I had to run sudo env ARCHFLAGS='-arch i386 -arch x86_64' pip install glue --upgrade to get it to upgrade. Non-retina anti-aliasing is all fine for me now.

litchfield commented 10 years ago

Hmm, I'm on mavericks too.

glue==0.9.4 Pillow==2.4.0 PIL==1.1.7

libpng: stable 1.5.14 (bottled)

Alldar commented 9 years ago

Has anyone solved this problem?