RSS/Atom feed Twitter
Site is read-only, email is disabled

stegano compile

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

stegano compile Bill Winegarden 14 Jun 04:23
  stegano compile Sven Neumann 14 Jun 11:12
stegano compile Sven Neumann 14 Jun 11:50
Bill Winegarden
2003-06-14 04:23:20 UTC (almost 21 years ago)

stegano compile

Hi,
I am having some difficulty getting the Stegano plug to compile. My system is a basic Mandrake 9 with default directory structures. When I run 'make', I get pages of info ending with an 'Error 1'. Is this a problem plugin?

tia, Bill W.

Sven Neumann
2003-06-14 11:12:08 UTC (almost 21 years ago)

stegano compile

Hi,

Bill Winegarden writes:

I am having some difficulty getting the Stegano plug to compile. My system is a basic Mandrake 9 with default directory structures. When I run 'make', I get pages of info ending with an 'Error 1'. Is this a problem plugin?

I assume you got it from here:

http://registry.gimp.org/plugin?id=314

As this page states the plug-in is for GIMP-1.0 and probably needs a couple of changes to be compiled for 1.2 or 1.3.

Sven

Sven Neumann
2003-06-14 11:50:31 UTC (almost 21 years ago)

stegano compile

Hi,

Below is a patch that makes the plug-in compile against the GIMP 1.2 API. Forget the Makefile that is included with the tarball and instead use gimptool-1.2 to compile the plug-in. So in order to build it, change to the Stegano source tree, apply the patch:

patch -p0 < stegano.diff

compile and install using gimptool-1.2:

gimptool-1.2 --install stegano.c

I haven't even tested if the plug-in works but at least you should get it compiled now.

Sven

--- stegano.c.orig 1998-12-01 20:15:53.000000000 +0100 +++ stegano.c 2003-06-14 11:37:29.000000000 +0200 @@ -7,6 +7,10 @@
********************************************************************** */

+/* Applied some Search-and-Replace rules to make it compile + * against the GIMP-1.2 API. -- June 2003, Sven Neumann + */
+

/* The GIMP -- an image manipulation program * Copyright (C) 1995 Spencer Kimball and Peter Mattis @@ -28,6 +32,7 @@

#include
#include
+#include
#include
#include

@@ -52,11 +57,11 @@ typedef struct { */
static void query(void);
static void run(char *name, int nparams, - GParam *param,
+ GimpParam *param,
int *nreturn_vals,
- GParam **return_vals);
-static void drawstegano(GDrawable *drawable); -static void readstegano(GDrawable *drawable); + GimpParam **return_vals);
+static void drawstegano(GimpDrawable *drawable); +static void readstegano(GimpDrawable *drawable); static gint stegano_dialog(void);
static gint stegano_save_dialog(void); static gint stegano_warning_dialog(void); @@ -78,14 +83,14 @@ GtkTooltips *tips; GdkColor tips_fg,tips_bg;
gchar filename[128];
gint saverun;
- static GParam values[1];
- GDrawable *drawable;
- GRunModeType run_mode;
- GStatusType status = STATUS_SUCCESS; + static GimpParam values[1];
+ GimpDrawable *drawable;
+ GimpRunModeType run_mode;
+ GimpPDBStatusType status = GIMP_PDB_SUCCESS;


