manually set format in jpeg thumbnail creator
ClosedPublic

Authored by miklosm on Jun 3 2018, 7:53 PM.

Details

Summary

Otherwise the QImageReader sets the format based on the file name suffix, which might be misleading, e.g. a jpeg file named image.png.

CCBUG: 220496

Diff Detail

Repository
R320 KIO Extras
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
miklosm requested review of this revision.Jun 3 2018, 7:53 PM
miklosm created this revision.
ngraham added a subscriber: ngraham.Jun 4 2018, 5:13 AM

I guess this change makes sense (given that we are in the jpeg plugin), but what about QImageReader::decideFormatFromContent() ?

I guess this change makes sense (given that we are in the jpeg plugin), but what about QImageReader::decideFormatFromContent() ?

The file type was already detected to be "jpeg" (especially after D13315 gets accepted), that is how the jpeg plugin got chosen. There is no need to detect the file type again. See D13416 for the other image types.

dfaure accepted this revision.Sep 17 2018, 5:26 PM
This revision is now accepted and ready to land.Sep 17 2018, 5:26 PM
ngraham edited the summary of this revision. (Show Details)Sep 18 2018, 3:01 AM

@miklosm, can this go in now, or it is dependent on either of your other two patches?

@miklosm, can this go in now, or it is dependent on either of your other two patches?

All three patches need to be in place to fix bug 220496. The thumbnail creators need correct type info to be able to create the thumbnail, and the KIO patch is needed to select the correct thumbnailer. Alternatively, the jpeg thumbnailer could be removed in favor of the generic image thumbnailer.

Is there any reason not to commit this now?

Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptJan 17 2019, 2:39 AM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript
elvisangelaccio accepted this revision.Jan 19 2019, 11:19 AM
This revision was automatically updated to reflect the committed changes.