ID Mask - pixel gap when images comped externally

I need help with using ID Masks in the compositor. I have rendered out objects in a scene with ID Masks so that they are all in separate PNG files with transparent backgrounds. To be composited together on a website. I have done this before and it worked fine. I just did this and find that when comped together (tested in Photoshop) there is a 1 pixel gap all the way around each object. This is not acceptable and is a severe problem.
Here is a test image comped in PS.


Here are the nodes used.


I know there must be solution to this as when you comp images with ID masks in Blender you don’t get gaps between the images, so I do not know if it is a PNG setting, a anti-aliasing setting or just a node combination that will output usable masked images.

Please help if you have any thoughts on this.

Thank you in advance.

This is not a bug. Nothing you can do best with ID except use the anti-aliasing option, erode a bit with blur but it will never match perfectly because of pixels that are not 100% opaque.

But you can create better masks if you use render layers with mask.

ups forget it its for cycles not blender internal :/

if you dont mind rendering a few images (its quick, pixel perfect and works for object/material ids) heres a node for you

and a tutorial but only in german

hope it helps!