renamed gimp_convert_*() functions to gimp_image_convert_*().

2003-12-04  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/convert.pdb: renamed gimp_convert_*() functions
	to gimp_image_convert_*().

	* libgimp/gimpimage.[ch]: removed gimp_image_convert_* #defines.

	* libgimp/gimpcompat.h: added old stuff.

	* app/pdb/convert_cmds.c
	* libgimp/gimpconvert_pdb.[ch]: regenerated.

	* plug-ins/common/gifload.c
	* plug-ins/common/gih.c
	* plug-ins/common/sample_colorize.c
	* plug-ins/common/winclipboard.c
	* plug-ins/script-fu/scripts/burn-in-anim.scm
	* plug-ins/script-fu/scripts/chrome-it.scm
	* plug-ins/script-fu/scripts/crystal-logo.scm
	* plug-ins/script-fu/scripts/fuzzyborder.scm
	* plug-ins/script-fu/scripts/gimp-headers.scm
	* plug-ins/script-fu/scripts/gimp-labels.scm
	* plug-ins/script-fu/scripts/sota-chrome-logo.scm
	* plug-ins/script-fu/scripts/spinning-globe.scm: changed accordingly.
This commit is contained in:
Michael Natterer
2003-12-04 14:52:49 +00:00
committed by Michael Natterer
parent 6af5072c6b
commit a7b5c6a462
13 changed files with 88 additions and 85 deletions

View File

@ -895,7 +895,7 @@ ReadImage (FILE *fd,
#ifdef GIFDEBUG #ifdef GIFDEBUG
g_print ("GIF: Promoting image to RGB...\n"); g_print ("GIF: Promoting image to RGB...\n");
#endif #endif
gimp_convert_rgb (image_ID); gimp_image_convert_rgb (image_ID);
break; break;
} }

View File

