Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Although it also looks to me like high jpeg compression, I think, jpg -quality setting is not an issue, because, original and bordered photos are set to -quality 98 (I read that in GIMP). Also, resulting photo is bigger than original in kbytes.
I tried to make all borders in one line, and result is unfortunately same like before
Still I'm not sure why would I use png format? Isn't it very limited in number of colors? Do you meant tif instead of png?
It does just look like JPG image compression, it is JPEG image compession.
For other non-loossy image formats you would have no problem.
Setting a -quality to 100% helps but does not solve this problem.
The only solution is. Never use JPEG for intermediate processing of images!
Best format is MIFF, though if you like a more normal intermediate format PNG can also be used.
I would also preserve the original image, as a starting point for future image modifications. Or better still start with (and preserve) the most original versions of those images you have.