Pinta doesn't recognize images with wrong file extension

Bug #1679570 reported by Bartosz Skrzypczak
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Pinta
Fix Released
Wishlist
Unassigned

Bug Description

Most other programs use somethig like mime type (or some other mechanism that looks at file content) instead of relying only on file extensions. Pinta seems to rely only on file extension to determine file type. And some of my images have wrong extension (like .jpe instead of .jp(e)g).

Would it be possible to fix it and detect file types even when the extension is wrong/isn't available?

description: updated
Revision history for this message
ben (toran) wrote :

To extend this, when I duplicate an image file 'myImage.jpg' I would typically get something like 'myImage.jpg (2)'. This also results in an unrecognised file type for I assume the same reason.

Exception:
System.FormatException: Unsupported file format

Pinta Version 1.6
Linux Mint 18.1, Cinnamon

Revision history for this message
grofaty (grofaty) wrote :

I tested with Pinta-1.7 latest build 1.7+r1134-202008032046~ubuntu18.04.1 and Pinta only checks file extension.

This report should be marked as Wishlist, because it is actually not really a bug, but feature request.

If on Linux you can use simple command on terminal to rename files from *.jpe to *.jpg:
rename 's/.jpe/.jpg/' *.jpe

Changed in pinta:
importance: Undecided → Wishlist
status: New → Triaged
Changed in pinta:
milestone: none → 2.1
Revision history for this message
Cameron White (cameronwhite91) wrote :

Just a note that this also applies to loading palette files, which have similar logic for checking the file extension.

Revision history for this message
Cameron White (cameronwhite91) wrote :
Changed in pinta:
status: Triaged → Fix Committed
grofaty (grofaty)
Changed in pinta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.