[gimp/soc-2013-psd] file-psd: minor cleanup, mostly whitespace, reducing the diff to master
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2013-psd] file-psd: minor cleanup, mostly whitespace, reducing the diff to master
- Date: Mon, 28 Oct 2013 10:18:33 +0000 (UTC)
commit 3da32d6b1ab5ad44db0c8761e9125092727e3e5b
Author: Michael Natterer <mitch gimp org>
Date: Mon Oct 28 11:17:29 2013 +0100
file-psd: minor cleanup, mostly whitespace, reducing the diff to master
plug-ins/file-psd/psd-image-res-load.c | 298 ++++++++++++++++----------------
plug-ins/file-psd/psd-layer-res-load.c | 10 +-
2 files changed, 154 insertions(+), 154 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-image-res-load.c b/plug-ins/file-psd/psd-image-res-load.c
index 130e0b6..ebd4a9a 100644
--- a/plug-ins/file-psd/psd-image-res-load.c
+++ b/plug-ins/file-psd/psd-image-res-load.c
@@ -353,47 +353,47 @@ load_image_resource (PSDimageres *res_a,
load_resource_2000 (res_a, image_id, f, error);
break;
- case PSD_IPTC_NAA_DATA:
- load_resource_1028 (res_a, image_id, f, error);
- break;
+ case PSD_IPTC_NAA_DATA:
+ load_resource_1028 (res_a, image_id, f, error);
+ break;
- case PSD_GRID_GUIDE:
- load_resource_1032 (res_a, image_id, f, error);
- break;
+ case PSD_GRID_GUIDE:
+ load_resource_1032 (res_a, image_id, f, error);
+ break;
- case PSD_ICC_PROFILE:
- load_resource_1039 (res_a, image_id, f, error);
- break;
+ case PSD_ICC_PROFILE:
+ load_resource_1039 (res_a, image_id, f, error);
+ break;
- case PSD_ALPHA_NAMES_UNI:
- load_resource_1045 (res_a, image_id, img_a, f, error);
- break;
+ case PSD_ALPHA_NAMES_UNI:
+ load_resource_1045 (res_a, image_id, img_a, f, error);
+ break;
- case PSD_IDX_COL_TAB_CNT:
- load_resource_1046 (res_a, image_id, f, error);
- break;
+ case PSD_IDX_COL_TAB_CNT:
+ load_resource_1046 (res_a, image_id, f, error);
+ break;
- case PSD_ALPHA_ID:
- load_resource_1053 (res_a, image_id, img_a, f, error);
- break;
+ case PSD_ALPHA_ID:
+ load_resource_1053 (res_a, image_id, img_a, f, error);
+ break;
- case PSD_EXIF_DATA:
- load_resource_1058 (res_a, image_id, f, error);
- break;
+ case PSD_EXIF_DATA:
+ load_resource_1058 (res_a, image_id, f, error);
+ break;
- case PSD_XMP_DATA:
- break;
+ case PSD_XMP_DATA:
+ break;
case PSD_DISPLAY_INFO_NEW:
load_resource_1077 (res_a, image_id, img_a, f, error);
break;
- default:
- if (res_a->id >= 2000 &&
- res_a->id < 2999)
- load_resource_2000 (res_a, image_id, f, error);
- else
- load_resource_unknown (res_a, image_id, f, error);
+ default:
+ if (res_a->id >= 2000 &&
+ res_a->id < 2999)
+ load_resource_2000 (res_a, image_id, f, error);
+ else
+ load_resource_unknown (res_a, image_id, f, error);
}
}
@@ -478,7 +478,7 @@ load_resource_unknown (const PSDimageres *res_a,
}
name = g_strdup_printf ("psd-image-resource-%.4s-%.4x",
- res_a->type, res_a->id);
+ res_a->type, res_a->id);
IFDBG(2) g_debug ("Parasite name: %s", name);
parasite = gimp_parasite_new (name, 0, res_a->data_len, data);
@@ -513,7 +513,7 @@ load_resource_ps_only (const PSDimageres *res_a,
}
name = g_strdup_printf ("psd-image-resource-%.4s-%.4x",
- res_a->type, res_a->id);
+ res_a->type, res_a->id);
IFDBG(2) g_debug ("Parasite name: %s", name);
parasite = gimp_parasite_new (name, 0, res_a->data_len, data);
@@ -558,12 +558,12 @@ load_resource_1005 (const PSDimageres *res_a,
res_info.heightUnit = GINT16_FROM_BE (res_info.heightUnit);
IFDBG(3) g_debug ("Resolution: %d, %d, %d, %d, %d, %d",
- res_info.hRes,
- res_info.hResUnit,
- res_info.widthUnit,
- res_info.vRes,
- res_info.vResUnit,
- res_info.heightUnit);
+ res_info.hRes,
+ res_info.hResUnit,
+ res_info.widthUnit,
+ res_info.vRes,
+ res_info.vResUnit,
+ res_info.heightUnit);
/* Resolution always recorded as pixels / inch in a fixed point implied
decimal int32 with 16 bits before point and 16 after (i.e. cast as
@@ -675,58 +675,58 @@ load_resource_1007 (const PSDimageres *res_a,
switch (dsp_info.colorSpace)
{
- case PSD_CS_RGB:
- gimp_rgb_set (&gimp_rgb, ps_color.rgb.red / 65535.0,
- ps_color.rgb.green / 65535.0,
- ps_color.rgb.blue / 65535.0);
- break;
-
- case PSD_CS_HSB:
- gimp_hsv_set (&gimp_hsv, ps_color.hsv.hue / 65535.0,
- ps_color.hsv.saturation / 65535.0,
- ps_color.hsv.value / 65535.0);
- gimp_hsv_to_rgb (&gimp_hsv, &gimp_rgb);
- break;
-
- case PSD_CS_CMYK:
- gimp_cmyk_set (&gimp_cmyk, 1.0 - ps_color.cmyk.cyan / 65535.0,
- 1.0 - ps_color.cmyk.magenta / 65535.0,
- 1.0 - ps_color.cmyk.yellow / 65535.0,
- 1.0 - ps_color.cmyk.black / 65535.0);
- gimp_cmyk_to_rgb (&gimp_cmyk, &gimp_rgb);
- break;
-
- case PSD_CS_GRAYSCALE:
- gimp_rgb_set (&gimp_rgb, ps_color.gray.gray / 10000.0,
- ps_color.gray.gray / 10000.0,
- ps_color.gray.gray / 10000.0);
- break;
-
- case PSD_CS_FOCOLTONE:
- case PSD_CS_TRUMATCH:
- case PSD_CS_HKS:
- case PSD_CS_LAB:
- case PSD_CS_PANTONE:
- case PSD_CS_TOYO:
- case PSD_CS_DIC:
- case PSD_CS_ANPA:
- default:
- if (CONVERSION_WARNINGS)
- g_message ("Unsupported color space: %d",
- dsp_info.colorSpace);
- gimp_rgb_set (&gimp_rgb, 1.0, 0.0, 0.0);
+ case PSD_CS_RGB:
+ gimp_rgb_set (&gimp_rgb, ps_color.rgb.red / 65535.0,
+ ps_color.rgb.green / 65535.0,
+ ps_color.rgb.blue / 65535.0);
+ break;
+
+ case PSD_CS_HSB:
+ gimp_hsv_set (&gimp_hsv, ps_color.hsv.hue / 65535.0,
+ ps_color.hsv.saturation / 65535.0,
+ ps_color.hsv.value / 65535.0);
+ gimp_hsv_to_rgb (&gimp_hsv, &gimp_rgb);
+ break;
+
+ case PSD_CS_CMYK:
+ gimp_cmyk_set (&gimp_cmyk, 1.0 - ps_color.cmyk.cyan / 65535.0,
+ 1.0 - ps_color.cmyk.magenta / 65535.0,
+ 1.0 - ps_color.cmyk.yellow / 65535.0,
+ 1.0 - ps_color.cmyk.black / 65535.0);
+ gimp_cmyk_to_rgb (&gimp_cmyk, &gimp_rgb);
+ break;
+
+ case PSD_CS_GRAYSCALE:
+ gimp_rgb_set (&gimp_rgb, ps_color.gray.gray / 10000.0,
+ ps_color.gray.gray / 10000.0,
+ ps_color.gray.gray / 10000.0);
+ break;
+
+ case PSD_CS_FOCOLTONE:
+ case PSD_CS_TRUMATCH:
+ case PSD_CS_HKS:
+ case PSD_CS_LAB:
+ case PSD_CS_PANTONE:
+ case PSD_CS_TOYO:
+ case PSD_CS_DIC:
+ case PSD_CS_ANPA:
+ default:
+ if (CONVERSION_WARNINGS)
+ g_message ("Unsupported color space: %d",
+ dsp_info.colorSpace);
+ gimp_rgb_set (&gimp_rgb, 1.0, 0.0, 0.0);
}
gimp_rgb_set_alpha (&gimp_rgb, 1.0);
IFDBG(2) g_debug ("PS cSpace: %d, col: %d %d %d %d, opacity: %d, kind: %d",
- dsp_info.colorSpace, ps_color.cmyk.cyan, ps_color.cmyk.magenta,
- ps_color.cmyk.yellow, ps_color.cmyk.black, dsp_info.opacity,
- dsp_info.kind);
+ dsp_info.colorSpace, ps_color.cmyk.cyan, ps_color.cmyk.magenta,
+ ps_color.cmyk.yellow, ps_color.cmyk.black, dsp_info.opacity,
+ dsp_info.kind);
IFDBG(2) g_debug ("cSpace: %d, col: %g %g %g, opacity: %d, kind: %d",
- dsp_info.colorSpace, gimp_rgb.r * 255 , gimp_rgb.g * 255,
- gimp_rgb.b * 255, dsp_info.opacity, dsp_info.kind);
+ dsp_info.colorSpace, gimp_rgb.r * 255 , gimp_rgb.g * 255,
+ gimp_rgb.b * 255, dsp_info.opacity, dsp_info.kind);
img_a->alpha_display_info[cidx] = g_malloc (sizeof (PSDchanneldata));
img_a->alpha_display_info[cidx]->gimp_color = gimp_rgb;
@@ -787,8 +787,8 @@ load_resource_1022 (const PSDimageres *res_a,
img_a->quick_mask_id = GUINT16_FROM_BE (img_a->quick_mask_id);
IFDBG(3) g_debug ("Quick mask channel: %d, empty: %d",
- img_a->quick_mask_id,
- quick_mask_empty);
+ img_a->quick_mask_id,
+ quick_mask_empty);
return 0;
}
@@ -867,7 +867,7 @@ load_resource_1028 (const PSDimageres *res_a,
/* Store resource data as a standard psd parasite */
IFDBG (2) g_debug ("Processing IPTC data as psd parasite");
name = g_strdup_printf ("psd-image-resource-%.4s-%.4x",
- res_a->type, res_a->id);
+ res_a->type, res_a->id);
IFDBG(3) g_debug ("Parasite name: %s", name);
parasite = gimp_parasite_new (name, 0, res_a->data_len, res_data);
@@ -911,10 +911,10 @@ load_resource_1032 (const PSDimageres *res_a,
hdr.fGuideCount = GUINT32_FROM_BE (hdr.fGuideCount);
IFDBG(3) g_debug ("Grids & Guides: %d, %d, %d, %d",
- hdr.fVersion,
- hdr.fGridCycleV,
- hdr.fGridCycleH,
- hdr.fGuideCount);
+ hdr.fVersion,
+ hdr.fGridCycleV,
+ hdr.fGridCycleH,
+ hdr.fGuideCount);
for (i = 0; i < hdr.fGuideCount; ++i)
{
@@ -928,8 +928,8 @@ load_resource_1032 (const PSDimageres *res_a,
guide.fLocation /= 32;
IFDBG(3) g_debug ("Guide: %d px, %d",
- guide.fLocation,
- guide.fDirection);
+ guide.fLocation,
+ guide.fDirection);
if (guide.fDirection == PSD_VERTICAL)
gimp_image_add_vguide (image_id, guide.fLocation);
@@ -987,9 +987,9 @@ load_resource_1033 (const PSDimageres *res_a,
IFDBG(2) g_debug ("\nThumbnail:\n"
"\tFormat: %d\n"
"\tDimensions: %d x %d\n",
- thumb_info.format,
- thumb_info.width,
- thumb_info.height);
+ thumb_info.format,
+ thumb_info.width,
+ thumb_info.height);
if (thumb_info.format != 1)
{
@@ -1035,7 +1035,7 @@ load_resource_1033 (const PSDimageres *res_a,
cinfo.output_height,
GIMP_RGB_IMAGE, 100, GIMP_NORMAL_MODE);
buffer = gimp_drawable_get_buffer (layer_id);
- format = babl_format("R'G'B'A u8");
+ format = babl_format ("R'G'B'A u8");
/* Step 6: while (scan lines remain to be read) */
/* jpeg_read_scanlines(...); */
@@ -1062,7 +1062,7 @@ load_resource_1033 (const PSDimageres *res_a,
}
}
gegl_buffer_set (buffer, GEGL_RECTANGLE (0, 0, gegl_buffer_get_width (buffer), gegl_buffer_get_height
(buffer)),
- 0, format, rgb_buf ? rgb_buf : buf, GEGL_AUTO_ROWSTRIDE);
+ 0, format, rgb_buf ? rgb_buf : buf, GEGL_AUTO_ROWSTRIDE);
}
/* Step 7: Finish decompression */
@@ -1258,7 +1258,7 @@ load_resource_1058 (const PSDimageres *res_a,
/* Store resource data as a standard psd parasite */
IFDBG (2) g_debug ("Processing exif data as psd parasite");
name = g_strdup_printf ("psd-image-resource-%.4s-%.4x",
- res_a->type, res_a->id);
+ res_a->type, res_a->id);
IFDBG(3) g_debug ("Parasite name: %s", name);
parasite = gimp_parasite_new (name, 0, res_a->data_len, res_data);
@@ -1288,11 +1288,11 @@ load_resource_1077 (const PSDimageres *res_a,
gint cidx;
IFDBG(2) g_debug ("Process image resource block 1077: Display Info New");
-
+
/* For now, skip first 4 bytes since intention is unclear. Seems to be
a version number that is always one, but who knows. */
fseek (f, 4, SEEK_CUR);
-
+
tot_rec = res_a->data_len / 13;
if (tot_rec == 0)
return 0;
@@ -1318,58 +1318,58 @@ load_resource_1077 (const PSDimageres *res_a,
switch (dsp_info.colorSpace)
{
- case PSD_CS_RGB:
- gimp_rgb_set (&gimp_rgb, ps_color.rgb.red / 65535.0,
- ps_color.rgb.green / 65535.0,
- ps_color.rgb.blue / 65535.0);
- break;
-
- case PSD_CS_HSB:
- gimp_hsv_set (&gimp_hsv, ps_color.hsv.hue / 65535.0,
- ps_color.hsv.saturation / 65535.0,
- ps_color.hsv.value / 65535.0);
- gimp_hsv_to_rgb (&gimp_hsv, &gimp_rgb);
- break;
-
- case PSD_CS_CMYK:
- gimp_cmyk_set (&gimp_cmyk, 1.0 - ps_color.cmyk.cyan / 65535.0,
- 1.0 - ps_color.cmyk.magenta / 65535.0,
- 1.0 - ps_color.cmyk.yellow / 65535.0,
- 1.0 - ps_color.cmyk.black / 65535.0);
- gimp_cmyk_to_rgb (&gimp_cmyk, &gimp_rgb);
- break;
-
- case PSD_CS_GRAYSCALE:
- gimp_rgb_set (&gimp_rgb, ps_color.gray.gray / 10000.0,
- ps_color.gray.gray / 10000.0,
- ps_color.gray.gray / 10000.0);
- break;
-
- case PSD_CS_FOCOLTONE:
- case PSD_CS_TRUMATCH:
- case PSD_CS_HKS:
- case PSD_CS_LAB:
- case PSD_CS_PANTONE:
- case PSD_CS_TOYO:
- case PSD_CS_DIC:
- case PSD_CS_ANPA:
- default:
- if (CONVERSION_WARNINGS)
- g_message ("Unsupported color space: %d",
- dsp_info.colorSpace);
- gimp_rgb_set (&gimp_rgb, 1.0, 0.0, 0.0);
+ case PSD_CS_RGB:
+ gimp_rgb_set (&gimp_rgb, ps_color.rgb.red / 65535.0,
+ ps_color.rgb.green / 65535.0,
+ ps_color.rgb.blue / 65535.0);
+ break;
+
+ case PSD_CS_HSB:
+ gimp_hsv_set (&gimp_hsv, ps_color.hsv.hue / 65535.0,
+ ps_color.hsv.saturation / 65535.0,
+ ps_color.hsv.value / 65535.0);
+ gimp_hsv_to_rgb (&gimp_hsv, &gimp_rgb);
+ break;
+
+ case PSD_CS_CMYK:
+ gimp_cmyk_set (&gimp_cmyk, 1.0 - ps_color.cmyk.cyan / 65535.0,
+ 1.0 - ps_color.cmyk.magenta / 65535.0,
+ 1.0 - ps_color.cmyk.yellow / 65535.0,
+ 1.0 - ps_color.cmyk.black / 65535.0);
+ gimp_cmyk_to_rgb (&gimp_cmyk, &gimp_rgb);
+ break;
+
+ case PSD_CS_GRAYSCALE:
+ gimp_rgb_set (&gimp_rgb, ps_color.gray.gray / 10000.0,
+ ps_color.gray.gray / 10000.0,
+ ps_color.gray.gray / 10000.0);
+ break;
+
+ case PSD_CS_FOCOLTONE:
+ case PSD_CS_TRUMATCH:
+ case PSD_CS_HKS:
+ case PSD_CS_LAB:
+ case PSD_CS_PANTONE:
+ case PSD_CS_TOYO:
+ case PSD_CS_DIC:
+ case PSD_CS_ANPA:
+ default:
+ if (CONVERSION_WARNINGS)
+ g_message ("Unsupported color space: %d",
+ dsp_info.colorSpace);
+ gimp_rgb_set (&gimp_rgb, 1.0, 0.0, 0.0);
}
gimp_rgb_set_alpha (&gimp_rgb, 1.0);
IFDBG(2) g_debug ("PS cSpace: %d, col: %d %d %d %d, opacity: %d, kind: %d",
- dsp_info.colorSpace, ps_color.cmyk.cyan, ps_color.cmyk.magenta,
- ps_color.cmyk.yellow, ps_color.cmyk.black, dsp_info.opacity,
- dsp_info.kind);
+ dsp_info.colorSpace, ps_color.cmyk.cyan, ps_color.cmyk.magenta,
+ ps_color.cmyk.yellow, ps_color.cmyk.black, dsp_info.opacity,
+ dsp_info.kind);
IFDBG(2) g_debug ("cSpace: %d, col: %g %g %g, opacity: %d, kind: %d",
- dsp_info.colorSpace, gimp_rgb.r * 255 , gimp_rgb.g * 255,
- gimp_rgb.b * 255, dsp_info.opacity, dsp_info.kind);
+ dsp_info.colorSpace, gimp_rgb.r * 255 , gimp_rgb.g * 255,
+ gimp_rgb.b * 255, dsp_info.opacity, dsp_info.kind);
img_a->alpha_display_info[cidx] = g_malloc (sizeof (PSDchanneldata));
img_a->alpha_display_info[cidx]->gimp_color = gimp_rgb;
@@ -1527,11 +1527,11 @@ load_resource_2000 (const PSDimageres *res_a,
|| type == PSD_PATH_OP_UNLNK)
{
if (fread (&y[0], 4, 1, f) < 1
- || fread (&x[0], 4, 1, f) < 1
- || fread (&y[1], 4, 1, f) < 1
- || fread (&x[1], 4, 1, f) < 1
- || fread (&y[2], 4, 1, f) < 1
- || fread (&x[2], 4, 1, f) < 1)
+ || fread (&x[0], 4, 1, f) < 1
+ || fread (&y[1], 4, 1, f) < 1
+ || fread (&x[1], 4, 1, f) < 1
+ || fread (&y[2], 4, 1, f) < 1
+ || fread (&x[2], 4, 1, f) < 1)
{
psd_set_error (feof (f), errno, error);
return -1;
diff --git a/plug-ins/file-psd/psd-layer-res-load.c b/plug-ins/file-psd/psd-layer-res-load.c
index e0c7b93..2c82d23 100644
--- a/plug-ins/file-psd/psd-layer-res-load.c
+++ b/plug-ins/file-psd/psd-layer-res-load.c
@@ -96,7 +96,7 @@
PSD_LFX_OUTER_GLW "oglw" - * Effects layer - outer glow (PS5) *
PSD_LFX_INNER_GLW "iglw" - * Effects layer - inner glow (PS5) *
PSD_LFX_BEVEL "bevl" - * Effects layer - bevel (PS5) *
-
+
* New stuff temporarily until I can get them sorted out *
* Placed Layer *
@@ -173,10 +173,10 @@ static gint load_resource_lsct (const PSDlayerres *res_a,
FILE *f,
GError **error);
-static gint load_resource_lrfx (const PSDlayerres *res_a,
- PSDlayer *lyr_a,
- FILE *f,
- GError **error);
+static gint load_resource_lrfx (const PSDlayerres *res_a,
+ PSDlayer *lyr_a,
+ FILE *f,
+ GError **error);
/* Public Functions */
gint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]