QJpegPlugin: also recognize jfif suffix
Currently QJpegPlugin can load JFIF image without issue, but didn't register jfif as recognized suffix. This add the support for jfif suffix and will load the image as regular JPEG image. Qt image formats plugins doesn't care about the extra metadata provided by image itself, so it's fine to simply use the existing QJpegPlugin to load JFIF image files. Change-Id: I880d7603f356fbb01af7de8e4fb62fa010a0fd1f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 68f58ce198a794e7b2890f1127c99e0395d105a5)bb10
parent
e358eb3bab
commit
44a17e9a36
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"Keys": [ "jpg", "jpeg" ],
|
||||
"MimeTypes": [ "image/jpeg", "image/jpeg" ]
|
||||
"Keys": [ "jpg", "jpeg", "jfif" ],
|
||||
"MimeTypes": [ "image/jpeg", "image/jpeg", "image/jpeg" ]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public:
|
|||
|
||||
QImageIOPlugin::Capabilities QJpegPlugin::capabilities(QIODevice *device, const QByteArray &format) const
|
||||
{
|
||||
if (format == "jpeg" || format == "jpg")
|
||||
if (format == "jpeg" || format == "jpg" || format == "jfif")
|
||||
return Capabilities(CanRead | CanWrite);
|
||||
if (!format.isEmpty())
|
||||
return { };
|
||||
|
|
|
|||
Loading…
Reference in New Issue