Skip to content

Commit

Permalink
plug-ins: fix #8508 Print exporting to PSD seems to export as cm ...
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Wormnest committed Aug 24, 2022
1 parent 0dbb00a commit 24886f9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions plug-ins/file-psd/psd-save.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,18 +834,15 @@ save_resources (GOutputStream *output,

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
{
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 */

Expand Down

0 comments on commit 24886f9

Please sign in to comment.