[gimp] Bug 569661 – Import from PDF throws errors when entering resolution in pixels per millimetre
- From: Sven Neumann <neo src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] Bug 569661 – Import from PDF throws errors when entering resolution in pixels per millimetre
- Date: Tue, 7 Jul 2009 15:12:42 +0000 (UTC)
commit a7bca9407d7dec994cbb116e32e84589d34840a5
Author: Massimo Valentini <sixtysix inwind it>
Date: Tue Jul 7 17:09:21 2009 +0200
Bug 569661 â?? Import from PDF throws errors when entering resolution in pixels per millimetre
Fix calculation of dpi value.
plug-ins/common/file-pdf.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/file-pdf.c b/plug-ins/common/file-pdf.c
index 36d13e8..36fa328 100644
--- a/plug-ins/common/file-pdf.c
+++ b/plug-ins/common/file-pdf.c
@@ -1288,7 +1288,8 @@ gimp_resolution_entry_get_x_in_dpi (GimpResolutionEntry *gre)
{
g_return_val_if_fail (GIMP_IS_RESOLUTION_ENTRY (gre), 0);
- return gre->x.value / gimp_unit_get_factor (gre->unit);
+ /* dots_in_one_unit * units_in_one_inch -> dpi */
+ return gre->x.value * gimp_unit_get_factor (gre->unit);
}
/**
@@ -1302,7 +1303,7 @@ gimp_resolution_entry_get_y_in_dpi (GimpResolutionEntry *gre)
{
g_return_val_if_fail (GIMP_IS_RESOLUTION_ENTRY (gre), 0);
- return gre->y.value / gimp_unit_get_factor (gre->unit);
+ return gre->y.value * gimp_unit_get_factor (gre->unit);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]