@ -555,7 +555,7 @@ gih_load_one_brush (gint fd,
case 4: case 4:
image_type = GIMP_RGBA_IMAGE; image_type = GIMP_RGBA_IMAGE;
if (gimp_image_base_type (image_ID) == GIMP_GRAY) if (gimp_image_base_type (image_ID) == GIMP_GRAY)
gimp_convert_rgb (image_ID); gimp_image_convert_rgb (image_ID);
break; break;
default: default:

View File

@ -3109,7 +3109,7 @@ p_main_colorize (gint mc_flags)
{ {
if (mc_flags & MC_DST_REMAP) if (mc_flags & MC_DST_REMAP)
{ {
gimp_convert_rgb (gimp_drawable_get_image (g_values.dst_id)); gimp_image_convert_rgb (gimp_drawable_get_image (g_values.dst_id));
} }
} }

View File

@ -36,7 +36,7 @@
/* History: /* History:
* *
* 08/07/99 Implementation and release. * 08/07/99 Implementation and release.
* 08/10/99 Big speed increase by using gimp_tile_cache_size() * 08/10/99 Big speed increase by using gimp_tile_cache_size()
* Thanks to Kevin Turner's documentation at: * Thanks to Kevin Turner's documentation at:
@ -161,7 +161,7 @@ run (const gchar *name,
{ {
*nreturn_vals = 1; *nreturn_vals = 1;
if (CB_CopyImage (GIMP_RUN_INTERACTIVE==run_mode, if (CB_CopyImage (GIMP_RUN_INTERACTIVE==run_mode,
param[1].data.d_int32, param[1].data.d_int32,
param[2].data.d_int32)) param[2].data.d_int32))
values[0].data.d_status = GIMP_PDB_SUCCESS; values[0].data.d_status = GIMP_PDB_SUCCESS;
else else
@ -171,7 +171,7 @@ run (const gchar *name,
{ {
*nreturn_vals = 1; *nreturn_vals = 1;
if (CB_PasteImage (GIMP_RUN_INTERACTIVE==run_mode, if (CB_PasteImage (GIMP_RUN_INTERACTIVE==run_mode,
param[1].data.d_int32, param[1].data.d_int32,
param[2].data.d_int32)) param[2].data.d_int32))
values[0].data.d_status = GIMP_PDB_SUCCESS; values[0].data.d_status = GIMP_PDB_SUCCESS;
else else
@ -226,19 +226,19 @@ CB_CopyImage (gboolean interactive,
nSizeDIB = nSizeLine * drawable->height nSizeDIB = nSizeLine * drawable->height
+ sizeof (BITMAPINFOHEADER); + sizeof (BITMAPINFOHEADER);
} }
hDIB = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, nSizeDIB); hDIB = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, nSizeDIB);
if (NULL == hDIB) if (NULL == hDIB)
{ {
g_message ("Failed to allocate DIB"); g_message ("Failed to allocate DIB");
bRet = FALSE; bRet = FALSE;
} }
/* fill header info */ /* fill header info */
if (bRet) if (bRet)
{ {
BITMAPINFOHEADER *pInfo; BITMAPINFOHEADER *pInfo;
bRet = FALSE; bRet = FALSE;
pInfo = GlobalLock (hDIB); pInfo = GlobalLock (hDIB);
if (pInfo) if (pInfo)
@ -255,19 +255,19 @@ CB_CopyImage (gboolean interactive,
/* color map size */ /* color map size */
pInfo->biClrUsed = (GIMP_INDEXED_IMAGE == drawable_type ? 256 : 0); pInfo->biClrUsed = (GIMP_INDEXED_IMAGE == drawable_type ? 256 : 0);
pInfo->biClrImportant = 0; /* all */ pInfo->biClrImportant = 0; /* all */
GlobalUnlock (hDIB); GlobalUnlock (hDIB);
bRet = TRUE; bRet = TRUE;
} /* (pInfo) */ } /* (pInfo) */
else else
g_message("Failed to lock DIB Header"); g_message("Failed to lock DIB Header");
} }
/* fill color map */ /* fill color map */
if (bRet && (GIMP_INDEXED_IMAGE == drawable_type)) if (bRet && (GIMP_INDEXED_IMAGE == drawable_type))
{ {
char *pBmp; char *pBmp;
bRet = FALSE; bRet = FALSE;
pBmp = GlobalLock (hDIB); pBmp = GlobalLock (hDIB);
if (pBmp) if (pBmp)
@ -277,10 +277,10 @@ CB_CopyImage (gboolean interactive,
unsigned char *cmap; unsigned char *cmap;
pPal = (RGBQUAD*)(pBmp + sizeof(BITMAPINFOHEADER)); pPal = (RGBQUAD*)(pBmp + sizeof(BITMAPINFOHEADER));
nSizePal = sizeof(RGBQUAD) * 256; nSizePal = sizeof(RGBQUAD) * 256;
/* get the gimp colormap */ /* get the gimp colormap */
cmap = gimp_image_get_cmap (image_ID, &nColors); cmap = gimp_image_get_cmap (image_ID, &nColors);
if (cmap) if (cmap)
{ {
int i; int i;
@ -291,7 +291,7 @@ CB_CopyImage (gboolean interactive,
pPal[i].rgbGreen = cmap[3*i+1]; pPal[i].rgbGreen = cmap[3*i+1];
pPal[i].rgbBlue = cmap[3*i+2]; pPal[i].rgbBlue = cmap[3*i+2];
} }
g_free(cmap); g_free(cmap);
bRet = TRUE; bRet = TRUE;
} /* (cmap) */ } /* (cmap) */
@ -302,31 +302,31 @@ CB_CopyImage (gboolean interactive,
else else
g_message ("Failed to lock DIB Palette"); g_message ("Failed to lock DIB Palette");
} /* indexed */ } /* indexed */
/* following the slow part ... */ /* following the slow part ... */
if (interactive) if (interactive)
gimp_progress_init (_("Copying...")); gimp_progress_init (_("Copying..."));
/* speed it up with: */ /* speed it up with: */
gimp_tile_cache_size (drawable->width * gimp_tile_height () * drawable->bpp); gimp_tile_cache_size (drawable->width * gimp_tile_height () * drawable->bpp);
/* copy data to DIB */ /* copy data to DIB */
if (bRet) if (bRet)
{ {
unsigned char *pData; unsigned char *pData;
bRet = FALSE; bRet = FALSE;
pData = GlobalLock (hDIB); pData = GlobalLock (hDIB);
if (pData) if (pData)
{ {
unsigned char *pLine; unsigned char *pLine;
/* calculate real offset */ /* calculate real offset */
pData += (sizeof(BITMAPINFOHEADER) + nSizePal); pData += (sizeof(BITMAPINFOHEADER) + nSizePal);
pLine = g_new (guchar, drawable->width * drawable->bpp); pLine = g_new (guchar, drawable->width * drawable->bpp);
if (GIMP_INDEXED_IMAGE == drawable_type) if (GIMP_INDEXED_IMAGE == drawable_type)
{ {
int x, y; int x, y;
@ -334,8 +334,8 @@ CB_CopyImage (gboolean interactive,
{ {
if ((interactive) && (StepProgress(y,drawable->height))) if ((interactive) && (StepProgress(y,drawable->height)))
gimp_progress_update ((double)y / drawable->height); gimp_progress_update ((double)y / drawable->height);
gimp_pixel_rgn_get_row (&pixel_rgn, pLine, 0, gimp_pixel_rgn_get_row (&pixel_rgn, pLine, 0,
drawable->height-y-1, /* invert it */ drawable->height-y-1, /* invert it */
drawable->width); drawable->width);
for (x = 0; x < drawable->width; x++) for (x = 0; x < drawable->width; x++)
@ -349,8 +349,8 @@ CB_CopyImage (gboolean interactive,
{ {
if ((interactive) && (StepProgress(y,drawable->height))) if ((interactive) && (StepProgress(y,drawable->height)))
gimp_progress_update ((double)y / drawable->height); gimp_progress_update ((double)y / drawable->height);
gimp_pixel_rgn_get_row (&pixel_rgn, pLine, 0, gimp_pixel_rgn_get_row (&pixel_rgn, pLine, 0,
drawable->height-y-1, /* invert it */ drawable->height-y-1, /* invert it */
drawable->width); drawable->width);
for (x = 0; x < drawable->width; x++) for (x = 0; x < drawable->width; x++)
@ -363,18 +363,18 @@ CB_CopyImage (gboolean interactive,
} }
} }
} }
g_free (pLine); g_free (pLine);
bRet = TRUE; bRet = TRUE;
GlobalUnlock (hDIB); GlobalUnlock (hDIB);
} /* (pData) */ } /* (pData) */
else else
g_message("Failed to lock DIB Data"); g_message("Failed to lock DIB Data");
} /* copy data to DIB */ } /* copy data to DIB */
/* copy DIB to ClipBoard */ /* copy DIB to ClipBoard */
if (bRet) if (bRet)
{ {
if (!OpenClipboard (NULL)) if (!OpenClipboard (NULL))
{ {
@ -395,7 +395,7 @@ CB_CopyImage (gboolean interactive,
else else
g_message ("Failed to set clipboard data "); g_message ("Failed to set clipboard data ");
} }
if (!CloseClipboard ()) if (!CloseClipboard ())
g_message ("Failed to close Clipboard"); g_message ("Failed to close Clipboard");
} }
@ -403,9 +403,9 @@ CB_CopyImage (gboolean interactive,
/* done */ /* done */
if (hDIB) if (hDIB)
GlobalFree(hDIB); GlobalFree(hDIB);
gimp_drawable_detach (drawable); gimp_drawable_detach (drawable);
return bRet; return bRet;
} /* CB_CopyImage */ } /* CB_CopyImage */
@ -461,31 +461,31 @@ CB_PasteImage (gboolean interactive,
g_message("Failed to open clipboard"); g_message("Failed to open clipboard");
return FALSE; return FALSE;
} }
fmt = EnumClipboardFormats (0); fmt = EnumClipboardFormats (0);
while ((CF_BITMAP != fmt) && (CF_DIB != fmt) && (0 != fmt)) while ((CF_BITMAP != fmt) && (CF_DIB != fmt) && (0 != fmt))
fmt = EnumClipboardFormats (fmt); fmt = EnumClipboardFormats (fmt);
if (0 == fmt) if (0 == fmt)
{ {
g_message (_("Unsupported format or Clipboard empty!")); g_message (_("Unsupported format or Clipboard empty!"));
bRet = FALSE; bRet = FALSE;
} }
/* there is something supported */ /* there is something supported */
if (bRet) if (bRet)
{ {
hDIB = GetClipboardData (CF_DIB); hDIB = GetClipboardData (CF_DIB);
if (NULL == hDIB) if (NULL == hDIB)
{ {
g_message (_("Can't get Clipboard data.")); g_message (_("Can't get Clipboard data."));
bRet = FALSE; bRet = FALSE;
} }
} }
/* read header */ /* read header */
if (bRet && hDIB) if (bRet && hDIB)
{ {
pInfo = GlobalLock (hDIB); pInfo = GlobalLock (hDIB);
if (NULL == pInfo) if (NULL == pInfo)
@ -493,7 +493,7 @@ CB_PasteImage (gboolean interactive,
g_message ("Can't lock Clipboard data!"); g_message ("Can't lock Clipboard data!");
bRet = FALSE; bRet = FALSE;
} }
if (bRet && pInfo->bmiHeader.biCompression == BI_BITFIELDS) if (bRet && pInfo->bmiHeader.biCompression == BI_BITFIELDS)
{ {
maskR = ((DWORD *)pInfo->bmiColors)[0]; maskR = ((DWORD *)pInfo->bmiColors)[0];
@ -512,12 +512,12 @@ CB_PasteImage (gboolean interactive,
|| (pInfo->bmiHeader.biCompression != BI_RGB || (pInfo->bmiHeader.biCompression != BI_RGB
&& pInfo->bmiHeader.biCompression != BI_BITFIELDS)))) && pInfo->bmiHeader.biCompression != BI_BITFIELDS))))
{ {
g_message ("Unsupported bitmap format (%d)!", g_message ("Unsupported bitmap format (%d)!",
pInfo->bmiHeader.biCompression); pInfo->bmiHeader.biCompression);
bRet = FALSE; bRet = FALSE;
} }
if (bRet && pInfo) if (bRet && pInfo)
{ {
nWidth = pInfo->bmiHeader.biWidth; nWidth = pInfo->bmiHeader.biWidth;
nHeight = pInfo->bmiHeader.biHeight; nHeight = pInfo->bmiHeader.biHeight;
@ -525,7 +525,7 @@ CB_PasteImage (gboolean interactive,
nColors = pInfo->bmiHeader.biClrUsed; nColors = pInfo->bmiHeader.biClrUsed;
} }
} }
if ((0 != nWidth) && (0 != nHeight)) if ((0 != nWidth) && (0 != nHeight))
{ {
GimpDrawable *drawable; GimpDrawable *drawable;
@ -538,7 +538,7 @@ CB_PasteImage (gboolean interactive,
guchar *pLine; guchar *pLine;
RGBQUAD *pPal; RGBQUAD *pPal;
const int nSizeLine = ((nWidth*(nBitsPS/8)-1)/4+1)*4; const int nSizeLine = ((nWidth*(nBitsPS/8)-1)/4+1)*4;
/* Check if clipboard data and existing image are compatible */ /* Check if clipboard data and existing image are compatible */
if (IMAGE_NONE != drawable_ID) if (IMAGE_NONE != drawable_ID)
{ {
@ -546,49 +546,49 @@ CB_PasteImage (gboolean interactive,
oldBPP = drawable->bpp; oldBPP = drawable->bpp;
gimp_drawable_detach (drawable); gimp_drawable_detach (drawable);
} }
if ((IMAGE_NONE == image_ID) if ((IMAGE_NONE == image_ID)
|| (3 != oldBPP) || (24 != nBitsPS)) || (3 != oldBPP) || (24 != nBitsPS))
{ {
/* create new image */ /* create new image */
image_ID = gimp_image_new (nWidth, nHeight, nBitsPS <= 8 ? GIMP_INDEXED : GIMP_RGB); image_ID = gimp_image_new (nWidth, nHeight, nBitsPS <= 8 ? GIMP_INDEXED : GIMP_RGB);
gimp_image_undo_disable(image_ID); gimp_image_undo_disable(image_ID);
drawable_ID = gimp_layer_new (image_ID, _("Background"), nWidth, nHeight, drawable_ID = gimp_layer_new (image_ID, _("Background"), nWidth, nHeight,
nBitsPS <= 8 ? GIMP_INDEXED_IMAGE : GIMP_RGB_IMAGE, nBitsPS <= 8 ? GIMP_INDEXED_IMAGE : GIMP_RGB_IMAGE,
100, GIMP_NORMAL_MODE); 100, GIMP_NORMAL_MODE);
} }
else else
{ {
/* ??? gimp_convert_rgb (image_ID); /* ??? gimp_image_convert_rgb (image_ID);
*/ */
drawable_ID = gimp_layer_new (image_ID, _("Pasted"), nWidth, nHeight, drawable_ID = gimp_layer_new (image_ID, _("Pasted"), nWidth, nHeight,
nBitsPS <= 8 ? GIMP_INDEXED_IMAGE : GIMP_RGB_IMAGE, nBitsPS <= 8 ? GIMP_INDEXED_IMAGE : GIMP_RGB_IMAGE,
100, GIMP_NORMAL_MODE); 100, GIMP_NORMAL_MODE);
bIsNewImage = FALSE; bIsNewImage = FALSE;
} }
gimp_image_add_layer (image_ID, drawable_ID, -1); gimp_image_add_layer (image_ID, drawable_ID, -1);
drawable = gimp_drawable_get (drawable_ID); drawable = gimp_drawable_get (drawable_ID);
gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, FALSE, FALSE); gimp_pixel_rgn_init (&pixel_rgn, drawable, 0, 0, drawable->width, drawable->height, FALSE, FALSE);
/* following the slow part ... */ /* following the slow part ... */
if (interactive) if (interactive)
gimp_progress_init (_("Pasting...")); gimp_progress_init (_("Pasting..."));
/* adjust pointer */ /* adjust pointer */
pPal = pInfo->bmiColors; pPal = pInfo->bmiColors;
if (pInfo->bmiHeader.biCompression == BI_BITFIELDS) if (pInfo->bmiHeader.biCompression == BI_BITFIELDS)
pData = (guchar*)pPal + sizeof(DWORD) * 3; pData = (guchar*)pPal + sizeof(DWORD) * 3;
else else
pData = (guchar*)pPal + sizeof(RGBQUAD) * nColors; pData = (guchar*)pPal + sizeof(RGBQUAD) * nColors;
/* create palette */ /* create palette */
if (0 != nColors) if (0 != nColors)
{ {
int c; int c;
guchar *cmap; guchar *cmap;
cmap = g_new (guchar, nColors*3); cmap = g_new (guchar, nColors*3);
for (c = 0; c < nColors; c++) for (c = 0; c < nColors; c++)
{ {
@ -599,10 +599,10 @@ CB_PasteImage (gboolean interactive,
gimp_image_set_cmap (image_ID, cmap, nColors); gimp_image_set_cmap (image_ID, cmap, nColors);
g_free (cmap); g_free (cmap);
} }
/* speed it up with: */ /* speed it up with: */
gimp_tile_cache_size (drawable->width * gimp_tile_height () * drawable->bpp ); gimp_tile_cache_size (drawable->width * gimp_tile_height () * drawable->bpp );
/* change data format and copy data */ /* change data format and copy data */
if ((24 == nBitsPS && pInfo->bmiHeader.biCompression == BI_RGB) if ((24 == nBitsPS && pInfo->bmiHeader.biCompression == BI_RGB)
|| (pInfo->bmiHeader.biCompression == BI_BITFIELDS)) || (pInfo->bmiHeader.biCompression == BI_BITFIELDS))
@ -614,10 +614,10 @@ CB_PasteImage (gboolean interactive,
for (y = 0; y < drawable->height; y++) for (y = 0; y < drawable->height; y++)
{ {
int x; int x;
if ((interactive) && (StepProgress (y, drawable->height))) if ((interactive) && (StepProgress (y, drawable->height)))
gimp_progress_update ((double)y / drawable->height); gimp_progress_update ((double)y / drawable->height);
if (pInfo->bmiHeader.biCompression == BI_RGB) if (pInfo->bmiHeader.biCompression == BI_RGB)
for (x = 0; x < drawable->width; x++) for (x = 0; x < drawable->width; x++)
{ {
@ -625,7 +625,7 @@ CB_PasteImage (gboolean interactive,
pLine[x*drawable->bpp+1] = pData[y*nSizeLine+x*bps+1]; pLine[x*drawable->bpp+1] = pData[y*nSizeLine+x*bps+1];
pLine[x*drawable->bpp+2] = pData[y*nSizeLine+x*bps]; pLine[x*drawable->bpp+2] = pData[y*nSizeLine+x*bps];
} }
else else
for (x = 0; x < drawable->width; x++) for (x = 0; x < drawable->width; x++)
{ {
guint dw; guint dw;
@ -638,7 +638,7 @@ CB_PasteImage (gboolean interactive,
pLine[x*drawable->bpp+1] = (255 * ((dw & maskG) >> shiftG)) / maxG; pLine[x*drawable->bpp+1] = (255 * ((dw & maskG) >> shiftG)) / maxG;
pLine[x*drawable->bpp+2] = (255 * ((dw & maskB) >> shiftB)) / maxB; pLine[x*drawable->bpp+2] = (255 * ((dw & maskB) >> shiftB)) / maxB;
} }
/* copy data to GIMP */ /* copy data to GIMP */
gimp_pixel_rgn_set_rect (&pixel_rgn, pLine, 0, drawable->height-1-y, drawable->width, 1); gimp_pixel_rgn_set_rect (&pixel_rgn, pLine, 0, drawable->height-1-y, drawable->width, 1);
} }
@ -652,7 +652,7 @@ CB_PasteImage (gboolean interactive,
{ {
if ((interactive) && (StepProgress (y, drawable->height))) if ((interactive) && (StepProgress (y, drawable->height)))
gimp_progress_update ((double)y / drawable->height); gimp_progress_update ((double)y / drawable->height);
pLine = pData + y*nSizeLine; /* adjust pointer */ pLine = pData + y*nSizeLine; /* adjust pointer */
gimp_pixel_rgn_set_row (&pixel_rgn, pLine, 0, drawable->height-1-y, drawable->width); gimp_pixel_rgn_set_row (&pixel_rgn, pLine, 0, drawable->height-1-y, drawable->width);
} }
@ -662,10 +662,10 @@ CB_PasteImage (gboolean interactive,
/* copy and shift bits */ /* copy and shift bits */
g_message ("%d bits per sample not yet supported!", nBitsPS); g_message ("%d bits per sample not yet supported!", nBitsPS);
} }
gimp_drawable_flush (drawable); gimp_drawable_flush (drawable);
gimp_drawable_detach (drawable); gimp_drawable_detach (drawable);
/* Don't forget to display the new image! */ /* Don't forget to display the new image! */
if (bIsNewImage) if (bIsNewImage)
gimp_display_new (image_ID); gimp_display_new (image_ID);
@ -675,7 +675,7 @@ CB_PasteImage (gboolean interactive,
gimp_displays_flush (); gimp_displays_flush ();
} }
} }
/* done */ /* done */
/* clear clipboard? */ /* clear clipboard? */
if (NULL != hDIB) if (NULL != hDIB)
@ -683,9 +683,9 @@ CB_PasteImage (gboolean interactive,
GlobalUnlock (pInfo); GlobalUnlock (pInfo);
GlobalFree (hDIB); GlobalFree (hDIB);
} }
CloseClipboard (); CloseClipboard ();
/* shouldn't this be done by caller?? */ /* shouldn't this be done by caller?? */
gimp_image_undo_enable (image_ID); gimp_image_undo_enable (image_ID);

View File

@ -40,7 +40,7 @@
(set! img (car (gimp-image-duplicate org-img))) (set! img (car (gimp-image-duplicate org-img)))
(gimp-image-undo-disable img) (gimp-image-undo-disable img)
(if (> (car (gimp-drawable-type org-layer)) 1 ) (if (> (car (gimp-drawable-type org-layer)) 1 )
(gimp-convert-rgb img)) (gimp-image-convert-rgb img))
(set! source-layer (aref (cadr (gimp-image-get-layers img)) 0 )) (set! source-layer (aref (cadr (gimp-image-get-layers img)) 0 ))
(set! bg-source-layer (aref (cadr (gimp-image-get-layers img)) 1 )) (set! bg-source-layer (aref (cadr (gimp-image-get-layers img)) 1 ))
(set! source-layer-width (car (gimp-drawable-width source-layer))) (set! source-layer-width (car (gimp-drawable-width source-layer)))
@ -160,7 +160,7 @@
(if (= optimize TRUE) (if (= optimize TRUE)
(begin (begin
(gimp-convert-indexed img 1 WEB-PALETTE 250 FALSE TRUE "") (gimp-image-convert-indexed img 1 WEB-PALETTE 250 FALSE TRUE "")
(set! img-out (car (plug-in-animationoptimize 0 (set! img-out (car (plug-in-animationoptimize 0
img img
bl-layer))))) bl-layer)))))

View File

@ -155,7 +155,7 @@
(gimp-bucket-fill bg-layer PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0) (gimp-bucket-fill bg-layer PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
(gimp-selection-none img) (gimp-selection-none img)
(gimp-convert-rgb img) (gimp-image-convert-rgb img)
(gimp-color-balance layer1 0 TRUE (shadows (rval hc)) (shadows (gval hc)) (shadows (bval hc))) (gimp-color-balance layer1 0 TRUE (shadows (rval hc)) (shadows (gval hc)) (shadows (bval hc)))
(gimp-color-balance layer1 1 TRUE (midtones (rval hc)) (midtones (gval hc)) (midtones (bval hc))) (gimp-color-balance layer1 1 TRUE (midtones (rval hc)) (midtones (gval hc)) (midtones (bval hc)))

View File

@ -143,7 +143,7 @@
(gimp-levels disp-map 0 0 255 1.0 96 255) (gimp-levels disp-map 0 0 255 1.0 96 255)
(if (= (car (gimp-drawable-is-rgb bg-layer)) 1) (if (= (car (gimp-drawable-is-rgb bg-layer)) 1)
(gimp-convert-rgb img)) (gimp-image-convert-rgb img))

View File

@ -43,7 +43,7 @@
(if (> (car (gimp-drawable-type inLayer)) (if (> (car (gimp-drawable-type inLayer))
1 1
) )
(gimp-convert-rgb theImage) (gimp-image-convert-rgb theImage)
) )
(set! theWidth (car (gimp-image-width inImage))) (set! theWidth (car (gimp-image-width inImage)))
(set! theHeight (car (gimp-image-height inImage))) (set! theHeight (car (gimp-image-height inImage)))

View File

@ -104,7 +104,8 @@
(plug-in-autocrop 1 img text-layer)) (plug-in-autocrop 1 img text-layer))
(if (= index TRUE) (if (= index TRUE)
(gimp-convert-indexed img FS-DITHER MAKE-PALETTE num-colors FALSE FALSE "")) (gimp-image-convert-indexed img FS-DITHER MAKE-PALETTE num-colors
FALSE FALSE ""))
(gimp-palette-set-foreground old-fg) (gimp-palette-set-foreground old-fg)

View File

@ -76,7 +76,8 @@
(gimp-selection-clear img))) (gimp-selection-clear img)))
(if (= index TRUE) (if (= index TRUE)
(gimp-convert-indexed img FS-DITHER MAKE-PALETTE num-colors FALSE FALSE "")) (gimp-image-convert-indexed img FS-DITHER MAKE-PALETTE num-colors
FALSE FALSE ""))
(gimp-palette-set-foreground old-fg) (gimp-palette-set-foreground old-fg)
(gimp-palette-set-background old-bg) (gimp-palette-set-background old-bg)

