{"id":5585,"date":"2018-03-09T11:50:20","date_gmt":"2018-03-09T09:50:20","guid":{"rendered":"http:\/\/mummila.net\/kommentit\/?p=5585"},"modified":"2018-03-09T11:50:20","modified_gmt":"2018-03-09T09:50:20","slug":"viewer-fails-to-save-a-jpeg-with-non-jpeg-filename-extension-2","status":"publish","type":"post","link":"https:\/\/mummila.net\/kommentit\/2018\/03\/09\/viewer-fails-to-save-a-jpeg-with-non-jpeg-filename-extension-2\/","title":{"rendered":"Viewer fails to save a JPEG with non-JPEG filename extension"},"content":{"rendered":"<p>== Steps to reproduce ==<br \/>\n1. Download https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/e\/e1\/Car_crash_1.jpg\/193px-Car_crash_1.jpg?download<br \/>\n2. Open the image in Shotwell Viewer: $ shotwell 193px-Car_crash_1.jpg<br \/>\n3. Select File &gt; Save As&#8230;<br \/>\n4. Keep\/set Format as &#8221;Current&#8221;, don&#8217;t change any other parameters<br \/>\n5. Enter &#8221;193px-Car_crash_1.png&#8221; (without quotes) as the filename, select OK<\/p>\n<p>== What happens ==<br \/>\nThe viewer now displays a black screen, with the text &#8221;Photo source file missing:&#8221; followed by the (.png-ending) image path entered in the dialog. The file has not been saved.<\/p>\n<p>== What I expect to happen ==<br \/>\nFor the (now misnamed) .png-ending file to have been saved, and be opened in the Viewer.<\/p>\n<p>== Other notes ==<br \/>\n* 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.<br \/>\n* I&#8217;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).<br \/>\n* 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 &#8221;file missing&#8221; error as above.<br \/>\n* 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).<\/p>\n<p>(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.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The viewer now displays a black screen, with the text &#8221;Photo source file missing:&#8221; followed by the (.png-ending) image path entered in the dialog.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8860],"tags":[12493],"class_list":["post-5585","post","type-post","status-publish","format-standard","hentry","category-vianhallintajarjestelmat","tag-shotwell","sijainti-gnome-bugzilla"],"_links":{"self":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/comments?post=5585"}],"version-history":[{"count":2,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5585\/revisions"}],"predecessor-version":[{"id":5587,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5585\/revisions\/5587"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/media?parent=5585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/categories?post=5585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/tags?post=5585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}