handle CAN_HANDLE_LAYERS_AS_ANIMATIONS correctly

* libgimp/gimpexport.c: handle CAN_HANDLE_LAYERS_AS_ANIMATIONS
  correctly

* app/scan_convert.c: trivial optimizations

* app/nav_window.c: applied the patch from Shuji Narazaki that makes
  the navigation window work with tablets. Fixed some rounding errors
  and stopped the flicker.


--Sven
This commit is contained in:
Sven Neumann 1999-10-21 19:35:35 +00:00
parent d21dc847fb
commit c3a1787087
7 changed files with 145 additions and 167 deletions

View File

@ -1,6 +1,17 @@
Thu Oct 21 21:29:40 MEST 1999 Sven Neumann <sven@gimp.org>
* libgimp/gimpexport.c: handle CAN_HANDLE_LAYERS_AS_ANIMATIONS
correctly
* app/scan_convert.c: trivial optimizations
* app/nav_window.c: applied the patch from Shuji Narazaki that makes
the navigation window work with tablets. Fixed some rounding errors
and stopped the flicker.
Thu Oct 21 14:35:05 MEST 1999 Sven Neumann <sven@gimp.org>
plug-ins/script-fu/script-fu-scripts.c: cleaned up the widget
* plug-ins/script-fu/script-fu-scripts.c: cleaned up the widget
destruction and inserted a few sanity checks. Unfortunately this
doesn't really solve our problems.

View File

