{"id":5277,"date":"2017-08-14T17:29:01","date_gmt":"2017-08-14T14:29:01","guid":{"rendered":"http:\/\/mummila.net\/kommentit\/?p=5277"},"modified":"2017-08-14T17:29:01","modified_gmt":"2017-08-14T14:29:01","slug":"viewer-fails-to-save-a-jpeg-with-non-jpeg-filename-extension","status":"publish","type":"post","link":"https:\/\/mummila.net\/kommentit\/2017\/08\/14\/viewer-fails-to-save-a-jpeg-with-non-jpeg-filename-extension\/","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. Select OK (without changing Format from &#8221;Current&#8221;, or 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 a file with the .png ending already exists, and I try overwriting it with the JPEG, the black error screen does not appear, and the viewer appears as if it had saved the file. But the file hasn&#8217;t actually been saved; if 193px-Car_crash_1.png was an empty file before seemingly overwriting it, it remains empty.<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. Any variant of \/jpe?g\/i as the extension seems to work as expected, 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Saving a JPEG file with non-jpeg filename extension causes the saving to fail in Shotwell Viewer.<\/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-5277","post","type-post","status-publish","format-standard","hentry","category-vianhallintajarjestelmat","tag-shotwell","sijainti-launchpad"],"_links":{"self":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5277","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=5277"}],"version-history":[{"count":2,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5277\/revisions"}],"predecessor-version":[{"id":5279,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5277\/revisions\/5279"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/media?parent=5277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/categories?post=5277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/tags?post=5277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}