The problem is that the rectangles are saved with a white border. It isn’t caused by EdgeForm[], because the white border is outside of the graphics object. Is there some other way of ensuring that the object has no border, or possibly setting the background colour to the same colour of the object.
Hi Gianluca,
Thanks very much for your thought. I have revised my code, but the image still has a white background. I wonder if there is a way to trim the image after I generate it. Perhaps that’s a better approach.
Although it isn’t clear, because the background of this forum is also white, there is definitely a 5px’ish border. When I import the image I can see it more clearly. I will try cropping it within MMA, and exporting the cropped image to try and work out if the problem is with Graphics[] or Export[] - which seems unlikely.