@ -90,14 +90,20 @@ convert_segment (ScanConverter *sc,
int y2)
{
int ydiff, y, tmp;
guint height;
gint width;
gint height;
GSList **scanlines;
float xinc, xstart;
x1 = CLAMP(x1,0,(int)(sc->width * sc->antialias)-1);
y1 = CLAMP(y1,0,(int)(sc->height * sc->antialias)-1);
x2 = CLAMP(x2,0,(int)(sc->width * sc->antialias)-1);
y2 = CLAMP(y2,0,(int)(sc->height * sc->antialias)-1);
/* pre-calculate invariant commonly used values */
width = sc->width * sc->antialias;
height = sc->height * sc->antialias;
scanlines = sc->scanlines;
x1 = CLAMP (x1, 0, width - 1);
y1 = CLAMP (y1, 0, height - 1);
x2 = CLAMP (x2, 0, width - 1);
y2 = CLAMP (y2, 0, height - 1);
if (y1 > y2)
{
@ -107,20 +113,14 @@ convert_segment (ScanConverter *sc,
ydiff = (y2 - y1);
/* pre-calculate invariant commonly used values */
height = sc->height * sc->antialias;
scanlines = sc->scanlines;
if (ydiff)
{
xinc = (float) (x2 - x1) / (float) ydiff;
xstart = x1 + 0.5 * xinc;
for (y = y1 ; y < y2; y++)
{
if (y >= 0 && y < height)
scanlines[y] = insert_into_sorted_list (scanlines[y],
ROUND (xstart));
xstart += xinc;
scanlines[y] = insert_into_sorted_list (scanlines[y], ROUND (xstart));
xstart += xinc;
}
}
else
@ -288,7 +288,7 @@ scan_converter_to_channel (ScanConverter *sc,
list = g_slist_next (list);
if (!list)
{
g_message (_("Cannot properly scanline convert polygon!\n"));
g_message ("Cannot properly scanline convert polygon!\n");
}
else
{

View File

@ -43,10 +43,12 @@
#define MAX_BUF 256
#define PREVIEW_MASK GDK_EXPOSURE_MASK | \
GDK_BUTTON_PRESS_MASK | \
GDK_KEY_PRESS_MASK | \
GDK_KEY_RELEASE_MASK
#define PREVIEW_MASK GDK_EXPOSURE_MASK | \
GDK_BUTTON_PRESS_MASK | \
GDK_KEY_PRESS_MASK | \
GDK_KEY_RELEASE_MASK | \
GDK_POINTER_MOTION_MASK
/* Navigation preview sizes */
#define NAV_PREVIEW_WIDTH 112
@ -178,10 +180,10 @@ nav_window_disp_area (NavWinData *iwd,
xratio = SCALEFACTOR_X(gdisp);
yratio = SCALEFACTOR_Y(gdisp);
iwd->dispx = gdisp->offset_x*iwd->ratio/xratio;
iwd->dispy = gdisp->offset_y*iwd->ratio/yratio;
iwd->dispwidth = (gdisp->disp_width*iwd->ratio)/xratio;
iwd->dispheight = (gdisp->disp_height*iwd->ratio)/yratio;
iwd->dispx = gdisp->offset_x * iwd->ratio / xratio + 0.5;
iwd->dispy = gdisp->offset_y * iwd->ratio/yratio + 0.5;
iwd->dispwidth = (gdisp->disp_width * iwd->ratio) / xratio + 0.5;
iwd->dispheight = (gdisp->disp_height * iwd->ratio) / yratio + 0.5;
newwidth = gimage->width;
newheight = gimage->height;
@ -189,12 +191,12 @@ nav_window_disp_area (NavWinData *iwd,
if (!gdisp->dot_for_dot)
{
gdouble unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
newwidth = ((gdouble)newwidth * unit_factor)/(gdisp->gimage->xresolution);
newheight = ((gdouble)newheight * unit_factor)/(gdisp->gimage->yresolution);
iwd->dispx = ((gdouble)iwd->dispx * unit_factor)/(gdisp->gimage->xresolution);
iwd->dispy = ((gdouble)iwd->dispy * unit_factor)/(gdisp->gimage->yresolution);
iwd->dispwidth = ((gdouble)iwd->dispwidth * unit_factor)/(gdisp->gimage->xresolution);
iwd->dispheight = ((gdouble)iwd->dispheight * unit_factor)/(gdisp->gimage->yresolution);
newwidth = (gdouble)newwidth * unit_factor / gdisp->gimage->xresolution + 0.5;
newheight = (gdouble)newheight * unit_factor / gdisp->gimage->yresolution + 0.5;
iwd->dispx = (gdouble)iwd->dispx * unit_factor / gdisp->gimage->xresolution + 0.5;
iwd->dispy = (gdouble)iwd->dispy * unit_factor / gdisp->gimage->yresolution + 0.5;
iwd->dispwidth = (gdouble)iwd->dispwidth * unit_factor / gdisp->gimage->xresolution + 0.5;
iwd->dispheight = (gdouble)iwd->dispheight * unit_factor / gdisp->gimage->yresolution + 0.5;
}
if((iwd->imagewidth > 0 && newwidth != iwd->imagewidth) ||
@ -261,7 +263,7 @@ nav_window_draw_sqr (NavWinData *iwd,
{
/* first undraw from last co-ords */
gdk_draw_rectangle (iwd->preview->window, iwd->gc, FALSE,
iwd->dispx,iwd->dispy,
iwd->dispx, iwd->dispy,
iwd->dispwidth-BORDER_PEN_WIDTH+1,
iwd->dispheight-BORDER_PEN_WIDTH+1);
}
@ -420,8 +422,8 @@ update_real_view (NavWinData *iwd,
if (!gdisp->dot_for_dot)
{
gdouble unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
xpnt = ((gdouble)xpnt * (gdisp->gimage->xresolution))/(unit_factor)+0.5;
ypnt = ((gdouble)ypnt * (gdisp->gimage->yresolution))/(unit_factor)+0.5;
xpnt = ((gdouble)xpnt * gdisp->gimage->xresolution) / unit_factor + 0.5;
ypnt = ((gdouble)ypnt * gdisp->gimage->yresolution) / unit_factor + 0.5;
}
xoffset = xpnt - gdisp->offset_x;
@ -664,25 +666,8 @@ move_to_point (NavWinData *iwd,
gint tx,
gint ty)
{
if(tx < 0)
{
tx = 0;
}
if(tx > iwd->pwidth)
{
tx = iwd->pwidth;
}
if(ty < 0)
{
ty = 0;
}
if(ty > iwd->pheight)
{
ty = iwd->pwidth;
}
tx = CLAMP (tx, 0, iwd->pwidth);
ty = CLAMP (ty, 0, iwd->pheight);
if((tx + iwd->dispwidth) >= iwd->pwidth)
{
@ -694,13 +679,16 @@ move_to_point (NavWinData *iwd,
ty = iwd->pheight - iwd->dispheight;
}
if (iwd->dispx == tx && iwd->dispy == ty)
return;
/* Update the real display */
update_real_view(iwd,tx,ty);
nav_window_draw_sqr(iwd,
TRUE,
tx,ty,
iwd->dispwidth,iwd->dispheight);
tx, ty,
iwd->dispwidth, iwd->dispheight);
}

View File

@ -43,10 +43,12 @@
#define MAX_BUF 256
#define PREVIEW_MASK GDK_EXPOSURE_MASK | \
GDK_BUTTON_PRESS_MASK | \
GDK_KEY_PRESS_MASK | \
GDK_KEY_RELEASE_MASK
#define PREVIEW_MASK GDK_EXPOSURE_MASK | \
GDK_BUTTON_PRESS_MASK | \
GDK_KEY_PRESS_MASK | \
GDK_KEY_RELEASE_MASK | \
GDK_POINTER_MOTION_MASK
/* Navigation preview sizes */
#define NAV_PREVIEW_WIDTH 112
@ -178,10 +180,10 @@ nav_window_disp_area (NavWinData *iwd,
xratio = SCALEFACTOR_X(gdisp);
yratio = SCALEFACTOR_Y(gdisp);
iwd->dispx = gdisp->offset_x*iwd->ratio/xratio;
iwd->dispy = gdisp->offset_y*iwd->ratio/yratio;
iwd->dispwidth = (gdisp->disp_width*iwd->ratio)/xratio;
iwd->dispheight = (gdisp->disp_height*iwd->ratio)/yratio;
iwd->dispx = gdisp->offset_x * iwd->ratio / xratio + 0.5;
iwd->dispy = gdisp->offset_y * iwd->ratio/yratio + 0.5;
iwd->dispwidth = (gdisp->disp_width * iwd->ratio) / xratio + 0.5;
iwd->dispheight = (gdisp->disp_height * iwd->ratio) / yratio + 0.5;
newwidth = gimage->width;
newheight = gimage->height;
@ -189,12 +191,12 @@ nav_window_disp_area (NavWinData *iwd,
if (!gdisp->dot_for_dot)
{
gdouble unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
newwidth = ((gdouble)newwidth * unit_factor)/(gdisp->gimage->xresolution);
newheight = ((gdouble)newheight * unit_factor)/(gdisp->gimage->yresolution);
iwd->dispx = ((gdouble)iwd->dispx * unit_factor)/(gdisp->gimage->xresolution);
iwd->dispy = ((gdouble)iwd->dispy * unit_factor)/(gdisp->gimage->yresolution);
iwd->dispwidth = ((gdouble)iwd->dispwidth * unit_factor)/(gdisp->gimage->xresolution);
iwd->dispheight = ((gdouble)iwd->dispheight * unit_factor)/(gdisp->gimage->yresolution);
newwidth = (gdouble)newwidth * unit_factor / gdisp->gimage->xresolution + 0.5;
newheight = (gdouble)newheight * unit_factor / gdisp->gimage->yresolution + 0.5;
iwd->dispx = (gdouble)iwd->dispx * unit_factor / gdisp->gimage->xresolution + 0.5;
iwd->dispy = (gdouble)iwd->dispy * unit_factor / gdisp->gimage->yresolution + 0.5;
iwd->dispwidth = (gdouble)iwd->dispwidth * unit_factor / gdisp->gimage->xresolution + 0.5;
iwd->dispheight = (gdouble)iwd->dispheight * unit_factor / gdisp->gimage->yresolution + 0.5;
}
if((iwd->imagewidth > 0 && newwidth != iwd->imagewidth) ||
@ -261,7 +263,7 @@ nav_window_draw_sqr (NavWinData *iwd,
{
/* first undraw from last co-ords */
gdk_draw_rectangle (iwd->preview->window, iwd->gc, FALSE,
iwd->dispx,iwd->dispy,
iwd->dispx, iwd->dispy,
iwd->dispwidth-BORDER_PEN_WIDTH+1,
iwd->dispheight-BORDER_PEN_WIDTH+1);
}
@ -420,8 +422,8 @@ update_real_view (NavWinData *iwd,
if (!gdisp->dot_for_dot)
{
gdouble unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
xpnt = ((gdouble)xpnt * (gdisp->gimage->xresolution))/(unit_factor)+0.5;
ypnt = ((gdouble)ypnt * (gdisp->gimage->yresolution))/(unit_factor)+0.5;
xpnt = ((gdouble)xpnt * gdisp->gimage->xresolution) / unit_factor + 0.5;
ypnt = ((gdouble)ypnt * gdisp->gimage->yresolution) / unit_factor + 0.5;
}
xoffset = xpnt - gdisp->offset_x;
@ -664,25 +666,8 @@ move_to_point (NavWinData *iwd,
gint tx,
gint ty)
{
if(tx < 0)
{
tx = 0;
}
if(tx > iwd->pwidth)
{
tx = iwd->pwidth;
}
if(ty < 0)
{
ty = 0;
}
if(ty > iwd->pheight)
{
ty = iwd->pwidth;
}
tx = CLAMP (tx, 0, iwd->pwidth);
ty = CLAMP (ty, 0, iwd->pheight);
if((tx + iwd->dispwidth) >= iwd->pwidth)
{
@ -694,13 +679,16 @@ move_to_point (NavWinData *iwd,
ty = iwd->pheight - iwd->dispheight;
}
if (iwd->dispx == tx && iwd->dispy == ty)
return;
/* Update the real display */
update_real_view(iwd,tx,ty);
nav_window_draw_sqr(iwd,
TRUE,
tx,ty,
iwd->dispwidth,iwd->dispheight);
tx, ty,
iwd->dispwidth, iwd->dispheight);
}

View File

@ -43,10 +43,12 @@
#define MAX_BUF 256
#define PREVIEW_MASK GDK_EXPOSURE_MASK | \
GDK_BUTTON_PRESS_MASK | \
GDK_KEY_PRESS_MASK | \
GDK_KEY_RELEASE_MASK
#define PREVIEW_MASK GDK_EXPOSURE_MASK | \
GDK_BUTTON_PRESS_MASK | \
GDK_KEY_PRESS_MASK | \
GDK_KEY_RELEASE_MASK | \
GDK_POINTER_MOTION_MASK
/* Navigation preview sizes */
#define NAV_PREVIEW_WIDTH 112
@ -178,10 +180,10 @@ nav_window_disp_area (NavWinData *iwd,
xratio = SCALEFACTOR_X(gdisp);
yratio = SCALEFACTOR_Y(gdisp);
iwd->dispx = gdisp->offset_x*iwd->ratio/xratio;
iwd->dispy = gdisp->offset_y*iwd->ratio/yratio;
iwd->dispwidth = (gdisp->disp_width*iwd->ratio)/xratio;
iwd->dispheight = (gdisp->disp_height*iwd->ratio)/yratio;
iwd->dispx = gdisp->offset_x * iwd->ratio / xratio + 0.5;
iwd->dispy = gdisp->offset_y * iwd->ratio/yratio + 0.5;
iwd->dispwidth = (gdisp->disp_width * iwd->ratio) / xratio + 0.5;
iwd->dispheight = (gdisp->disp_height * iwd->ratio) / yratio + 0.5;
newwidth = gimage->width;
newheight = gimage->height;
@ -189,12 +191,12 @@ nav_window_disp_area (NavWinData *iwd,
if (!gdisp->dot_for_dot)
{
gdouble unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
newwidth = ((gdouble)newwidth * unit_factor)/(gdisp->gimage->xresolution);
newheight = ((gdouble)newheight * unit_factor)/(gdisp->gimage->yresolution);
iwd->dispx = ((gdouble)iwd->dispx * unit_factor)/(gdisp->gimage->xresolution);
iwd->dispy = ((gdouble)iwd->dispy * unit_factor)/(gdisp->gimage->yresolution);
iwd->dispwidth = ((gdouble)iwd->dispwidth * unit_factor)/(gdisp->gimage->xresolution);
iwd->dispheight = ((gdouble)iwd->dispheight * unit_factor)/(gdisp->gimage->yresolution);
newwidth = (gdouble)newwidth * unit_factor / gdisp->gimage->xresolution + 0.5;
newheight = (gdouble)newheight * unit_factor / gdisp->gimage->yresolution + 0.5;
iwd->dispx = (gdouble)iwd->dispx * unit_factor / gdisp->gimage->xresolution + 0.5;
iwd->dispy = (gdouble)iwd->dispy * unit_factor / gdisp->gimage->yresolution + 0.5;
iwd->dispwidth = (gdouble)iwd->dispwidth * unit_factor / gdisp->gimage->xresolution + 0.5;
iwd->dispheight = (gdouble)iwd->dispheight * unit_factor / gdisp->gimage->yresolution + 0.5;
}
if((iwd->imagewidth > 0 && newwidth != iwd->imagewidth) ||
@ -261,7 +263,7 @@ nav_window_draw_sqr (NavWinData *iwd,
{
/* first undraw from last co-ords */
gdk_draw_rectangle (iwd->preview->window, iwd->gc, FALSE,
iwd->dispx,iwd->dispy,
iwd->dispx, iwd->dispy,
iwd->dispwidth-BORDER_PEN_WIDTH+1,
iwd->dispheight-BORDER_PEN_WIDTH+1);
}
@ -420,8 +422,8 @@ update_real_view (NavWinData *iwd,
if (!gdisp->dot_for_dot)
{
gdouble unit_factor = gimp_unit_get_factor (gdisp->gimage->unit);
xpnt = ((gdouble)xpnt * (gdisp->gimage->xresolution))/(unit_factor)+0.5;
ypnt = ((gdouble)ypnt * (gdisp->gimage->yresolution))/(unit_factor)+0.5;
xpnt = ((gdouble)xpnt * gdisp->gimage->xresolution) / unit_factor + 0.5;
ypnt = ((gdouble)ypnt * gdisp->gimage->yresolution) / unit_factor + 0.5;
}
xoffset = xpnt - gdisp->offset_x;
@ -664,25 +666,8 @@ move_to_point (NavWinData *iwd,
gint tx,
gint ty)
{
if(tx < 0)
{
tx = 0;
}
if(tx > iwd->pwidth)
{
tx = iwd->pwidth;
}
if(ty < 0)
{
ty = 0;
}
if(ty > iwd->pheight)
{
ty = iwd->pwidth;
}
tx = CLAMP (tx, 0, iwd->pwidth);
ty = CLAMP (ty, 0, iwd->pheight);
if((tx + iwd->dispwidth) >= iwd->pwidth)
{
@ -694,13 +679,16 @@ move_to_point (NavWinData *iwd,
ty = iwd->pheight - iwd->dispheight;
}
if (iwd->dispx == tx && iwd->dispy == ty)
return;
/* Update the real display */
update_real_view(iwd,tx,ty);
nav_window_draw_sqr(iwd,
TRUE,
tx,ty,
iwd->dispwidth,iwd->dispheight);
tx, ty,
iwd->dispwidth, iwd->dispheight);
}

View File

@ -90,14 +90,20 @@ convert_segment (ScanConverter *sc,
int y2)
{
int ydiff, y, tmp;
guint height;
gint width;
gint height;
GSList **scanlines;
float xinc, xstart;
x1 = CLAMP(x1,0,(int)(sc->width * sc->antialias)-1);
y1 = CLAMP(y1,0,(int)(sc->height * sc->antialias)-1);
x2 = CLAMP(x2,0,(int)(sc->width * sc->antialias)-1);
y2 = CLAMP(y2,0,(int)(sc->height * sc->antialias)-1);
/* pre-calculate invariant commonly used values */
width = sc->width * sc->antialias;
height = sc->height * sc->antialias;
scanlines = sc->scanlines;
x1 = CLAMP (x1, 0, width - 1);
y1 = CLAMP (y1, 0, height - 1);
x2 = CLAMP (x2, 0, width - 1);
y2 = CLAMP (y2, 0, height - 1);
if (y1 > y2)
{
@ -107,20 +113,14 @@ convert_segment (ScanConverter *sc,
ydiff = (y2 - y1);
/* pre-calculate invariant commonly used values */
height = sc->height * sc->antialias;
scanlines = sc->scanlines;
if (ydiff)
{
xinc = (float) (x2 - x1) / (float) ydiff;
xstart = x1 + 0.5 * xinc;
for (y = y1 ; y < y2; y++)
{
if (y >= 0 && y < height)
scanlines[y] = insert_into_sorted_list (scanlines[y],
ROUND (xstart));
xstart += xinc;
scanlines[y] = insert_into_sorted_list (scanlines[y], ROUND (xstart));
xstart += xinc;
}
}
else
@ -288,7 +288,7 @@ scan_converter_to_channel (ScanConverter *sc,
list = g_slist_next (list);
if (!list)
{
g_message (_("Cannot properly scanline convert polygon!\n"));
g_message ("Cannot properly scanline convert polygon!\n");
}
else
{

View File

@ -233,7 +233,7 @@ export_toggle_callback (GtkWidget *widget,
}
static gint
export_dialog (GList *actions,
export_dialog (GSList *actions,
gchar *format)
{
GtkWidget *frame;
@ -241,7 +241,7 @@ export_dialog (GList *actions,
GtkWidget *hbox;
GtkWidget *hbbox;
GtkWidget *label;
GList *list;
GSList *list;
gchar *text;
ExportAction *action;
@ -371,8 +371,8 @@ gimp_export_image (gint32 *image_ID_ptr,
gchar *format,
gint cap) /* cap like capabilities */
{
GList *actions = NULL;
GList *list;
GSList *actions = NULL;
GSList *list;
GimpImageBaseType type;
gint i;
gint nlayers;
@ -397,7 +397,7 @@ gimp_export_image (gint32 *image_ID_ptr,
{
if ( !(cap & CAN_HANDLE_ALPHA) )
{
actions = g_list_append (actions, &export_action_flatten);
actions = g_slist_prepend (actions, &export_action_flatten);
added_flatten = TRUE;
break;
}
@ -406,7 +406,7 @@ gimp_export_image (gint32 *image_ID_ptr,
{
if (cap & NEEDS_ALPHA)
{
actions = g_list_append (actions, &export_action_add_alpha);
actions = g_slist_prepend (actions, &export_action_add_alpha);
break;
}
}
@ -416,10 +416,10 @@ gimp_export_image (gint32 *image_ID_ptr,
/* check multiple layers */
if (!added_flatten && nlayers > 1)
{
if ( !(cap & CAN_HANDLE_LAYERS) && (cap & CAN_HANDLE_LAYERS_AS_ANIMATION))
actions = g_list_append (actions, &export_action_animate_or_merge);
else if (! (cap & CAN_HANDLE_LAYERS))
actions = g_list_append (actions, &export_action_merge);
if ((cap & CAN_HANDLE_LAYERS_AS_ANIMATION))
actions = g_slist_prepend (actions, &export_action_animate_or_merge);
else if ( !(cap & CAN_HANDLE_LAYERS))
actions = g_slist_prepend (actions, &export_action_merge);
}
/* check the image type */
@ -430,39 +430,42 @@ gimp_export_image (gint32 *image_ID_ptr,
if ( !(cap & CAN_HANDLE_RGB) )
{
if ((cap & CAN_HANDLE_INDEXED) && (cap & CAN_HANDLE_GRAY))
actions = g_list_append (actions, &export_action_convert_indexed_or_grayscale);
actions = g_slist_prepend (actions, &export_action_convert_indexed_or_grayscale);
else if (cap & CAN_HANDLE_INDEXED)
actions = g_list_append (actions, &export_action_convert_indexed);
actions = g_slist_prepend (actions, &export_action_convert_indexed);
else if (cap & CAN_HANDLE_GRAY)
actions = g_list_append (actions, &export_action_convert_grayscale);
actions = g_slist_prepend (actions, &export_action_convert_grayscale);
}
break;
case GIMP_GRAY:
if ( !(cap & CAN_HANDLE_GRAY) )
{
if ((cap & CAN_HANDLE_RGB) && (cap & CAN_HANDLE_INDEXED))
actions = g_list_append (actions, &export_action_convert_rgb_or_indexed);
actions = g_slist_prepend (actions, &export_action_convert_rgb_or_indexed);
else if (cap & CAN_HANDLE_RGB)
actions = g_list_append (actions, &export_action_convert_rgb);
actions = g_slist_prepend (actions, &export_action_convert_rgb);
else if (cap & CAN_HANDLE_INDEXED)
actions = g_list_append (actions, &export_action_convert_indexed);
actions = g_slist_prepend (actions, &export_action_convert_indexed);
}
break;
case GIMP_INDEXED:
if ( !(cap & CAN_HANDLE_INDEXED) )
{
if ((cap & CAN_HANDLE_RGB) && (cap & CAN_HANDLE_GRAY))
actions = g_list_append (actions, &export_action_convert_rgb_or_grayscale);
actions = g_slist_prepend (actions, &export_action_convert_rgb_or_grayscale);
else if (cap & CAN_HANDLE_RGB)
actions = g_list_append (actions, &export_action_convert_rgb);
actions = g_slist_prepend (actions, &export_action_convert_rgb);
else if (cap & CAN_HANDLE_GRAY)
actions = g_list_append (actions, &export_action_convert_grayscale);
actions = g_slist_prepend (actions, &export_action_convert_grayscale);
}
break;
}
if (actions)
dialog_return = export_dialog (actions, format);
{
actions = g_slist_reverse (actions);
dialog_return = export_dialog (actions, format);
}
else
dialog_return = EXPORT_IGNORE;