-GPlugInInfo PLUG_IN_INFO =
+GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@@ -108,16 +113,16 @@ MAIN()
static void
query(void)
{
- static GParamDef args[] =
+ static GimpParamDef args[] =
{
- { PARAM_INT32, "run_mode", "Interactive, non-interactive" }, - { PARAM_IMAGE, "image", "Input image (unused)" }, - { PARAM_DRAWABLE, "drawable", "Input drawable" }, - { PARAM_INT8, "mode", "FALSE: Hide file in image; TRUE: Get hidden file" }, - { PARAM_STRING, "filename[128]", "Name of the file to hide in an image (only of importance if mode=FALSE" }, + { GIMP_PDB_INT32, "run_mode", "Interactive, non-interactive" }, + { GIMP_PDB_IMAGE, "image", "Input image (unused)" }, + { GIMP_PDB_DRAWABLE, "drawable", "Input drawable" }, + { GIMP_PDB_INT8, "mode", "FALSE: Hide file in image; TRUE: Get hidden file" }, + { GIMP_PDB_STRING, "filename[128]", "Name of the file to hide in an image (only of importance if mode=FALSE" }, };

- static GParamDef *return_vals = NULL; + static GimpParamDef *return_vals = NULL; static int nargs = sizeof(args)/ sizeof(args[0]); static int nreturn_vals = 0;

@@ -129,7 +134,7 @@ query(void)
"December, 1998",
"/Filters/Image/Stegano",
"RGB*, GRAY*, INDEXED*",
- PROC_PLUG_IN,
+ GIMP_PLUGIN,
nargs, nreturn_vals,
args, return_vals);
}
@@ -137,16 +142,16 @@ query(void)
static void
run(char *name,
int nparams,
- GParam *param,
+ GimpParam *param,
int *nreturn_vals,
- GParam **return_vals)
+ GimpParam **return_vals)
{
gchar **argv;
gint argc;

run_mode = param[0].data.d_int32;
- values[0].type = PARAM_STATUS;
+ values[0].type = GIMP_PDB_STATUS; values[0].data.d_status = status;
*nreturn_vals = 1;
@@ -156,7 +161,7 @@ run(char *name,


switch(run_mode) {
- case RUN_INTERACTIVE:
+ case GIMP_RUN_INTERACTIVE:
/* Possibly retrieve data */
gimp_get_data("plug_in_stegano", &wvals); /* Get information from the dialog */ @@ -169,11 +174,11 @@ run(char *name, stegano_dialog();
return;

- case RUN_NONINTERACTIVE:
+ case GIMP_RUN_NONINTERACTIVE:
/* Make sure all the arguments are present */ if (nparams != 5)
- status = STATUS_CALLING_ERROR; - if (status == STATUS_SUCCESS)
+ status = GIMP_PDB_CALLING_ERROR; + if (status == GIMP_PDB_SUCCESS)
wvals.mode = param[3].data.d_int8; strncpy (wvals.filename,param[4].data.d_string, 128); wvals.filename[127]='\0';
@@ -186,7 +191,7 @@ run(char *name,
gtk_tooltips_set_delay(tips, 2500);
break;
- case RUN_WITH_LAST_VALS:
+ case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
argc = 1;
argv = g_new(gchar *, 1); @@ -202,18 +207,18 @@ run(char *name, default:
break;
}
- if (status == STATUS_SUCCESS) {
+ if (status == GIMP_PDB_SUCCESS) { if (!wvals.mode) {
gimp_tile_cache_ntiles(2 *(drawable->width / gimp_tile_width() + 1)); /* gimp_progress_init("Stegano plug-in is working. Please wait..."); */ drawstegano(drawable);
- if(run_mode != RUN_NONINTERACTIVE) + if(run_mode != GIMP_RUN_NONINTERACTIVE) gimp_displays_flush();
} else {
readstegano(drawable);
}
}
- if(run_mode == RUN_INTERACTIVE)
+ if(run_mode == GIMP_RUN_INTERACTIVE) gimp_set_data("plug_in_stegano", &wvals, sizeof(steganoValues)); values[0].data.d_status = status; gimp_drawable_detach(drawable);
@@ -230,12 +235,12 @@ set_tooltip (GtkTooltips *tooltips, GtkW

static void
-drawstegano(GDrawable *drawable)
+drawstegano(GimpDrawable *drawable) {

FILE *In;

- GPixelRgn srcPR, destPR;
+ GimpPixelRgn srcPR, destPR;
gint width, height;
gint bytes;
gint row;
@@ -387,10 +392,10 @@ drawstegano(GDrawable *drawable) }

static void
-readstegano(GDrawable *drawable)
+readstegano(GimpDrawable *drawable) {
FILE * Out = NULL;
- GPixelRgn srcPR;
+ GimpPixelRgn srcPR;
gint width, height;
gint bytes;
gint row, value;