Hello,
I apologies for the delay, but the notification for your answer was in spam and I discovered it only now.
I found what the problem was: if the image border is also a next to e pixel with colour it will generate a stretch like the one in the post you linked. once I added a few empty pixels it resolved the problem.