View File

@ -152,7 +152,7 @@
(gimp-bucket-fill text-layer PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0) (gimp-bucket-fill text-layer PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
(gimp-selection-none img) (gimp-selection-none img)
(gimp-convert-rgb img) (gimp-image-convert-rgb img)
(gimp-color-balance layer1 0 TRUE (shadows (rval hc)) (shadows (gval hc)) (shadows (bval hc))) (gimp-color-balance layer1 0 TRUE (shadows (rval hc)) (shadows (gval hc)) (shadows (bval hc)))
(gimp-color-balance layer1 1 TRUE (midtones (rval hc)) (midtones (gval hc)) (midtones (bval hc))) (gimp-color-balance layer1 1 TRUE (midtones (rval hc)) (midtones (gval hc)) (midtones (bval hc)))

View File

@ -87,7 +87,8 @@
(if (= inIndex 0) (if (= inIndex 0)
() ()
(gimp-convert-indexed theImage FS-DITHER MAKE-PALETTE inIndex FALSE FALSE "")) (gimp-image-convert-indexed theImage FS-DITHER MAKE-PALETTE inIndex
FALSE FALSE ""))
(if (= inCopy TRUE) (if (= inCopy TRUE)
(begin (begin

View File

@ -33,7 +33,7 @@ CODE
); );
} }
sub convert_rgb { sub image_convert_rgb {
$blurb = 'Convert specified image to RGB color'; $blurb = 'Convert specified image to RGB color';
$help = <<'HELP'; $help = <<'HELP';
@ -47,7 +47,7 @@ HELP
&simple_invoke('GIMP_RGB'); &simple_invoke('GIMP_RGB');
} }
sub convert_grayscale { sub image_convert_grayscale {
$blurb = 'Convert specified image to grayscale (256 intensity levels)'; $blurb = 'Convert specified image to grayscale (256 intensity levels)';
$help = <<'HELP'; $help = <<'HELP';
@ -61,7 +61,7 @@ HELP
&simple_invoke('GIMP_GRAY'); &simple_invoke('GIMP_GRAY');
} }
sub convert_indexed { sub image_convert_indexed {
$blurb = 'Convert specified image to and Indexed image'; $blurb = 'Convert specified image to and Indexed image';
$help = <<'HELP'; $help = <<'HELP';
@ -163,7 +163,7 @@ CODE
"core/gimpimage-convert.h" "core/gimpdatafactory.h" "core/gimpimage-convert.h" "core/gimpdatafactory.h"
"core/gimppalette.h"); "core/gimppalette.h");
@procs = qw(convert_rgb convert_grayscale convert_indexed); @procs = qw(image_convert_rgb image_convert_grayscale image_convert_indexed);
%exports = (app => [@procs], lib => [@procs]); %exports = (app => [@procs], lib => [@procs]);
$desc = 'Convert'; $desc = 'Convert';