Changeset View
Changeset View
Standalone View
Standalone View
lib/thumbnailprovider/thumbnailgenerator.cpp
| Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 110 | if (reader.format() == "jpeg" && GwenviewConfig::applyExifOrientation()) { | |||
|---|---|---|---|---|---|
| 111 | content.load(pixPath); | 111 | content.load(pixPath); | ||
| 112 | } | 112 | } | ||
| 113 | } | 113 | } | ||
| 114 | 114 | | |||
| 115 | // If there's jpeg content (from jpg or raw files), try to load an embedded thumbnail, if available. | 115 | // If there's jpeg content (from jpg or raw files), try to load an embedded thumbnail, if available. | ||
| 116 | if (!content.rawData().isEmpty()) { | 116 | if (!content.rawData().isEmpty()) { | ||
| 117 | QImage thumbnail = content.thumbnail(); | 117 | QImage thumbnail = content.thumbnail(); | ||
| 118 | 118 | | |||
| 119 | if (qMax(thumbnail.width(), thumbnail.height()) >= pixelSize) { | 119 | // If the user does not care about the generated thumbnails (by deleting them on exit), use ANY | ||
| 120 | // embedded thumnail, even if it's too small. | ||||
| 121 | if (!thumbnail.isNull() && | ||||
| 122 | (GwenviewConfig::deleteThumbnailCacheOnExit() || qMax(thumbnail.width(), thumbnail.height()) >= pixelSize) | ||||
| 123 | ) { | ||||
yurchor: Typo: thumnail -> thumbnail | |||||
| 120 | mImage = std::move(thumbnail); | 124 | mImage = std::move(thumbnail); | ||
| 121 | mOriginalWidth = content.size().width(); | 125 | mOriginalWidth = content.size().width(); | ||
| 122 | mOriginalHeight = content.size().height(); | 126 | mOriginalHeight = content.size().height(); | ||
| 123 | return true; | 127 | return true; | ||
| 124 | } | 128 | } | ||
| 125 | } | 129 | } | ||
| 126 | 130 | | |||
| 127 | // Generate thumbnail from full image | 131 | // Generate thumbnail from full image | ||
| ▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines | |||||
Typo: thumnail -> thumbnail