mirror of https://github.com/GNOME/gimp.git
app/Makefile.am app/brush_header.h app/pattern_header.h
2001-04-19 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/brush_header.h * app/pattern_header.h * app/desaturate.[ch] * app/equalize.[ch] * app/invert.[ch]: removed. * app/gimpbrush-header.h * app/gimppattern-header.h * app/gimpdrawable-desaturate.[ch] * app/gimpdrawable-equalize.[ch] * app/gimpdrawable-invert.[ch]: new files. * app/gui/commands.c: put some stuff from desaturate, equalize and invert here. While it's ok to check the drawable type in the callback, this is the wrong place for PDB wrappers. * app/gimpbrush.c * app/gimpbrushpipe.c * app/gimplayer.c * app/gimppattern.c * app/pdb/color_cmds.c * plug-ins/common/gbr.c * plug-ins/common/gih.c * plug-ins/common/pat.c * po/POTFILES.in * tools/pdbgen/pdb/color.pdb: changed accordingly.
This commit is contained in:
parent
8de3fb6452
commit
26dee23042
30
ChangeLog
30
ChangeLog
|
@ -1,3 +1,33 @@
|
|||
2001-04-19 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/Makefile.am
|
||||
* app/brush_header.h
|
||||
* app/pattern_header.h
|
||||
* app/desaturate.[ch]
|
||||
* app/equalize.[ch]
|
||||
* app/invert.[ch]: removed.
|
||||
|
||||
* app/gimpbrush-header.h
|
||||
* app/gimppattern-header.h
|
||||
* app/gimpdrawable-desaturate.[ch]
|
||||
* app/gimpdrawable-equalize.[ch]
|
||||
* app/gimpdrawable-invert.[ch]: new files.
|
||||
|
||||
* app/gui/commands.c: put some stuff from desaturate, equalize and
|
||||
invert here. While it's ok to check the drawable type in the
|
||||
callback, this is the wrong place for PDB wrappers.
|
||||
|
||||
* app/gimpbrush.c
|
||||
* app/gimpbrushpipe.c
|
||||
* app/gimplayer.c
|
||||
* app/gimppattern.c
|
||||
* app/pdb/color_cmds.c
|
||||
* plug-ins/common/gbr.c
|
||||
* plug-ins/common/gih.c
|
||||
* plug-ins/common/pat.c
|
||||
* po/POTFILES.in
|
||||
* tools/pdbgen/pdb/color.pdb: changed accordingly.
|
||||
|
||||
2001-04-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/gimpdrawable-offset.[ch]: renamed ChannelOffsetType to
|
||||
|
|
145
app/Makefile.am
145
app/Makefile.am
|
@ -65,6 +65,10 @@ gimp_SOURCES = \
|
|||
##
|
||||
disp_callbacks.c \
|
||||
disp_callbacks.h \
|
||||
gdisplay.c \
|
||||
gdisplay.h \
|
||||
gdisplay_ops.c \
|
||||
gdisplay_ops.h \
|
||||
gximage.c \
|
||||
gximage.h \
|
||||
image_render.c \
|
||||
|
@ -81,10 +85,6 @@ gimp_SOURCES = \
|
|||
##
|
||||
## stuff that needs to be split up in core / ui files
|
||||
##
|
||||
gdisplay.c \
|
||||
gdisplay.h \
|
||||
gdisplay_ops.c \
|
||||
gdisplay_ops.h \
|
||||
global_edit.c \
|
||||
global_edit.h \
|
||||
image_map.c \
|
||||
|
@ -94,7 +94,78 @@ gimp_SOURCES = \
|
|||
user_install.c \
|
||||
user_install.h \
|
||||
##
|
||||
## core stuff
|
||||
## base stuff that does not depend on anything else in app/
|
||||
##
|
||||
gimpcontainer.c \
|
||||
gimpcontainer.h \
|
||||
gimpdata.c \
|
||||
gimpdata.h \
|
||||
gimpdatafactory.c \
|
||||
gimpdatafactory.h \
|
||||
gimpdatalist.c \
|
||||
gimpdatalist.h \
|
||||
gimplist.c \
|
||||
gimplist.h \
|
||||
gimpobject.c \
|
||||
gimpobject.h \
|
||||
gimpviewable.c \
|
||||
gimpviewable.h \
|
||||
##
|
||||
## the core object system
|
||||
##
|
||||
gimpbrush.c \
|
||||
gimpbrush.h \
|
||||
gimpbrush-header.h \
|
||||
gimpbrushgenerated.c \
|
||||
gimpbrushgenerated.h \
|
||||
gimpbrushpipe.c \
|
||||
gimpbrushpipe.h \
|
||||
gimpchannel.c \
|
||||
gimpchannel.h \
|
||||
gimpcontext.c \
|
||||
gimpcontext.h \
|
||||
gimpdrawable.c \
|
||||
gimpdrawable.h \
|
||||
gimpdrawable-desaturate.c \
|
||||
gimpdrawable-desaturate.h \
|
||||
gimpdrawable-equalize.c \
|
||||
gimpdrawable-equalize.h \
|
||||
gimpdrawable-invert.c \
|
||||
gimpdrawable-invert.h \
|
||||
gimpdrawable-offset.c \
|
||||
gimpdrawable-offset.h \
|
||||
gimpdrawable-preview.c \
|
||||
gimpdrawable-preview.h \
|
||||
gimpgradient.c \
|
||||
gimpgradient.h \
|
||||
gimpimage.c \
|
||||
gimpimage.h \
|
||||
gimpimage-convert.c \
|
||||
gimpimage-convert.h \
|
||||
gimpimage-duplicate.c \
|
||||
gimpimage-duplicate.h \
|
||||
gimpimage-undo.c \
|
||||
gimpimage-undo.h \
|
||||
gimplayer.c \
|
||||
gimplayer.h \
|
||||
gimplayermask.c \
|
||||
gimplayermask.h \
|
||||
gimpmarshal.c \
|
||||
gimpmarshal.h \
|
||||
gimppattern.c \
|
||||
gimppattern.h \
|
||||
gimppattern-header.h \
|
||||
gimppalette.c \
|
||||
gimppalette.h \
|
||||
gimppalette-import.c \
|
||||
gimppalette-import.h \
|
||||
gimpundo.c \
|
||||
gimpundo.h \
|
||||
gimpundostack.c \
|
||||
gimpundostack.h \
|
||||
##
|
||||
## stuff that needs to be sorted into yet undecided subsystems, split up,
|
||||
## removed or otherwise tortured
|
||||
##
|
||||
app_procs.c \
|
||||
app_procs.h \
|
||||
|
@ -108,7 +179,6 @@ gimp_SOURCES = \
|
|||
batch.h \
|
||||
boundary.c \
|
||||
boundary.h \
|
||||
brush_header.h \
|
||||
brush_scale.c \
|
||||
brush_scale.h \
|
||||
color_transfer.c \
|
||||
|
@ -117,14 +187,10 @@ gimp_SOURCES = \
|
|||
context_manager.h \
|
||||
datafiles.c \
|
||||
datafiles.h \
|
||||
desaturate.c \
|
||||
desaturate.h \
|
||||
drawable.c \
|
||||
drawable.h \
|
||||
errors.c \
|
||||
errors.h \
|
||||
equalize.c \
|
||||
equalize.h \
|
||||
file-open.c \
|
||||
file-open.h \
|
||||
file-save.c \
|
||||
|
@ -140,79 +206,21 @@ gimp_SOURCES = \
|
|||
gimage.h \
|
||||
gimage_mask.c \
|
||||
gimage_mask.h \
|
||||
gimpbrush.c \
|
||||
gimpbrush.h \
|
||||
gimpbrushgenerated.c \
|
||||
gimpbrushgenerated.h \
|
||||
gimpbrushpipe.c \
|
||||
gimpbrushpipe.h \
|
||||
gimpchannel.c \
|
||||
gimpchannel.h \
|
||||
gimpcontainer.c \
|
||||
gimpcontainer.h \
|
||||
gimpcontext.c \
|
||||
gimpcontext.h \
|
||||
gimpdata.c \
|
||||
gimpdata.h \
|
||||
gimpdatafactory.c \
|
||||
gimpdatafactory.h \
|
||||
gimpdatalist.c \
|
||||
gimpdatalist.h \
|
||||
gimpdrawable.c \
|
||||
gimpdrawable.h \
|
||||
gimpdrawable-offset.c \
|
||||
gimpdrawable-offset.h \
|
||||
gimpdrawable-preview.c \
|
||||
gimpdrawable-preview.h \
|
||||
gimpgradient.c \
|
||||
gimpgradient.h \
|
||||
gimphelp.c \
|
||||
gimphelp.h \
|
||||
gimphistogram.c \
|
||||
gimphistogram.h \
|
||||
gimpimage.c \
|
||||
gimpimage.h \
|
||||
gimpimage-convert.c \
|
||||
gimpimage-convert.h \
|
||||
gimpimage-duplicate.c \
|
||||
gimpimage-duplicate.h \
|
||||
gimpimage-undo.c \
|
||||
gimpimage-undo.h \
|
||||
gimplayer.c \
|
||||
gimplayer.h \
|
||||
gimplayermask.c \
|
||||
gimplayermask.h \
|
||||
gimplist.c \
|
||||
gimplist.h \
|
||||
gimplut.c \
|
||||
gimplut.h \
|
||||
gimpmarshal.c \
|
||||
gimpmarshal.h \
|
||||
gimpobject.c \
|
||||
gimpobject.h \
|
||||
gimppattern.c \
|
||||
gimppattern.h \
|
||||
gimppalette.c \
|
||||
gimppalette.h \
|
||||
gimppalette-import.c \
|
||||
gimppalette-import.h \
|
||||
gimpparasite.c \
|
||||
gimpparasite.h \
|
||||
gimppreviewcache.h \
|
||||
gimppreviewcache.c \
|
||||
gimprc.c \
|
||||
gimprc.h \
|
||||
gimpundo.c \
|
||||
gimpundo.h \
|
||||
gimpundostack.c \
|
||||
gimpundostack.h \
|
||||
gimpunit.c \
|
||||
gimpviewable.c \
|
||||
gimpviewable.h \
|
||||
image_new.c \
|
||||
image_new.h \
|
||||
invert.c \
|
||||
invert.h \
|
||||
libgimp_glue.c \
|
||||
libgimp_glue.h \
|
||||
lut_funcs.c \
|
||||
|
@ -228,7 +236,6 @@ gimp_SOURCES = \
|
|||
path_curves.c \
|
||||
path_bezier.h \
|
||||
path_bezier.c \
|
||||
pattern_header.h \
|
||||
pixel_processor.c \
|
||||
pixel_processor.h \
|
||||
pixel_region.c \
|
||||
|
|
|
@ -43,8 +43,6 @@
|
|||
|
||||
#include "app_procs.h"
|
||||
#include "context_manager.h"
|
||||
#include "desaturate.h"
|
||||
#include "equalize.h"
|
||||
#include "file-open.h"
|
||||
#include "file-save.h"
|
||||
#include "floating_sel.h"
|
||||
|
@ -53,6 +51,9 @@
|
|||
#include "gimpcontainer.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpdrawable.h"
|
||||
#include "gimpdrawable-desaturate.h"
|
||||
#include "gimpdrawable-equalize.h"
|
||||
#include "gimpdrawable-invert.h"
|
||||
#include "gimphelp.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-duplicate.h"
|
||||
|
@ -62,7 +63,6 @@
|
|||
#include "global_edit.h"
|
||||
#include "image_render.h"
|
||||
#include "nav_window.h"
|
||||
#include "invert.h"
|
||||
#include "lc_dialog.h"
|
||||
#include "layers_dialogP.h"
|
||||
#include "plug_in.h"
|
||||
|
@ -778,10 +778,20 @@ void
|
|||
image_desaturate_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GDisplay *gdisp;
|
||||
GimpDrawable *drawable;
|
||||
return_if_no_display (gdisp);
|
||||
|
||||
image_desaturate (gdisp->gimage);
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (! gimp_drawable_is_rgb (drawable))
|
||||
{
|
||||
g_message (_("Desaturate operates only on RGB color drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
gimp_drawable_desaturate (drawable);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
|
||||
|
@ -789,10 +799,31 @@ void
|
|||
image_invert_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GDisplay *gdisp;
|
||||
GimpDrawable *drawable;
|
||||
Argument *return_vals;
|
||||
gint nreturn_vals;
|
||||
return_if_no_display (gdisp);
|
||||
|
||||
image_invert (gdisp->gimage);
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Invert does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
return_vals =
|
||||
procedural_db_run_proc ("gimp_invert",
|
||||
&nreturn_vals,
|
||||
PDB_DRAWABLE, gimp_drawable_get_ID (drawable),
|
||||
PDB_END);
|
||||
|
||||
if (!return_vals || return_vals[0].value.pdb_int != PDB_SUCCESS)
|
||||
g_message (_("Invert operation failed."));
|
||||
|
||||
procedural_db_destroy_args (return_vals, nreturn_vals);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
|
||||
|
@ -800,10 +831,20 @@ void
|
|||
image_equalize_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GDisplay *gdisp;
|
||||
GimpDrawable *drawable;
|
||||
return_if_no_display (gdisp);
|
||||
|
||||
image_equalize (gdisp->gimage);
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Equalize does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
gimp_drawable_equalize (drawable, TRUE);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __BRUSH_HEADER_H__
|
||||
#define __BRUSH_HEADER_H__
|
||||
|
||||
#define GBRUSH_FILE_VERSION 2
|
||||
#define GBRUSH_MAGIC (('G' << 24) + ('I' << 16) + ('M' << 8) + ('P' << 0))
|
||||
|
||||
/* All field entries are MSB */
|
||||
|
||||
typedef struct _BrushHeader BrushHeader;
|
||||
|
||||
struct _BrushHeader
|
||||
{
|
||||
guint header_size; /* header_size = sizeof (BrushHeader) + brush name */
|
||||
guint version; /* brush file version # */
|
||||
guint width; /* width of brush */
|
||||
guint height; /* height of brush */
|
||||
guint bytes; /* depth of brush in bytes--always 1 */
|
||||
guint magic_number; /* GIMP brush magic number */
|
||||
guint spacing; /* brush spacing */
|
||||
};
|
||||
|
||||
/* In a brush file, next comes the brush name, null-terminated. After that
|
||||
* comes the brush data--width * height * bytes bytes of it...
|
||||
*/
|
||||
|
||||
#endif /* ! __BRUSH_HEADER_H__ */
|
|
@ -16,8 +16,8 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __BRUSH_HEADER_H__
|
||||
#define __BRUSH_HEADER_H__
|
||||
#ifndef __GIMP_BRUSH_HEADER_H__
|
||||
#define __GIMP_BRUSH_HEADER_H__
|
||||
|
||||
#define GBRUSH_FILE_VERSION 2
|
||||
#define GBRUSH_MAGIC (('G' << 24) + ('I' << 16) + ('M' << 8) + ('P' << 0))
|
||||
|
@ -41,4 +41,4 @@ struct _BrushHeader
|
|||
* comes the brush data--width * height * bytes bytes of it...
|
||||
*/
|
||||
|
||||
#endif /* ! __BRUSH_HEADER_H__ */
|
||||
#endif /* __GIMP_BRUSH_HEADER_H__ */
|
||||
|
|
|
@ -43,9 +43,9 @@
|
|||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "brush_header.h"
|
||||
#include "brush_scale.h"
|
||||
#include "gimpbrush.h"
|
||||
#include "gimpbrush-header.h"
|
||||
#include "gimpbrushgenerated.h"
|
||||
#include "gimprc.h"
|
||||
#include "temp_buf.h"
|
||||
|
|
|
@ -43,9 +43,9 @@
|
|||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "brush_header.h"
|
||||
#include "brush_scale.h"
|
||||
#include "gimpbrush.h"
|
||||
#include "gimpbrush-header.h"
|
||||
#include "gimpbrushgenerated.h"
|
||||
#include "gimprc.h"
|
||||
#include "temp_buf.h"
|
||||
|
|
|
@ -46,10 +46,10 @@
|
|||
#include "apptypes.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "brush_header.h"
|
||||
#include "pattern_header.h"
|
||||
#include "gimpbrush.h"
|
||||
#include "gimpbrush-header.h"
|
||||
#include "gimpbrushpipe.h"
|
||||
#include "gimppattern-header.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
/* this needs to go away */
|
||||
|
|
|
@ -46,10 +46,10 @@
|
|||
#include "apptypes.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "brush_header.h"
|
||||
#include "pattern_header.h"
|
||||
#include "gimpbrush.h"
|
||||
#include "gimpbrush-header.h"
|
||||
#include "gimpbrushpipe.h"
|
||||
#include "gimppattern-header.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
/* this needs to go away */
|
||||
|
|
|
@ -24,35 +24,14 @@
|
|||
|
||||
#include "paint-funcs/paint-funcs.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "drawable.h"
|
||||
#include "desaturate.h"
|
||||
#include "gimpdrawable-desaturate.h"
|
||||
#include "gimpimage.h"
|
||||
#include "pixel_region.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
image_desaturate (GimpImage *gimage)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (! gimp_drawable_is_rgb (drawable))
|
||||
{
|
||||
g_message (_("Desaturate operates only on RGB color drawables."));
|
||||
return;
|
||||
}
|
||||
desaturate (drawable);
|
||||
}
|
||||
|
||||
|
||||
/* Desaturater */
|
||||
|
||||
void
|
||||
desaturate (GimpDrawable *drawable)
|
||||
gimp_drawable_desaturate (GimpDrawable *drawable)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
guchar *src, *s;
|
||||
|
@ -63,8 +42,8 @@ desaturate (GimpDrawable *drawable)
|
|||
gpointer pr;
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
if (!drawable)
|
||||
return;
|
||||
g_return_if_fail (drawable != NULL);
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
|
||||
has_alpha = gimp_drawable_has_alpha (drawable);
|
||||
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
|
||||
|
@ -113,5 +92,6 @@ desaturate (GimpDrawable *drawable)
|
|||
}
|
||||
|
||||
gimp_drawable_merge_shadow (drawable, TRUE);
|
||||
|
||||
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
|
||||
}
|
||||
|
|
|
@ -16,12 +16,13 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __DESATURATE_H__
|
||||
#define __DESATURATE_H__
|
||||
#ifndef __GIMP_DRAWABLE_DESATURATE_H__
|
||||
#define __GIMP_DRAWABLE_DESATURATE_H__
|
||||
|
||||
|
||||
void image_desaturate (GimpImage *gimage);
|
||||
void desaturate (GimpDrawable *drawable);
|
||||
|
||||
void gimp_drawable_desaturate (GimpDrawable *drawable);
|
||||
|
||||
|
||||
#endif /* __DESATURATE_H__ */
|
||||
#endif /* __GIMP_DRAWABLE_DESATURATE_H__ */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "apptypes.h"
|
||||
|
||||
#include "drawable.h"
|
||||
#include "equalize.h"
|
||||
#include "gimpdrawable-equalize.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimplut.h"
|
||||
#include "lut_funcs.h"
|
||||
|
@ -31,30 +31,10 @@
|
|||
#include "pixel_processor.h"
|
||||
#include "pixel_region.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
image_equalize (GimpImage *gimage)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Equalize does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
equalize (gimage, drawable, TRUE);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
equalize (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean mask_only)
|
||||
gimp_drawable_equalize (GimpDrawable *drawable,
|
||||
gboolean mask_only)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
guchar *mask;
|
||||
|
@ -64,6 +44,9 @@ equalize (GimpImage *gimage,
|
|||
GimpHistogram *hist;
|
||||
GimpLut *lut;
|
||||
|
||||
g_return_if_fail (drawable != NULL);
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
|
||||
mask = NULL;
|
||||
|
||||
bytes = gimp_drawable_bytes (drawable);
|
||||
|
|
|
@ -16,14 +16,12 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __EQUALIZE_H__
|
||||
#define __EQUALIZE_H__
|
||||
#ifndef __GIMP_DRAWABLE_EQUALIZE_H__
|
||||
#define __GIMP_DRAWABLE_EQUALIZE_H__
|
||||
|
||||
|
||||
void image_equalize (GimpImage *gimage);
|
||||
void equalize (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean mask_only);
|
||||
void gimp_drawable_equalize (GimpDrawable *drawable,
|
||||
gboolean mask_only);
|
||||
|
||||
|
||||
#endif /* __INVERT_H__ */
|
||||
#endif /* __GIMP_DRAWABLE_EQUALIZE_H__ */
|
||||
|
|
|
@ -18,55 +18,20 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "drawable.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpdrawable-invert.h"
|
||||
#include "gimplut.h"
|
||||
#include "invert.h"
|
||||
#include "lut_funcs.h"
|
||||
#include "pixel_processor.h"
|
||||
#include "pixel_region.h"
|
||||
|
||||
#include "pdb/procedural_db.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
image_invert (GimpImage *gimage)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
Argument *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Invert does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
return_vals =
|
||||
procedural_db_run_proc ("gimp_invert",
|
||||
&nreturn_vals,
|
||||
PDB_DRAWABLE, gimp_drawable_get_ID (drawable),
|
||||
PDB_END);
|
||||
|
||||
if (!return_vals || return_vals[0].value.pdb_int != PDB_SUCCESS)
|
||||
g_message (_("Invert operation failed."));
|
||||
|
||||
procedural_db_destroy_args (return_vals, nreturn_vals);
|
||||
}
|
||||
|
||||
|
||||
/* Inverter */
|
||||
|
||||
void
|
||||
invert (GimpDrawable *drawable)
|
||||
gimp_drawable_invert (GimpDrawable *drawable)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
gint x1, y1, x2, y2;
|
||||
|
|
|
@ -16,12 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __INVERT_H__
|
||||
#define __INVERT_H__
|
||||
#ifndef __GIMP_DRAWABLE_INVERT_H__
|
||||
#define __GIMP_DRAWABLE_INVERT_H__
|
||||
|
||||
|
||||
void image_invert (GimpImage *gimage);
|
||||
void invert (GimpDrawable *drawable);
|
||||
void gimp_drawable_invert (GimpDrawable *drawable);
|
||||
|
||||
|
||||
#endif /* __INVERT_H__ */
|
||||
#endif /* __GIMP_DRAWABLE_INVERT_H__ */
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimage_mask.h"
|
||||
#include "gimpdrawable-invert.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayermask.h"
|
||||
|
@ -45,7 +46,6 @@
|
|||
#include "temp_buf.h"
|
||||
#include "tile_manager.h"
|
||||
#include "tile.h"
|
||||
#include "invert.h"
|
||||
|
||||
#include "libgimp/gimpparasite.h"
|
||||
|
||||
|
@ -615,7 +615,8 @@ gimp_layer_create_mask (GimpLayer *layer,
|
|||
GIMP_DRAWABLE (layer)->height,
|
||||
FALSE);
|
||||
copy_region (&layerPR, &maskPR);
|
||||
invert(GIMP_DRAWABLE(mask));
|
||||
|
||||
gimp_drawable_invert (GIMP_DRAWABLE (mask));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __PATTERN_HEADER_H__
|
||||
#define __PATTERN_HEADER_H__
|
||||
#ifndef __GIMP_PATTERN_HEADER_H__
|
||||
#define __GIMP_PATTERN_HEADER_H__
|
||||
|
||||
#define GPATTERN_FILE_VERSION 1
|
||||
#define GPATTERN_MAGIC (('G' << 24) + ('P' << 16) + ('A' << 8) + ('T' << 0))
|
||||
|
@ -40,4 +40,4 @@ struct _PatternHeader
|
|||
* comes the pattern data--width * height * bytes bytes of it...
|
||||
*/
|
||||
|
||||
#endif /* __PATTERN_HEADER_H__ */
|
||||
#endif /* __GIMP_PATTERN_HEADER_H__ */
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
|
||||
#include "gimpimage.h"
|
||||
#include "gimppattern.h"
|
||||
#include "gimppattern-header.h"
|
||||
#include "gimprc.h"
|
||||
#include "pattern_header.h"
|
||||
#include "temp_buf.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
|
||||
#include "gimpimage.h"
|
||||
#include "gimppattern.h"
|
||||
#include "gimppattern-header.h"
|
||||
#include "gimprc.h"
|
||||
#include "pattern_header.h"
|
||||
#include "temp_buf.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
|
117
app/desaturate.c
117
app/desaturate.c
|
@ -1,117 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "paint-funcs/paint-funcs.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "drawable.h"
|
||||
#include "desaturate.h"
|
||||
#include "gimpimage.h"
|
||||
#include "pixel_region.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
image_desaturate (GimpImage *gimage)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (! gimp_drawable_is_rgb (drawable))
|
||||
{
|
||||
g_message (_("Desaturate operates only on RGB color drawables."));
|
||||
return;
|
||||
}
|
||||
desaturate (drawable);
|
||||
}
|
||||
|
||||
|
||||
/* Desaturater */
|
||||
|
||||
void
|
||||
desaturate (GimpDrawable *drawable)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
guchar *src, *s;
|
||||
guchar *dest, *d;
|
||||
gint h, j;
|
||||
gint lightness, min, max;
|
||||
gint has_alpha;
|
||||
gpointer pr;
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
if (!drawable)
|
||||
return;
|
||||
|
||||
has_alpha = gimp_drawable_has_alpha (drawable);
|
||||
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
|
||||
|
||||
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
|
||||
x1, y1, (x2 - x1), (y2 - y1), FALSE);
|
||||
pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
|
||||
x1, y1, (x2 - x1), (y2 - y1), TRUE);
|
||||
|
||||
for (pr = pixel_regions_register (2, &srcPR, &destPR);
|
||||
pr != NULL;
|
||||
pr = pixel_regions_process (pr))
|
||||
{
|
||||
src = srcPR.data;
|
||||
dest = destPR.data;
|
||||
h = srcPR.h;
|
||||
|
||||
while (h--)
|
||||
{
|
||||
s = src;
|
||||
d = dest;
|
||||
|
||||
for (j = 0; j < srcPR.w; j++)
|
||||
{
|
||||
max = MAX (s[RED_PIX], s[GREEN_PIX]);
|
||||
max = MAX (max, s[BLUE_PIX]);
|
||||
min = MIN (s[RED_PIX], s[GREEN_PIX]);
|
||||
min = MIN (min, s[BLUE_PIX]);
|
||||
|
||||
lightness = (max + min) / 2;
|
||||
|
||||
d[RED_PIX] = lightness;
|
||||
d[GREEN_PIX] = lightness;
|
||||
d[BLUE_PIX] = lightness;
|
||||
|
||||
if (has_alpha)
|
||||
d[ALPHA_PIX] = s[ALPHA_PIX];
|
||||
|
||||
d += destPR.bytes;
|
||||
s += srcPR.bytes;
|
||||
}
|
||||
|
||||
src += srcPR.rowstride;
|
||||
dest += destPR.rowstride;
|
||||
}
|
||||
}
|
||||
|
||||
gimp_drawable_merge_shadow (drawable, TRUE);
|
||||
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __DESATURATE_H__
|
||||
#define __DESATURATE_H__
|
||||
|
||||
|
||||
void image_desaturate (GimpImage *gimage);
|
||||
void desaturate (GimpDrawable *drawable);
|
||||
|
||||
|
||||
#endif /* __DESATURATE_H__ */
|
|
@ -1,98 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "drawable.h"
|
||||
#include "equalize.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimplut.h"
|
||||
#include "lut_funcs.h"
|
||||
#include "gimphistogram.h"
|
||||
#include "pixel_processor.h"
|
||||
#include "pixel_region.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
image_equalize (GimpImage *gimage)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Equalize does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
equalize (gimage, drawable, TRUE);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
equalize (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean mask_only)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
guchar *mask;
|
||||
gint has_alpha;
|
||||
gint alpha, bytes;
|
||||
gint x1, y1, x2, y2;
|
||||
GimpHistogram *hist;
|
||||
GimpLut *lut;
|
||||
|
||||
mask = NULL;
|
||||
|
||||
bytes = gimp_drawable_bytes (drawable);
|
||||
has_alpha = gimp_drawable_has_alpha (drawable);
|
||||
alpha = has_alpha ? (bytes - 1) : bytes;
|
||||
|
||||
hist = gimp_histogram_new ();
|
||||
gimp_histogram_calculate_drawable (hist, drawable);
|
||||
|
||||
/* Build equalization LUT */
|
||||
lut = eq_histogram_lut_new (hist, bytes);
|
||||
|
||||
/* Apply the histogram */
|
||||
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
|
||||
|
||||
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
|
||||
x1, y1, (x2 - x1), (y2 - y1), FALSE);
|
||||
pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
|
||||
x1, y1, (x2 - x1), (y2 - y1), TRUE);
|
||||
|
||||
pixel_regions_process_parallel ((p_func) gimp_lut_process, lut,
|
||||
2, &srcPR, &destPR);
|
||||
|
||||
gimp_lut_free (lut);
|
||||
gimp_histogram_free (hist);
|
||||
|
||||
gimp_drawable_merge_shadow (drawable, TRUE);
|
||||
|
||||
drawable_update (drawable,
|
||||
x1, y1,
|
||||
(x2 - x1), (y2 - y1));
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __EQUALIZE_H__
|
||||
#define __EQUALIZE_H__
|
||||
|
||||
|
||||
void image_equalize (GimpImage *gimage);
|
||||
void equalize (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean mask_only);
|
||||
|
||||
|
||||
#endif /* __INVERT_H__ */
|
|
@ -16,8 +16,8 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __BRUSH_HEADER_H__
|
||||
#define __BRUSH_HEADER_H__
|
||||
#ifndef __GIMP_BRUSH_HEADER_H__
|
||||
#define __GIMP_BRUSH_HEADER_H__
|
||||
|
||||
#define GBRUSH_FILE_VERSION 2
|
||||
#define GBRUSH_MAGIC (('G' << 24) + ('I' << 16) + ('M' << 8) + ('P' << 0))
|
||||
|
@ -41,4 +41,4 @@ struct _BrushHeader
|
|||
* comes the brush data--width * height * bytes bytes of it...
|
||||
*/
|
||||
|
||||
#endif /* ! __BRUSH_HEADER_H__ */
|
||||
#endif /* __GIMP_BRUSH_HEADER_H__ */
|
||||
|
|
|
@ -43,9 +43,9 @@
|
|||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "brush_header.h"
|
||||
#include "brush_scale.h"
|
||||
#include "gimpbrush.h"
|
||||
#include "gimpbrush-header.h"
|
||||
#include "gimpbrushgenerated.h"
|
||||
#include "gimprc.h"
|
||||
#include "temp_buf.h"
|
||||
|
|
|
@ -46,10 +46,10 @@
|
|||
#include "apptypes.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "brush_header.h"
|
||||
#include "pattern_header.h"
|
||||
#include "gimpbrush.h"
|
||||
#include "gimpbrush-header.h"
|
||||
#include "gimpbrushpipe.h"
|
||||
#include "gimppattern-header.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
/* this needs to go away */
|
||||
|
|
|
@ -24,35 +24,14 @@
|
|||
|
||||
#include "paint-funcs/paint-funcs.h"
|
||||
|
||||
#include "appenv.h"
|
||||
#include "drawable.h"
|
||||
#include "desaturate.h"
|
||||
#include "gimpdrawable-desaturate.h"
|
||||
#include "gimpimage.h"
|
||||
#include "pixel_region.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
image_desaturate (GimpImage *gimage)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (! gimp_drawable_is_rgb (drawable))
|
||||
{
|
||||
g_message (_("Desaturate operates only on RGB color drawables."));
|
||||
return;
|
||||
}
|
||||
desaturate (drawable);
|
||||
}
|
||||
|
||||
|
||||
/* Desaturater */
|
||||
|
||||
void
|
||||
desaturate (GimpDrawable *drawable)
|
||||
gimp_drawable_desaturate (GimpDrawable *drawable)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
guchar *src, *s;
|
||||
|
@ -63,8 +42,8 @@ desaturate (GimpDrawable *drawable)
|
|||
gpointer pr;
|
||||
gint x1, y1, x2, y2;
|
||||
|
||||
if (!drawable)
|
||||
return;
|
||||
g_return_if_fail (drawable != NULL);
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
|
||||
has_alpha = gimp_drawable_has_alpha (drawable);
|
||||
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
|
||||
|
@ -113,5 +92,6 @@ desaturate (GimpDrawable *drawable)
|
|||
}
|
||||
|
||||
gimp_drawable_merge_shadow (drawable, TRUE);
|
||||
|
||||
drawable_update (drawable, x1, y1, (x2 - x1), (y2 - y1));
|
||||
}
|
||||
|
|
|
@ -16,12 +16,13 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __DESATURATE_H__
|
||||
#define __DESATURATE_H__
|
||||
#ifndef __GIMP_DRAWABLE_DESATURATE_H__
|
||||
#define __GIMP_DRAWABLE_DESATURATE_H__
|
||||
|
||||
|
||||
void image_desaturate (GimpImage *gimage);
|
||||
void desaturate (GimpDrawable *drawable);
|
||||
|
||||
void gimp_drawable_desaturate (GimpDrawable *drawable);
|
||||
|
||||
|
||||
#endif /* __DESATURATE_H__ */
|
||||
#endif /* __GIMP_DRAWABLE_DESATURATE_H__ */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "apptypes.h"
|
||||
|
||||
#include "drawable.h"
|
||||
#include "equalize.h"
|
||||
#include "gimpdrawable-equalize.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimplut.h"
|
||||
#include "lut_funcs.h"
|
||||
|
@ -31,30 +31,10 @@
|
|||
#include "pixel_processor.h"
|
||||
#include "pixel_region.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
image_equalize (GimpImage *gimage)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Equalize does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
equalize (gimage, drawable, TRUE);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
equalize (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean mask_only)
|
||||
gimp_drawable_equalize (GimpDrawable *drawable,
|
||||
gboolean mask_only)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
guchar *mask;
|
||||
|
@ -64,6 +44,9 @@ equalize (GimpImage *gimage,
|
|||
GimpHistogram *hist;
|
||||
GimpLut *lut;
|
||||
|
||||
g_return_if_fail (drawable != NULL);
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
|
||||
mask = NULL;
|
||||
|
||||
bytes = gimp_drawable_bytes (drawable);
|
||||
|
|
|
@ -16,14 +16,12 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __EQUALIZE_H__
|
||||
#define __EQUALIZE_H__
|
||||
#ifndef __GIMP_DRAWABLE_EQUALIZE_H__
|
||||
#define __GIMP_DRAWABLE_EQUALIZE_H__
|
||||
|
||||
|
||||
void image_equalize (GimpImage *gimage);
|
||||
void equalize (GimpImage *gimage,
|
||||
GimpDrawable *drawable,
|
||||
gboolean mask_only);
|
||||
void gimp_drawable_equalize (GimpDrawable *drawable,
|
||||
gboolean mask_only);
|
||||
|
||||
|
||||
#endif /* __INVERT_H__ */
|
||||
#endif /* __GIMP_DRAWABLE_EQUALIZE_H__ */
|
||||
|
|
|
@ -18,55 +18,20 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "drawable.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpdrawable-invert.h"
|
||||
#include "gimplut.h"
|
||||
#include "invert.h"
|
||||
#include "lut_funcs.h"
|
||||
#include "pixel_processor.h"
|
||||
#include "pixel_region.h"
|
||||
|
||||
#include "pdb/procedural_db.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
image_invert (GimpImage *gimage)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
Argument *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Invert does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
return_vals =
|
||||
procedural_db_run_proc ("gimp_invert",
|
||||
&nreturn_vals,
|
||||
PDB_DRAWABLE, gimp_drawable_get_ID (drawable),
|
||||
PDB_END);
|
||||
|
||||
if (!return_vals || return_vals[0].value.pdb_int != PDB_SUCCESS)
|
||||
g_message (_("Invert operation failed."));
|
||||
|
||||
procedural_db_destroy_args (return_vals, nreturn_vals);
|
||||
}
|
||||
|
||||
|
||||
/* Inverter */
|
||||
|
||||
void
|
||||
invert (GimpDrawable *drawable)
|
||||
gimp_drawable_invert (GimpDrawable *drawable)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
gint x1, y1, x2, y2;
|
||||
|
|
|
@ -16,12 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __INVERT_H__
|
||||
#define __INVERT_H__
|
||||
#ifndef __GIMP_DRAWABLE_INVERT_H__
|
||||
#define __GIMP_DRAWABLE_INVERT_H__
|
||||
|
||||
|
||||
void image_invert (GimpImage *gimage);
|
||||
void invert (GimpDrawable *drawable);
|
||||
void gimp_drawable_invert (GimpDrawable *drawable);
|
||||
|
||||
|
||||
#endif /* __INVERT_H__ */
|
||||
#endif /* __GIMP_DRAWABLE_INVERT_H__ */
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "floating_sel.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimage_mask.h"
|
||||
#include "gimpdrawable-invert.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayermask.h"
|
||||
|
@ -45,7 +46,6 @@
|
|||
#include "temp_buf.h"
|
||||
#include "tile_manager.h"
|
||||
#include "tile.h"
|
||||
#include "invert.h"
|
||||
|
||||
#include "libgimp/gimpparasite.h"
|
||||
|
||||
|
@ -615,7 +615,8 @@ gimp_layer_create_mask (GimpLayer *layer,
|
|||
GIMP_DRAWABLE (layer)->height,
|
||||
FALSE);
|
||||
copy_region (&layerPR, &maskPR);
|
||||
invert(GIMP_DRAWABLE(mask));
|
||||
|
||||
gimp_drawable_invert (GIMP_DRAWABLE (mask));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __PATTERN_HEADER_H__
|
||||
#define __PATTERN_HEADER_H__
|
||||
#ifndef __GIMP_PATTERN_HEADER_H__
|
||||
#define __GIMP_PATTERN_HEADER_H__
|
||||
|
||||
#define GPATTERN_FILE_VERSION 1
|
||||
#define GPATTERN_MAGIC (('G' << 24) + ('P' << 16) + ('A' << 8) + ('T' << 0))
|
||||
|
@ -40,4 +40,4 @@ struct _PatternHeader
|
|||
* comes the pattern data--width * height * bytes bytes of it...
|
||||
*/
|
||||
|
||||
#endif /* __PATTERN_HEADER_H__ */
|
||||
#endif /* __GIMP_PATTERN_HEADER_H__ */
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
|
||||
#include "gimpimage.h"
|
||||
#include "gimppattern.h"
|
||||
#include "gimppattern-header.h"
|
||||
#include "gimprc.h"
|
||||
#include "pattern_header.h"
|
||||
#include "temp_buf.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
|
|
@ -43,8 +43,6 @@
|
|||
|
||||
#include "app_procs.h"
|
||||
#include "context_manager.h"
|
||||
#include "desaturate.h"
|
||||
#include "equalize.h"
|
||||
#include "file-open.h"
|
||||
#include "file-save.h"
|
||||
#include "floating_sel.h"
|
||||
|
@ -53,6 +51,9 @@
|
|||
#include "gimpcontainer.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpdrawable.h"
|
||||
#include "gimpdrawable-desaturate.h"
|
||||
#include "gimpdrawable-equalize.h"
|
||||
#include "gimpdrawable-invert.h"
|
||||
#include "gimphelp.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-duplicate.h"
|
||||
|
@ -62,7 +63,6 @@
|
|||
#include "global_edit.h"
|
||||
#include "image_render.h"
|
||||
#include "nav_window.h"
|
||||
#include "invert.h"
|
||||
#include "lc_dialog.h"
|
||||
#include "layers_dialogP.h"
|
||||
#include "plug_in.h"
|
||||
|
@ -778,10 +778,20 @@ void
|
|||
image_desaturate_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GDisplay *gdisp;
|
||||
GimpDrawable *drawable;
|
||||
return_if_no_display (gdisp);
|
||||
|
||||
image_desaturate (gdisp->gimage);
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (! gimp_drawable_is_rgb (drawable))
|
||||
{
|
||||
g_message (_("Desaturate operates only on RGB color drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
gimp_drawable_desaturate (drawable);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
|
||||
|
@ -789,10 +799,31 @@ void
|
|||
image_invert_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GDisplay *gdisp;
|
||||
GimpDrawable *drawable;
|
||||
Argument *return_vals;
|
||||
gint nreturn_vals;
|
||||
return_if_no_display (gdisp);
|
||||
|
||||
image_invert (gdisp->gimage);
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Invert does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
return_vals =
|
||||
procedural_db_run_proc ("gimp_invert",
|
||||
&nreturn_vals,
|
||||
PDB_DRAWABLE, gimp_drawable_get_ID (drawable),
|
||||
PDB_END);
|
||||
|
||||
if (!return_vals || return_vals[0].value.pdb_int != PDB_SUCCESS)
|
||||
g_message (_("Invert operation failed."));
|
||||
|
||||
procedural_db_destroy_args (return_vals, nreturn_vals);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
|
||||
|
@ -800,10 +831,20 @@ void
|
|||
image_equalize_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GDisplay *gdisp;
|
||||
GimpDrawable *drawable;
|
||||
return_if_no_display (gdisp);
|
||||
|
||||
image_equalize (gdisp->gimage);
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Equalize does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
gimp_drawable_equalize (drawable, TRUE);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,6 @@
|
|||
|
||||
#include "app_procs.h"
|
||||
#include "context_manager.h"
|
||||
#include "desaturate.h"
|
||||
#include "equalize.h"
|
||||
#include "file-open.h"
|
||||
#include "file-save.h"
|
||||
#include "floating_sel.h"
|
||||
|
@ -53,6 +51,9 @@
|
|||
#include "gimpcontainer.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpdrawable.h"
|
||||
#include "gimpdrawable-desaturate.h"
|
||||
#include "gimpdrawable-equalize.h"
|
||||
#include "gimpdrawable-invert.h"
|
||||
#include "gimphelp.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-duplicate.h"
|
||||
|
@ -62,7 +63,6 @@
|
|||
#include "global_edit.h"
|
||||
#include "image_render.h"
|
||||
#include "nav_window.h"
|
||||
#include "invert.h"
|
||||
#include "lc_dialog.h"
|
||||
#include "layers_dialogP.h"
|
||||
#include "plug_in.h"
|
||||
|
@ -778,10 +778,20 @@ void
|
|||
image_desaturate_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GDisplay *gdisp;
|
||||
GimpDrawable *drawable;
|
||||
return_if_no_display (gdisp);
|
||||
|
||||
image_desaturate (gdisp->gimage);
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (! gimp_drawable_is_rgb (drawable))
|
||||
{
|
||||
g_message (_("Desaturate operates only on RGB color drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
gimp_drawable_desaturate (drawable);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
|
||||
|
@ -789,10 +799,31 @@ void
|
|||
image_invert_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GDisplay *gdisp;
|
||||
GimpDrawable *drawable;
|
||||
Argument *return_vals;
|
||||
gint nreturn_vals;
|
||||
return_if_no_display (gdisp);
|
||||
|
||||
image_invert (gdisp->gimage);
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Invert does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
return_vals =
|
||||
procedural_db_run_proc ("gimp_invert",
|
||||
&nreturn_vals,
|
||||
PDB_DRAWABLE, gimp_drawable_get_ID (drawable),
|
||||
PDB_END);
|
||||
|
||||
if (!return_vals || return_vals[0].value.pdb_int != PDB_SUCCESS)
|
||||
g_message (_("Invert operation failed."));
|
||||
|
||||
procedural_db_destroy_args (return_vals, nreturn_vals);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
|
||||
|
@ -800,10 +831,20 @@ void
|
|||
image_equalize_cmd_callback (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
{
|
||||
GDisplay *gdisp;
|
||||
GDisplay *gdisp;
|
||||
GimpDrawable *drawable;
|
||||
return_if_no_display (gdisp);
|
||||
|
||||
image_equalize (gdisp->gimage);
|
||||
drawable = gimp_image_active_drawable (gdisp->gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Equalize does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
gimp_drawable_equalize (drawable, TRUE);
|
||||
|
||||
gdisplays_flush ();
|
||||
}
|
||||
|
||||
|
|
93
app/invert.c
93
app/invert.c
|
@ -1,93 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "drawable.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimplut.h"
|
||||
#include "invert.h"
|
||||
#include "lut_funcs.h"
|
||||
#include "pixel_processor.h"
|
||||
#include "pixel_region.h"
|
||||
|
||||
#include "pdb/procedural_db.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
image_invert (GimpImage *gimage)
|
||||
{
|
||||
GimpDrawable *drawable;
|
||||
Argument *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
||||
drawable = gimp_image_active_drawable (gimage);
|
||||
|
||||
if (gimp_drawable_is_indexed (drawable))
|
||||
{
|
||||
g_message (_("Invert does not operate on indexed drawables."));
|
||||
return;
|
||||
}
|
||||
|
||||
return_vals =
|
||||
procedural_db_run_proc ("gimp_invert",
|
||||
&nreturn_vals,
|
||||
PDB_DRAWABLE, gimp_drawable_get_ID (drawable),
|
||||
PDB_END);
|
||||
|
||||
if (!return_vals || return_vals[0].value.pdb_int != PDB_SUCCESS)
|
||||
g_message (_("Invert operation failed."));
|
||||
|
||||
procedural_db_destroy_args (return_vals, nreturn_vals);
|
||||
}
|
||||
|
||||
|
||||
/* Inverter */
|
||||
|
||||
void
|
||||
invert (GimpDrawable *drawable)
|
||||
{
|
||||
PixelRegion srcPR, destPR;
|
||||
gint x1, y1, x2, y2;
|
||||
GimpLut *lut;
|
||||
|
||||
lut = invert_lut_new (gimp_drawable_bytes (drawable));
|
||||
|
||||
gimp_drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
|
||||
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
|
||||
x1, y1, (x2 - x1), (y2 - y1), FALSE);
|
||||
pixel_region_init (&destPR, gimp_drawable_shadow (drawable),
|
||||
x1, y1, (x2 - x1), (y2 - y1), TRUE);
|
||||
|
||||
pixel_regions_process_parallel ((p_func)gimp_lut_process, lut,
|
||||
2, &srcPR, &destPR);
|
||||
|
||||
gimp_lut_free (lut);
|
||||
|
||||
gimp_drawable_merge_shadow (drawable, TRUE);
|
||||
|
||||
drawable_update (drawable,
|
||||
x1, y1,
|
||||
(x2 - x1), (y2 - y1));
|
||||
}
|
27
app/invert.h
27
app/invert.h
|
@ -1,27 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __INVERT_H__
|
||||
#define __INVERT_H__
|
||||
|
||||
|
||||
void image_invert (GimpImage *gimage);
|
||||
void invert (GimpDrawable *drawable);
|
||||
|
||||
|
||||
#endif /* __INVERT_H__ */
|
|
@ -1,43 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __PATTERN_HEADER_H__
|
||||
#define __PATTERN_HEADER_H__
|
||||
|
||||
#define GPATTERN_FILE_VERSION 1
|
||||
#define GPATTERN_MAGIC (('G' << 24) + ('P' << 16) + ('A' << 8) + ('T' << 0))
|
||||
|
||||
/* All field entries are MSB */
|
||||
|
||||
typedef struct _PatternHeader PatternHeader;
|
||||
|
||||
struct _PatternHeader
|
||||
{
|
||||
guint header_size; /* header_size = sizeof(PatternHeader) + pattern name */
|
||||
guint version; /* pattern file version # */
|
||||
guint width; /* width of pattern */
|
||||
guint height; /* height of pattern */
|
||||
guint bytes; /* depth of pattern in bytes */
|
||||
guint magic_number; /* GIMP pattern magic number */
|
||||
};
|
||||
|
||||
/* In a pattern file, next comes the pattern name, null-terminated. After that
|
||||
* comes the pattern data--width * height * bytes bytes of it...
|
||||
*/
|
||||
|
||||
#endif /* __PATTERN_HEADER_H__ */
|
|
@ -26,14 +26,14 @@
|
|||
#include "apptypes.h"
|
||||
#include "procedural_db.h"
|
||||
|
||||
#include "desaturate.h"
|
||||
#include "drawable.h"
|
||||
#include "equalize.h"
|
||||
#include "gimpdrawable-desaturate.h"
|
||||
#include "gimpdrawable-equalize.h"
|
||||
#include "gimpdrawable-invert.h"
|
||||
#include "gimpdrawable.h"
|
||||
#include "gimphistogram.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimplut.h"
|
||||
#include "invert.h"
|
||||
#include "lut_funcs.h"
|
||||
#include "pixel_processor.h"
|
||||
#include "pixel_region.h"
|
||||
|
@ -410,7 +410,7 @@ desaturate_invoker (Argument *args)
|
|||
if (success)
|
||||
{
|
||||
if (gimp_drawable_is_rgb (drawable))
|
||||
desaturate (drawable);
|
||||
gimp_drawable_desaturate (drawable);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
@ -459,7 +459,7 @@ equalize_invoker (Argument *args)
|
|||
if (success)
|
||||
{
|
||||
if (! gimp_drawable_is_indexed (drawable))
|
||||
equalize (gimp_drawable_gimage (drawable), drawable, mask_only);
|
||||
gimp_drawable_equalize (drawable, mask_only);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ invert_invoker (Argument *args)
|
|||
if (success)
|
||||
{
|
||||
if (! gimp_drawable_is_indexed (drawable))
|
||||
invert (drawable);
|
||||
gimp_drawable_invert (drawable);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
#include <libgimp/gimp.h>
|
||||
#include <libgimp/gimpui.h>
|
||||
|
||||
#include "app/brush_header.h"
|
||||
#include "app/pattern_header.h"
|
||||
#include "app/gimpbrush-header.h"
|
||||
#include "app/gimppattern-header.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
|
|
@ -68,8 +68,8 @@
|
|||
#include <libgimp/gimpui.h>
|
||||
#include <libgimp/gimpparasiteio.h>
|
||||
|
||||
#include "app/brush_header.h"
|
||||
#include "app/pattern_header.h"
|
||||
#include "app/gimpbrush-header.h"
|
||||
#include "app/gimppattern-header.h"
|
||||
|
||||
#include "libgimp/stdplugins-intl.h"
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#define _O_BINARY 0
|
||||
#endif
|
||||
|
||||
#include "app/pattern_header.h"
|
||||
#include "app/gimppattern-header.h"
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
|
|
@ -2,11 +2,9 @@
|
|||
# marked to allow runtime translation of messages
|
||||
|
||||
app/app_procs.c
|
||||
app/desaturate.c
|
||||
app/devices.c
|
||||
app/disp_callbacks.c
|
||||
app/docindex.c
|
||||
app/equalize.c
|
||||
app/errorconsole.c
|
||||
app/file-open.c
|
||||
app/file-save.c
|
||||
|
@ -28,7 +26,6 @@ app/gimpunit.c
|
|||
app/global_edit.c
|
||||
app/image_new.c
|
||||
app/interface.c
|
||||
app/invert.c
|
||||
app/lc_dialog.c
|
||||
app/main.c
|
||||
app/module_db.c
|
||||
|
|
|
@ -238,11 +238,11 @@ HELP
|
|||
@inargs = ( &drawable_arg );
|
||||
|
||||
%invoke = (
|
||||
headers => [ qw("desaturate.h") ],
|
||||
headers => [ qw("gimpdrawable-desaturate.h") ],
|
||||
code => <<'CODE'
|
||||
{
|
||||
if (gimp_drawable_is_rgb (drawable))
|
||||
desaturate (drawable);
|
||||
gimp_drawable_desaturate (drawable);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
@ -272,11 +272,11 @@ HELP
|
|||
);
|
||||
|
||||
%invoke = (
|
||||
headers => [ qw("equalize.h") ],
|
||||
headers => [ qw("gimpdrawable-equalize.h") ],
|
||||
code => <<'CODE'
|
||||
{
|
||||
if (! gimp_drawable_is_indexed (drawable))
|
||||
equalize (gimp_drawable_gimage (drawable), drawable, mask_only);
|
||||
gimp_drawable_equalize (drawable, mask_only);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
@ -298,11 +298,11 @@ HELP
|
|||
@inargs = ( &drawable_arg );
|
||||
|
||||
%invoke = (
|
||||
headers => [ qw("invert.h") ],
|
||||
headers => [ qw("gimpdrawable-invert.h") ],
|
||||
code => <<'CODE'
|
||||
{
|
||||
if (! gimp_drawable_is_indexed (drawable))
|
||||
invert (drawable);
|
||||
gimp_drawable_invert (drawable);
|
||||
else
|
||||
success = FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue