mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-18 03:54:18 -04:00
raw: fix multi image load
Fixes not loading a second image in the file. This patch allow code like the following. QImageReader r(file); do { auto qi = r.read(); if (!qi.isNull()) { qi.save(QString("/tmp/%1_%2.tif") .arg(QFileInfo(file).baseName()) .arg(r.currentImageNumber())); } } while (r.jumpToNextImage()); m_startPos is used to reposition the device if you decide to do a subsequent read: libraw wants it to be at the beginning of the RAW stream
This commit is contained in:
committed by
Albert Astals Cid
parent
7899c27a80
commit
18ea0492bc
@ -74,6 +74,12 @@ private:
|
||||
* When the quality is -1, default quality is used.
|
||||
*/
|
||||
qint32 m_quality;
|
||||
|
||||
/*!
|
||||
* \brief m_startPos
|
||||
* The initial device position to allow multi image load (cache value).
|
||||
*/
|
||||
qint64 m_startPos;
|
||||
};
|
||||
|
||||
class RAWPlugin : public QImageIOPlugin
|
||||
|
Reference in New Issue
Block a user