Skip to content

Commit

Permalink
plug-ins: improve formatting and comments related to resolution expor…
Browse files Browse the repository at this point in the history
…t ...

for PSD's
  • Loading branch information
Wormnest committed Aug 24, 2022
1 parent 24886f9 commit fac6b2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions plug-ins/file-psd/psd-save.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,10 +824,10 @@ save_resources (GOutputStream *output,

/* --------------- Write resolution data ------------------- */
{
gdouble xres = 0, yres = 0;
guint32 xres_fix, yres_fix;
gdouble xres = 0, yres = 0;
guint32 xres_fix, yres_fix;
GimpUnit g_unit;
gint16 psd_unit;
gint16 psd_unit;

g_unit = gimp_image_get_unit (image);
gimp_image_get_resolution (image, &xres, &yres);
Expand All @@ -850,10 +850,10 @@ save_resources (GOutputStream *output,
write_gint16(output, 0x03ed, "0x03ed Id (resolution)"); /* 1005 */
write_gint16 (output, 0, "Id name"); /* Set to null string (two zeros) */
write_gint32 (output, 16, "0x0400 resource size");
write_gint32 (output, xres_fix, "hRes (16.16 fixed point)");
write_gint32 (output, xres_fix, "hRes (16.16 fixed point)");
write_gint16 (output, psd_unit, "hRes unit");
write_gint16 (output, psd_unit, "width unit");
write_gint32 (output, yres_fix, "vRes (16.16 fixed point)");
write_gint32 (output, yres_fix, "vRes (16.16 fixed point)");
write_gint16 (output, psd_unit, "vRes unit");
write_gint16 (output, psd_unit, "height unit");
}
Expand Down
6 changes: 3 additions & 3 deletions plug-ins/file-psd/psd.h
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,11 @@ typedef struct
/* Image resolution data */
typedef struct {
Fixed hRes; /* Horizontal resolution pixels/inch */
gint16 hResUnit; /* Horizontal display resolution unit */
gint16 widthUnit; /* Width unit ?? */
gint16 hResUnit; /* Horizontal display resolution unit (1=pixels per inch, 2=pixels per cm) */
gint16 widthUnit; /* Display width unit (1=inches; 2=cm; 3=points; 4=picas; 5=columns) */
Fixed vRes; /* Vertical resolution pixels/inch */
gint16 vResUnit; /* Vertical display resolution unit */
gint16 heightUnit; /* Height unit ?? */
gint16 heightUnit; /* Display height unit */
} ResolutionInfo;

/* Grid & guide header */
Expand Down

0 comments on commit fac6b2f

Please sign in to comment.