GNOME Bugzilla – Bug 794195
Viewer fails to save a JPEG with non-JPEG filename extension
Last modified: 2021-05-19 15:12:55 UTC
== Steps to reproduce ==
1. Download https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Car_crash_1.jpg/193px-Car_crash_1.jpg?download
2. Open the image in Shotwell Viewer: $ shotwell 193px-Car_crash_1.jpg
3. Select File > Save As...
4. Keep/set Format as "Current", don't change any other parameters
5. Enter "193px-Car_crash_1.png" (without quotes) as the filename, select OK
== What happens ==
The viewer now displays a black screen, with the text "Photo source file missing:" followed by the (.png-ending) image path entered in the dialog. The file has not been saved.
== What I expect to happen ==
For the (now misnamed) .png-ending file to have been saved, and be opened in the Viewer.
== Other notes ==
* If an image file with the .png ending already exists, and I choose to overwrite it with the JPEG, the black error screen does not appear; instead the previously-existing PNG image file is then opened in the viewer.
* I'm (intentionally) not doing an actual Format change in the first Save As dialog here. If I do select PNG as the format, then saving the file does work as expected (using any filename extension).
* I used .png just as an example here. Using any variant of /jpe?g/i as the extension seems to work as expected (i.e. the file is saved under the new name), whereas anything else (.gif, .foo etc.) results in the same "file missing" error as above.
* If the original file is a PNG file, saving it with .jpg (or any other extension for that matter) seems to work as expected (i.e the file is saved under the new name, with the now-incorrect extension).
(My original report at Launchpad: https://bugs.launchpad.net/ubuntu/+source/shotwell/+bug/1710641#. I tweaked some details for the report above, with Shotwell 0.27.4 currently in Bionic.)
Confirmed. Interestingly, if you apply scaling, it works
V 1633 2018-03-10 07:55:52 [DBG] Photo.vala:3610: Exporting full-sized copy of  /home/jens/Projects/Shotwell/Bugs/794195/193px-Car_crash_1.jpg to /home/jens/Projects/Shotwell/Bugs/794195/193px-Car_crash_1.jpg
Somehow it doesn't properly set the file name
So apparently this is done if you export a raw image, it will use the proper extension of the export format.
-- GitLab Migration Automatic Message --
This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/shotwell/-/issues/4912.