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.
- process all your images per default in Photoshop.
- install ImageMagick
http://www.imagemagick.org/script/index.php
- 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
- 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.