Black line around map at some zoom levels


I have created a module that uses a .jpg image for the main map.
At some zoom levels it is fine, at some others there is a black line around the right and bottom side of the map.
I have replaced it with a different .jpg from another module and it is fine at all zoom levels.
How do I get rid of the black line at some zoom levels?

I’m using Photoshop and I have tried to save the .jpg with different options, w/ and w/ embedded color profile, flatting layers and I even converted the .jpg with “imagemagick convert” with the -strip option.