[gimp/gimp-2-10] plug-ins: fix #8508 Print exporting to PSD seems to export as cm ...
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] plug-ins: fix #8508 Print exporting to PSD seems to export as cm ...
- Date: Wed, 24 Aug 2022 19:56:23 +0000 (UTC)
commit 12de7b8a971473ca55f8605f837c5db838a1f006
Author: Jacob Boerema <jgboerema gmail com>
Date: Wed Aug 24 13:58:27 2022 -0400
plug-ins: fix #8508 Print exporting to PSD seems to export as cm ...
and import as inches
When GIMP's display unit was mm, our PSD export converted the X and Y
resolution as if a conversion from mm to inch was needed.
However, PSD's resolution is always measured in pixels per inch, so a
conversion is never necessary.
Removing the conversion, resolves the issue.
(cherry picked from commit 24886f91b1e55ab2f79327a00bb53729ddfde7b9)
plug-ins/file-psd/psd-save.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c
index 2cdd4c81cd..1adb48c137 100644
--- a/plug-ins/file-psd/psd-save.c
+++ b/plug-ins/file-psd/psd-save.c
@@ -813,11 +813,6 @@ save_resources (FILE *fd,
if (g_unit == GIMP_UNIT_MM)
{
- gdouble factor = gimp_unit_get_factor (g_unit) / 10.0;
-
- xres /= factor;
- yres /= factor;
-
psd_unit = PSD_UNIT_CM;
}
else
@@ -825,6 +820,8 @@ save_resources (FILE *fd,
psd_unit = PSD_UNIT_INCH;
}
+ /* Don't convert resolution based on g_unit which is a display unit.
+ * PSD resolution is always in pixels/inch. */
xres_fix = xres * 65536.0 + .5; /* Convert to 16.16 fixed point */
yres_fix = yres * 65536.0 + .5; /* Convert to 16.16 fixed point */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]