Antialiasing issues


#1

Hello,

I’m trying to crop all of these assets for a website. They are rectangles with inner strokes applied to them. For some reason my crops are recognizing the faintest antialiasing and therefore a lot of them have a 1 pixel by row or column of crap or the upperleft corner will be white instead of a corner.

Any way around this besides hand cropping?

Thanks,

spiralof5


#2

not really sure i understand. could you post a pic?


#3

Put a stroke around the outside of the image so that when you crop the image there is no whitespace or extraneous pixels.

-OR-

If your image is currently against white or there is no background - put a black background there temporarily when you save out your JPGs, PNGs or GIFs.


#4

hmmm, so the inside stroke is sucking it up heh? I’ll try outside stroke then and let ya know…


#5

doesn’t work.

Maybe just a growing pain but I’ve never really had to deal with this before.


#6

Hmm, not sure - I did some tests, and it seems PH adds an extra column/row that is the result of anti-aliasing the stroke when trimming. On a white background, the outer black rim reads 33, caused by the semi-transparency going on. I was not able to get rid of this…

…at least, not in Photoshop. On further examination, I was able to get rid of the extra row and column by switching to Fireworks, importing the psd, and using FW’s trim command. And that worked like a charm - no extra anti-aliased junk. Which proves yet again that the Macromedia guys knew what they were talking (programming) about in regards to web graphics.

However… Fireworks will not let you do a batch command with any trimming involved.

But, have no fear, there IS an automatic solution.

  1. process all your images per default in Photoshop.
  2. install ImageMagick
    http://www.imagemagick.org/script/index.php
  3. run an ImageMagick batch command on all images to shave off 1 px on all sides. Or use the trim command (which would mean keeping some margins in PH).
    http://www.imagemagick.org/Usage/
    http://www.imagemagick.org/Usage/crop/#trim
  4. done!

Unfortunately, it does involve getting your hands dirty on some good ol’ fashioned command line bashing. It will still save you a lot of work and time this way.


#7

Did something similar just the other day with ThumbPlus batch editing. No scripts ;-).


#8

Wow, ThumbsPlus is expensive! Their site hides the pricing well. ImageMagick does more, but free (I regard scripting as an advantage in this case - more control over batches). IDimager would be a much better commercial alternative - about same price, and way more features.

IrfanView also offers a batch function that includes trimming and adding borders (even negative ones). And it is free, offering most (if not all) functions of ThumbsPlus.

Just my two cents.


#9

I was going to suggest Fireworks - but a lot of peeps who use Photoshop just don’t know that program. I know that hands down it does a better job at creating images or saving them out for web.


#10

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.