Commit 9e4d8633 authored by Adam D. Moss's avatar Adam D. Moss

Removed an ancient kludge that was seriously confusing the layer-mode


	* app/layers_dialog.c: Removed an ancient kludge that was
	seriously confusing the layer-mode menu.

	* plug-ins/psd/psd.c: Support OVERLAY_MODE where available
parent 8712a72d
Fri Jul 31 18:29:44 BST 1998 Adam D. Moss <adam@gimp.org>
* app/layers_dialog.c: Removed an ancient kludge that was
seriously confusing the layer-mode menu.
* plug-ins/psd/psd.c: Support OVERLAY_MODE where available
Fri Jul 31 13:42:29 BST 1998 Adam D. Moss <adam@gimp.org>
* plug-ins/psd/psd.c: Worked around some buggy PSD savers
......
......@@ -2843,9 +2843,7 @@ layer_widget_layer_flush (GtkWidget *widget,
layersD->opacity_data->value = (gfloat) layer_widget->layer->opacity / 2.55;
gtk_signal_emit_by_name (GTK_OBJECT (layersD->opacity_data), "value_changed");
gtk_option_menu_set_history (GTK_OPTION_MENU (layersD->mode_option_menu),
/* Kludge to deal with the absence of behind */
((layer_widget->layer->mode > BEHIND_MODE) ?
layer_widget->layer->mode - 1 : layer_widget->layer->mode));
layer_widget->layer->mode);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (layersD->preserve_trans),
(layer_widget->layer->preserve_trans) ?
GTK_STATE_ACTIVE : GTK_STATE_NORMAL);
......
......@@ -2843,9 +2843,7 @@ layer_widget_layer_flush (GtkWidget *widget,
layersD->opacity_data->value = (gfloat) layer_widget->layer->opacity / 2.55;
gtk_signal_emit_by_name (GTK_OBJECT (layersD->opacity_data), "value_changed");
gtk_option_menu_set_history (GTK_OPTION_MENU (layersD->mode_option_menu),
/* Kludge to deal with the absence of behind */
((layer_widget->layer->mode > BEHIND_MODE) ?
layer_widget->layer->mode - 1 : layer_widget->layer->mode));
layer_widget->layer->mode);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (layersD->preserve_trans),
(layer_widget->layer->preserve_trans) ?
GTK_STATE_ACTIVE : GTK_STATE_NORMAL);
......
/*
* PSD Plugin version 1.9.9.9e (BETA)
* PSD Plugin version 1.9.9.9f (BETA)
* This GIMP plug-in is designed to load Adobe Photoshop(tm) files (.PSD)
*
* Adam D. Moss <adam@gimp.org> <adam@foxbox.org>
......@@ -36,6 +36,9 @@
/*
* Revision history:
*
* 98.07.31 / v1.9.9.9f / Adam D. Moss
* Use OVERLAY_MODE if available.
*
* 98.07.31 / v1.9.9.9e / Adam D. Moss
* Worked around some buggy PSD savers (suspect PS4 on Mac) - ugh.
* Fixed a bug when loading layer masks of certain dimensions.
......@@ -424,14 +427,22 @@ psd_lmode_to_gimp_lmode (gchar modekey[4])
if (strncmp(modekey, "scrn", 4)==0) return(SCREEN_MODE);
if (strncmp(modekey, "diss", 4)==0) return(DISSOLVE_MODE);
if (strncmp(modekey, "diff", 4)==0) return(DIFFERENCE_MODE);
if (strncmp(modekey, "lum ", 4)==0) return(VALUE_MODE); /* ? */
printf("PSD: Warning - unsupported layer-blend mode '%c%c%c%c', using 'addition' mode\n", modekey[0], modekey[1], modekey[2], modekey[3]);
if (strncmp(modekey, "lum ", 4)==0) return(VALUE_MODE);
#if (GIMP_MAJOR_VERSION > 0) && (GIMP_MINOR_VERSION > 0)
if (strncmp(modekey, "over", 4)==0) return(OVERLAY_MODE);
printf("PSD: Warning - unsupported layer-blend mode '%c%c%c%c', using "
"'overlay' mode\n", modekey[0], modekey[1], modekey[2], modekey[3]);
if (strncmp(modekey, "hLit", 4)==0) return(/**/OVERLAY_MODE);
if (strncmp(modekey, "sLit", 4)==0) return(/**/OVERLAY_MODE);
#else
printf("PSD: Warning - unsupported layer-blend mode '%c%c%c%c', using "
"'addition' mode\n", modekey[0], modekey[1], modekey[2], modekey[3]);
if (strncmp(modekey, "over", 4)==0) return(ADDITION_MODE); /* ? */
if (strncmp(modekey, "hLit", 4)==0) return(/**/ADDITION_MODE);
if (strncmp(modekey, "sLit", 4)==0) return(/**/ADDITION_MODE);
#endif
printf("PSD: Warning - UNKNOWN layer-blend mode, reverting to 'normal'\n");
......@@ -1022,14 +1033,14 @@ do_layer_pixeldata(FILE *fd, guint32 *offset)
/* we throw this away because in theory we can trust the
data to unpack to the right length... hmm... */
dumpchunk(height * 2,
throwchunk(height * 2,
fd, "widthlist");
(*offset) += height * 2;
blockread = (*offset);
IFDBG {printf("\nHere comes the guitar solo...\n");
fflush(stdout);}
/*IFDBG {printf("\nHere comes the guitar solo...\n");
fflush(stdout);}*/
for (linei=0;
linei<height;
......
/*
* PSD Plugin version 1.9.9.9e (BETA)
* PSD Plugin version 1.9.9.9f (BETA)
* This GIMP plug-in is designed to load Adobe Photoshop(tm) files (.PSD)
*
* Adam D. Moss <adam@gimp.org> <adam@foxbox.org>
......@@ -36,6 +36,9 @@
/*
* Revision history:
*
* 98.07.31 / v1.9.9.9f / Adam D. Moss
* Use OVERLAY_MODE if available.
*
* 98.07.31 / v1.9.9.9e / Adam D. Moss
* Worked around some buggy PSD savers (suspect PS4 on Mac) - ugh.
* Fixed a bug when loading layer masks of certain dimensions.
......@@ -424,14 +427,22 @@ psd_lmode_to_gimp_lmode (gchar modekey[4])
if (strncmp(modekey, "scrn", 4)==0) return(SCREEN_MODE);
if (strncmp(modekey, "diss", 4)==0) return(DISSOLVE_MODE);
if (strncmp(modekey, "diff", 4)==0) return(DIFFERENCE_MODE);
if (strncmp(modekey, "lum ", 4)==0) return(VALUE_MODE); /* ? */
printf("PSD: Warning - unsupported layer-blend mode '%c%c%c%c', using 'addition' mode\n", modekey[0], modekey[1], modekey[2], modekey[3]);
if (strncmp(modekey, "lum ", 4)==0) return(VALUE_MODE);
#if (GIMP_MAJOR_VERSION > 0) && (GIMP_MINOR_VERSION > 0)
if (strncmp(modekey, "over", 4)==0) return(OVERLAY_MODE);
printf("PSD: Warning - unsupported layer-blend mode '%c%c%c%c', using "
"'overlay' mode\n", modekey[0], modekey[1], modekey[2], modekey[3]);
if (strncmp(modekey, "hLit", 4)==0) return(/**/OVERLAY_MODE);
if (strncmp(modekey, "sLit", 4)==0) return(/**/OVERLAY_MODE);
#else
printf("PSD: Warning - unsupported layer-blend mode '%c%c%c%c', using "
"'addition' mode\n", modekey[0], modekey[1], modekey[2], modekey[3]);
if (strncmp(modekey, "over", 4)==0) return(ADDITION_MODE); /* ? */
if (strncmp(modekey, "hLit", 4)==0) return(/**/ADDITION_MODE);
if (strncmp(modekey, "sLit", 4)==0) return(/**/ADDITION_MODE);
#endif
printf("PSD: Warning - UNKNOWN layer-blend mode, reverting to 'normal'\n");
......@@ -1022,14 +1033,14 @@ do_layer_pixeldata(FILE *fd, guint32 *offset)
/* we throw this away because in theory we can trust the
data to unpack to the right length... hmm... */
dumpchunk(height * 2,
throwchunk(height * 2,
fd, "widthlist");
(*offset) += height * 2;
blockread = (*offset);
IFDBG {printf("\nHere comes the guitar solo...\n");
fflush(stdout);}
/*IFDBG {printf("\nHere comes the guitar solo...\n");
fflush(stdout);}*/
for (linei=0;
linei<height;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment