[gimp/gimp-2-10] plug-ins: improve formatting and comments related to resolution export ...



commit 0204f0df44bf0f3c39ad6a4b5aad8aea9d1c42aa
Author: Jacob Boerema <jgboerema gmail com>
Date:   Wed Aug 24 14:19:30 2022 -0400

    plug-ins: improve formatting and comments related to resolution export ...
    
    for PSD's
    
    (cherry picked from commit fac6b2f3f1d8251ff7b0d99736c5b06f86ce1fa6)
    
    # Conflicts:
    #       plug-ins/file-psd/psd-save.c

 plug-ins/file-psd/psd-save.c | 10 +++++-----
 plug-ins/file-psd/psd.h      |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c
index 1adb48c137..ea2f58329b 100644
--- a/plug-ins/file-psd/psd-save.c
+++ b/plug-ins/file-psd/psd-save.c
@@ -803,10 +803,10 @@ save_resources (FILE   *fd,
 
   /* --------------- 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_id);
     gimp_image_get_resolution (image_id, &xres, &yres);
@@ -829,10 +829,10 @@ save_resources (FILE   *fd,
     write_gint16(fd, 0x03ed, "0x03ed Id (resolution)"); /* 1005 */
     write_gint16 (fd, 0, "Id name"); /* Set to null string (two zeros) */
     write_gint32 (fd, 16, "0x0400 resource size");
-    write_gint32 (fd,  xres_fix, "hRes (16.16 fixed point)");
+    write_gint32 (fd, xres_fix, "hRes (16.16 fixed point)");
     write_gint16 (fd, psd_unit, "hRes unit");
     write_gint16 (fd, psd_unit, "width unit");
-    write_gint32 (fd,  yres_fix, "vRes (16.16 fixed point)");
+    write_gint32 (fd, yres_fix, "vRes (16.16 fixed point)");
     write_gint16 (fd, psd_unit, "vRes unit");
     write_gint16 (fd, psd_unit, "height unit");
   }
diff --git a/plug-ins/file-psd/psd.h b/plug-ins/file-psd/psd.h
index b2fe6d885f..b4a0596e63 100644
--- a/plug-ins/file-psd/psd.h
+++ b/plug-ins/file-psd/psd.h
@@ -434,11 +434,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 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]