The gist seems to be that if the filename has an extension, the extension is preferred. If the filename doesn't have an extension, the MIME type selected in the bottom right is used.
Comparing to Paint on Windows 11, that seems to roughly match the behaviour there. If the filename is "test.png", but the Mimetype is "jpg", it's saved as a .png.
What Windows does do differently, is it never actually shows you the file extension to begin with. And if you do add the extension and then change MIMEtype, it doesn't change from one to the other, it actually just hides the extension entirely again.
It's not something I've personally ever thought about, but thinking back on it, I personally rarely interact with with the MIMEtype for save actions, I always just change the extension (even if it's originally invisible), but I'm a computer savvy individual; and maybe the majority of users are otherwise inclined.
It may be the solution here is to not append the ".jpg" by default at all, if I recall correctly, the original concern was Pinta wouldn't be able to find and load image files without an extension, but those issues have since been fixed.
Ultimately I suppose it's a matter of platform convention and UX with no clear answer, and I'd expect if you tried this on KDE with the KDE filepicker, it might not have this problem. If I remember correctly, KDE would replace the file extension on the name automatically when you swapped MIMEtype.
The gist seems to be that if the filename has an extension, the extension is preferred. If the filename doesn't have an extension, the MIME type selected in the bottom right is used.
Comparing to Paint on Windows 11, that seems to roughly match the behaviour there. If the filename is "test.png", but the Mimetype is "jpg", it's saved as a .png.
What Windows does do differently, is it never actually shows you the file extension to begin with. And if you do add the extension and then change MIMEtype, it doesn't change from one to the other, it actually just hides the extension entirely again.
It's not something I've personally ever thought about, but thinking back on it, I personally rarely interact with with the MIMEtype for save actions, I always just change the extension (even if it's originally invisible), but I'm a computer savvy individual; and maybe the majority of users are otherwise inclined.
It may be the solution here is to not append the ".jpg" by default at all, if I recall correctly, the original concern was Pinta wouldn't be able to find and load image files without an extension, but those issues have since been fixed.
Ultimately I suppose it's a matter of platform convention and UX with no clear answer, and I'd expect if you tried this on KDE with the KDE filepicker, it might not have this problem. If I remember correctly, KDE would replace the file extension on the name automatically when you swapped MIMEtype.