|
|
|
@ -167,11 +167,11 @@ bool AlexandriaExporter::writeFile(const TQDir& dir_, Data::ConstEntryPtr entry_
|
|
|
|
|
TQString filename = dir_.absPath() + TQDir::separator() + isbn;
|
|
|
|
|
if(img1.height() > ALEXANDRIA_MAX_SIZE_SMALL) {
|
|
|
|
|
if(img1.height() > ALEXANDRIA_MAX_SIZE_MEDIUM) { // limit maximum size
|
|
|
|
|
img1 = img1.scale(ALEXANDRIA_MAX_SIZE_MEDIUM, ALEXANDRIA_MAX_SIZE_MEDIUM, TQ_ScaleMin);
|
|
|
|
|
img1 = img1.scale(ALEXANDRIA_MAX_SIZE_MEDIUM, ALEXANDRIA_MAX_SIZE_MEDIUM, TQImage::ScaleMin);
|
|
|
|
|
}
|
|
|
|
|
img2 = img1.scale(ALEXANDRIA_MAX_SIZE_SMALL, ALEXANDRIA_MAX_SIZE_SMALL, TQ_ScaleMin);
|
|
|
|
|
img2 = img1.scale(ALEXANDRIA_MAX_SIZE_SMALL, ALEXANDRIA_MAX_SIZE_SMALL, TQImage::ScaleMin);
|
|
|
|
|
} else {
|
|
|
|
|
img2 = img1.smoothScale(ALEXANDRIA_MAX_SIZE_MEDIUM, ALEXANDRIA_MAX_SIZE_MEDIUM, TQ_ScaleMin); // scale up
|
|
|
|
|
img2 = img1.smoothScale(ALEXANDRIA_MAX_SIZE_MEDIUM, ALEXANDRIA_MAX_SIZE_MEDIUM, TQImage::ScaleMin); // scale up
|
|
|
|
|
}
|
|
|
|
|
if(!img1.save(filename + TQString::fromLatin1("_medium.jpg"), "JPEG")
|
|
|
|
|
|| !img2.save(filename + TQString::fromLatin1("_small.jpg"), "JPEG")) {
|
|
|
|
|