diff options
Diffstat (limited to 'src/kernel/qjpegio.cpp')
-rw-r--r-- | src/kernel/qjpegio.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/qjpegio.cpp b/src/kernel/qjpegio.cpp index de1832b26..41fbc2bc4 100644 --- a/src/kernel/qjpegio.cpp +++ b/src/kernel/qjpegio.cpp @@ -488,14 +488,14 @@ void write_jpeg_image(TQImageIO* iio) jpeg_set_defaults(&cinfo); - float diffInch = TQABS(image.dotsPerMeterX()*2.54/100. - qRound(image.dotsPerMeterX()*2.54/100.)) - + TQABS(image.dotsPerMeterY()*2.54/100. - qRound(image.dotsPerMeterY()*2.54/100.)); - float diffCm = (TQABS(image.dotsPerMeterX()/100. - qRound(image.dotsPerMeterX()/100.)) - + TQABS(image.dotsPerMeterY()/100. - qRound(image.dotsPerMeterY()/100.)))*2.54; + float diffInch = TQABS(image.dotsPerMeterX()*2.54/100. - tqRound(image.dotsPerMeterX()*2.54/100.)) + + TQABS(image.dotsPerMeterY()*2.54/100. - tqRound(image.dotsPerMeterY()*2.54/100.)); + float diffCm = (TQABS(image.dotsPerMeterX()/100. - tqRound(image.dotsPerMeterX()/100.)) + + TQABS(image.dotsPerMeterY()/100. - tqRound(image.dotsPerMeterY()/100.)))*2.54; if (diffInch < diffCm) { cinfo.density_unit = 1; // dots/inch - cinfo.X_density = qRound(image.dotsPerMeterX()*2.54/100.); - cinfo.Y_density = qRound(image.dotsPerMeterY()*2.54/100.); + cinfo.X_density = tqRound(image.dotsPerMeterX()*2.54/100.); + cinfo.Y_density = tqRound(image.dotsPerMeterY()*2.54/100.); } else { cinfo.density_unit = 2; // dots/cm cinfo.X_density = (image.dotsPerMeterX()+50) / 100; |