View Single Post
Old 02-14-2020, 11:59 PM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,338
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Perhaps a better request would be to have Sigil inspect the images during import to determine if the file type and image type match. I've seen the imghdr Python library used for testing and supplying information for renaming if needed (not sure but think Python3 required).

OTOH, when importing files with the wrong file type—"Garbage in, Garbage out" comes to mind—it might be better for the user to do some work before importing the image files. I might just be showing my paranoia but I tend to get nervous about files with incorrect file types. Am I the only one who remembers various forms of malware that hid themselves within images where one tactic was changing the image file type. It's a .png not a .jpeg so we won't check the EXIF data for instance.

@The_book: Since you know changing the file type when renaming the image file is going to trigger the mimetype error, why not change the mimetype at the same time?

Last edited by DNSB; 02-15-2020 at 12:28 AM.
DNSB is online now   Reply With Quote