Fixed thumbnail generation for some files

svn path=/trunk/playground/graphics/okular/mobipocket/; revision=882600
remotes/origin/mobipocket
Jakub Stachowski 18 years ago
parent 4361d56b2b
commit 34f6c62c8a
  1. 1
      TODO
  2. 8
      mobipocket.cpp

@ -3,4 +3,3 @@
- anchors (a filepos=)
- decryption for DRMed files (may be impossible and/or illegal)
- strigi analyzer
- thumbnail generator does not for some files (DRMed i think)

@ -272,7 +272,13 @@ bool Document::hasDRM() const
QImage Document::thumbnail() const
{
if (!d->firstImageRecord) d->findFirstImage();
return d->getImageFromRecord(d->thumbnailIndex+d->firstImageRecord);
QImage img=d->getImageFromRecord(d->thumbnailIndex+d->firstImageRecord);
// does not work, try first image
if (img.isNull() && d->thumbnailIndex) {
d->thumbnailIndex=0;
img=d->getImageFromRecord(d->firstImageRecord);
}
return img;
}
}

Loading…
Cancel
Save