Commit 2bc4ca79 authored by Maurits Rijk's avatar Maurits Rijk Committed by Maurits Rijk
Browse files

plug-ins/common/CEL.c plug-ins/common/gbr.c plug-ins/common/gee.c

2005-05-31  Maurits Rijk  <m.rijk@chello.nl>

	* plug-ins/common/CEL.c
	* plug-ins/common/gbr.c
	* plug-ins/common/gee.c
	* plug-ins/common/hot.c
	* plug-ins/common/pat.c
	* plug-ins/common/pcx.c
	* plug-ins/common/spheredesigner.c
	* plug-ins/common/tiler.c
	* plug-ins/common/zealouscrop.c: GPL license added for plug-ins
	without any license. If any of the authors objects we will
	probably have to remove the plug-in.
parent bde8c0d4
2005-05-31 Maurits Rijk <m.rijk@chello.nl>
* plug-ins/common/CEL.c
* plug-ins/common/gbr.c
* plug-ins/common/gee.c
* plug-ins/common/hot.c
* plug-ins/common/pat.c
* plug-ins/common/pcx.c
* plug-ins/common/spheredesigner.c
* plug-ins/common/tiler.c
* plug-ins/common/zealouscrop.c: GPL license added for plug-ins
without any license. If any of the authors objects we will
probably have to remove the plug-in.
2005-05-31 Maurits Rijk <m.rijk@chello.nl>
* plug-ins/gfig/gfig-dobject.c: plug memory leak: Fixes #305990
......
/* cel.c -- KISS CEL file format plug-in for The GIMP
* (copyright) 1997,1998 Nick Lamb (njl195@zepler.org.uk)
*
* Skeleton cloned from Michael Sweet's PNG plug-in. KISS format courtesy
* of the KISS/GS documentation. Problem reports to the above address
*/
/* History:
* 0.1 Very limited functionality (modern 4bit only)
* 0.2 Default palette (nice yellows) is automatically used
* 0.3 Support for the older (pre KISS/GS) cell format
* 0.4 First support for saving images
* 0.5 Show copyright date, not version number, thanks to DbBrowser
* 0.6 File dialogs, palette handling, better magic behaviour
* 0.7 Handle interactivity settings, tidy up
* 1.0 Fixed for GIMP 0.99.27 running on GTK+ 1.0.0, and released
* 1.1 Oops, #include unistd.h, thanks Tamito Kajiyama
* 1.2 Changed email address, tidied up
* 1.3 Added g_message features, fixed Saving bugs...
* 1.4 Offsets work (needed them for a nice example set)
* 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.
*
* Possible future additions:
* + Save (perhaps optionally?) the palette in a KCF
* 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"
......@@ -47,7 +43,7 @@ static gint load_palette (FILE *fp,
guchar palette[]);
static gint32 load_image (const gchar *file,
const gchar *brief);
static gint save_image (const gchar *file,
static gboolean save_image (const gchar *file,
const gchar *brief,
gint32 image,
gint32 layer);
......@@ -533,7 +529,7 @@ load_palette (FILE *fp,
return colours;
}
static gint
static gboolean
save_image (const gchar *file,
const gchar *brief,
gint32 image,
......
/* 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.
*/
/*
* gbr plug-in version 1.00
* Loads/saves version 2 GIMP .gbr files, by Tim Newsome <drz@frody.bloke.com>
......
/*
* (c) Adam D. Moss : 1998-2000 : adam@gimp.org : adam@foxbox.org
*
* Enjoy.
*/
/*
* Version 1.01 : 2000-12-12
* 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 <string.h>
......@@ -137,7 +148,6 @@ run (const gchar *name,
values[0].data.d_status = status;
}
static void
build_dialog (void)
{
......@@ -185,7 +195,6 @@ build_dialog (void)
NULL);
}
/* #define LIGHT 0x19
#define LIGHT 0x1a
#define LIGHT 0x21 */
......@@ -211,7 +220,6 @@ gen_llut (void)
}
}
static void
do_fun (void)
{
......@@ -245,7 +253,6 @@ do_fun (void)
gtk_main ();
}
static void
show (void)
{
......@@ -290,7 +297,6 @@ bumpbob (int x, int y, int size)
}
}
/* Adam's sillier algorithm. */
static void
iterate (void)
......@@ -522,7 +528,6 @@ iterate (void)
}
}
static void
render_frame (void)
{
......@@ -548,7 +553,6 @@ render_frame (void)
frame++;
}
static void
init_preview_misc (void)
{
......@@ -629,7 +633,6 @@ init_preview_misc (void)
gimp_drawable_detach(drawable);
/* convert the image data of varying types into flat grey or rgb. */
switch (imagetype)
{
......
/*
* 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.
*/
/*
* hot.c - Scan an image for pixels with RGB values that will give
* "unsafe" values of chrominance signal or composite signal
......@@ -44,20 +63,6 @@
* than 100, while staying safely away from the hard limit.
*/
/*
* run-time options:
*
* Define either NTSC or PAL as 1 to select the colour system.
* Define the other one as zero, or leave it undefined.
*
* Define FLAG_HOT as 1 if you want "hot" pixels set to black
* to identify them. Otherwise they will be made safe.
*
* Define REDUCE_SAT as 1 if you want hot pixels to be repaired by
* reducing their saturation. By default, luminance is reduced.
*
*/
#include "config.h"
#include <string.h>
......
/*
* pat plug-in version 1.01
* Loads/saves version 1 GIMP .pat files, by Tim Newsome <drz@frody.bloke.com>
* Some bits stolen from the .99.7 source tree.
* Updated to fix various outstanding problems, brief help -- Nick Lamb
* njl195@zepler.org.uk, April 2000
*
* 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"
......
/* pcx.c GIMP plug-in for loading & saving PCX files */
/*
* pcx.c GIMP plug-in for loading & saving PCX files
*
* 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.
*/
/* This code is based in parts on code by Francisco Bustamante, but the
largest portion of the code has been rewritten and is now maintained
occasionally by Nick Lamb njl195@zepler.org.uk */
/* New for 1998 -- Load 1, 4, 8 & 24 bit PCX files */
/* -- Save 8 & 24 bit PCX files */
/* 1998-01-19 - fixed some endianness problems (Raphael Quinet) */
/* 1998-02-05 - merged patch with "official" tree, some tidying up (njl) */
/* 1998-05-17 - changed email address, more tidying up (njl) */
/* 1998-05-31 - g_message (njl) */
/* Please contact me if you can't use your PCXs with this tool, I want
The GIMP to have the best file filters on the planet */
#include "config.h"
#include <errno.h>
......
......@@ -2,6 +2,22 @@
* 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.
*/
/*
* SphereDesigner v0.4 - creates textured spheres
* by Vidar Madsen <vidar@prosalg.no>
*
......
/* Tiler v0.31
* 22 May 1997
* Tim Rowley <tor@cs.brown.edu>
*/
/* TODO:
* + better basis function
*/
/* History:
* v0.1: initial version
* v0.2: fix edge conditions
* v0.3: port to 0.99 API
* v0.31: small bugfix
*
* 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"
......
/*
* ZealousCrop plug-in version 1.00
* by Adam D. Moss <adam@foxbox.org>
* loosely based on Autocrop by Tim Newsome <drz@froody.bloke.com>
*/
/*
* BUGS:
* Doesn't undo properly.
* Progress bar doesn't do anything yet.
*
* 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"
......@@ -179,13 +186,13 @@ do_zcrop (GimpDrawable *drawable,
gimp_pixel_rgn_init (&destPR, drawable, 0, 0, width, height, TRUE, TRUE);
livingrows = 0;
for (y=0; y<height; y++)
for (y = 0; y < height; y++)
{
gimp_pixel_rgn_get_row (&srcPR, buffer, 0, y, width);
killrows[y] = TRUE;
for (x=0; x<width*bytes; x+=bytes)
for (x = 0; x < width * bytes; x += bytes)
{
if (!colours_equal (buffer, &buffer[x], bytes))
{
......@@ -202,13 +209,13 @@ do_zcrop (GimpDrawable *drawable,
livingcols = 0;
for (x=0; x<width; x++)
for (x = 0; x < width; x++)
{
gimp_pixel_rgn_get_col (&srcPR, buffer, x, 0, height);
killcols[x] = TRUE;
for (y=0; y<height*bytes; y+=bytes)
for (y = 0; y < height * bytes; y += bytes)
{
if (!colours_equal(buffer, &buffer[y], bytes))
{
......@@ -224,8 +231,8 @@ do_zcrop (GimpDrawable *drawable,
}
if (((livingcols==0) || (livingrows==0)) ||
((livingcols==width) && (livingrows==height)))
if ((livingcols == 0 || livingrows==0) ||
(livingcols == width && livingrows == height))
{
g_message (_("Nothing to crop."));
return;
......@@ -233,7 +240,7 @@ do_zcrop (GimpDrawable *drawable,
destrow = 0;
for (y=0; y<height; y++)
for (y = 0; y < height; y++)
{
if (!killrows[y])
{
......@@ -251,7 +258,7 @@ do_zcrop (GimpDrawable *drawable,
destcol = 0;
gimp_pixel_rgn_init(&srcPR, drawable, 0, 0, width, height, FALSE, TRUE);
for (x=0; x<width; x++)
for (x = 0; x < width; x++)
{
if (!killcols[x])
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment