Skip to content

exr: fix multi-image behaviour

Set the initial image counter to 0 (instead -1) to have the same behaviour ot the TIFF plugin (especially when using jumpToNextImage()).

QImageReader r(fileEXR);
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());

Merge request reports