mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
Makefile.am configure.in install a gimpinstall script (basically
* Makefile.am * configure.in * gimptool.in: install a gimpinstall script (basically install-sh) for platforms without an install tool * plug-ins/common/csource.c: correct some gccisms * plug-ins/unsharp/dialog_f.c * plug-ins/unsharp/dialog_i.c * plug-ins/unsharp/unsharp.c: // IS NOT A VALID C COMMENT -Yosh
This commit is contained in:
parent
2fcba57836
commit
c1ca8b13ac
10 changed files with 113 additions and 78 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
Wed Aug 25 17:27:40 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* Makefile.am
|
||||
* configure.in
|
||||
* gimptool.in: install a gimpinstall script (basically install-sh)
|
||||
for platforms without an install tool
|
||||
|
||||
* plug-ins/common/csource.c: correct some gccisms
|
||||
|
||||
* plug-ins/unsharp/dialog_f.c
|
||||
* plug-ins/unsharp/dialog_i.c
|
||||
* plug-ins/unsharp/unsharp.c: // IS NOT A VALID C COMMENT
|
||||
|
||||
1999-08-26 Tomas Ogren <stric@ing.umu.se>
|
||||
|
||||
* app/module_db.c: Put the list above the description instead of
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
SUBDIRS = tools po po-plug-ins intl libgimp app $(GIMP_PLUGINS) $(GIMP_MODULES) data tips help $(GIMPDOCS)
|
||||
|
||||
bin_SCRIPTS = gimptool
|
||||
bin_SCRIPTS = gimptool @GIMPINSTALL@
|
||||
|
||||
EXTRA_SCRIPTS = gimpinstall
|
||||
|
||||
EXTRA_DIST = \
|
||||
cursors/bad \
|
||||
|
@ -101,6 +103,9 @@ m4data_DATA = gimp.m4
|
|||
|
||||
scriptdata =
|
||||
|
||||
gimpinstall:
|
||||
$(LN_S) $(srcdir)/install-sh $(srcdir)/gimpinstall
|
||||
|
||||
.PHONY: files populate checkin release
|
||||
|
||||
files:
|
||||
|
|
12
configure.in
12
configure.in
|
@ -560,6 +560,11 @@ EOF
|
|||
fi
|
||||
fi
|
||||
|
||||
GIMPINSTALL=
|
||||
if test "$INSTALL" = "$ac_install_sh"; then
|
||||
GIMPINSTALL="gimpinstall"
|
||||
fi
|
||||
|
||||
GIMPDOCS=
|
||||
if test -n "$DISTMAKE"; then
|
||||
WEBBROWSER=webbrowser TIFF=tiff JPEG=jpeg PNG=png AA=aa MPEG=mpeg
|
||||
|
@ -618,6 +623,7 @@ AC_SUBST(GIMP_MP_FLAGS)
|
|||
AC_SUBST(GIMP_MP_LIBS)
|
||||
AC_SUBST(GIMP_PERL)
|
||||
AC_SUBST(GIMPDOCS)
|
||||
AC_SUBST(GIMPINSTALL)
|
||||
|
||||
dnl easy way to skip the plug-in build
|
||||
GIMP_PLUGINS=plug-ins
|
||||
|
@ -633,6 +639,8 @@ gimprc_user
|
|||
gimprc.5
|
||||
gimptool
|
||||
libgimp/gimpfeatures.h
|
||||
libgimp/Makefile
|
||||
app/Makefile
|
||||
plug-ins/Makefile
|
||||
plug-ins/perl/config.pl:plug-ins/perl/etc/config.pl.in
|
||||
plug-ins/libgck/Makefile
|
||||
|
@ -673,7 +681,6 @@ plug-ins/sinus/Makefile
|
|||
plug-ins/struc/Makefile
|
||||
plug-ins/unsharp/Makefile
|
||||
modules/Makefile
|
||||
app/Makefile
|
||||
docs/Makefile
|
||||
data/Makefile
|
||||
data/brushes/Makefile
|
||||
|
@ -686,7 +693,6 @@ po-plug-ins/Makefile.in
|
|||
intl/Makefile
|
||||
tools/Makefile
|
||||
tools/pdbgen/Makefile
|
||||
libgimp/Makefile
|
||||
help/Makefile
|
||||
tips/Makefile],
|
||||
[
|
||||
|
@ -702,5 +708,3 @@ tips/Makefile],
|
|||
esac
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -81,6 +81,10 @@ fi
|
|||
|
||||
if test x${INSTALL+set} != xset ; then
|
||||
INSTALL='@INSTALL@'
|
||||
if test "$INSTALL" = "./install-sh -c"; then
|
||||
mydirname=`echo $0 | sed -e 's#\(.*\)/[^/].*$#\1#'`
|
||||
INSTALL="$mydirname/gimpinstall"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x${CC+set} != xset ; then
|
||||
|
@ -316,4 +320,3 @@ while test $# -gt 0; do
|
|||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
|
|
@ -81,6 +81,10 @@ fi
|
|||
|
||||
if test x${INSTALL+set} != xset ; then
|
||||
INSTALL='@INSTALL@'
|
||||
if test "$INSTALL" = "./install-sh -c"; then
|
||||
mydirname=`echo $0 | sed -e 's#\(.*\)/[^/].*$#\1#'`
|
||||
INSTALL="$mydirname/gimpinstall"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x${CC+set} != xset ; then
|
||||
|
@ -316,4 +320,3 @@ while test $# -gt 0; do
|
|||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ GPlugInInfo PLUG_IN_INFO =
|
|||
};
|
||||
|
||||
/* --- implement main (), provided by libgimp --- */
|
||||
MAIN ();
|
||||
MAIN ()
|
||||
|
||||
/* --- functions --- */
|
||||
static void
|
||||
|
@ -113,21 +113,24 @@ run (gchar *name,
|
|||
{
|
||||
gint32 image_ID = param[1].data.d_int32;
|
||||
gint32 drawable_ID = param[2].data.d_int32;
|
||||
Parasite *parasite;
|
||||
gchar *x;
|
||||
GDrawableType drawable_type = gimp_drawable_type (drawable_ID);
|
||||
Config config = {
|
||||
param[3].data.d_string,
|
||||
NULL,
|
||||
"gimp_image",
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
TRUE,
|
||||
(drawable_type == RGBA_IMAGE ||
|
||||
drawable_type == GRAYA_IMAGE ||
|
||||
drawable_type == INDEXEDA_IMAGE),
|
||||
FALSE,
|
||||
100.0,
|
||||
};
|
||||
Parasite *parasite;
|
||||
gchar *x;
|
||||
|
||||
config.file_name = param[3].data.d_string;
|
||||
config.alpha = (drawable_type == RGBA_IMAGE ||
|
||||
drawable_type == GRAYA_IMAGE ||
|
||||
drawable_type == INDEXEDA_IMAGE);
|
||||
|
||||
parasite = gimp_image_find_parasite (image_ID, "gimp-comment");
|
||||
if (parasite)
|
||||
|
|
|
@ -41,11 +41,11 @@
|
|||
There's really no reason to define this, unless you want to see how
|
||||
much pointer aritmetic can speed things up. I find that it is about
|
||||
45% faster with the optimized code. */
|
||||
//#define READABLE_CODE
|
||||
/* #define READABLE_CODE */
|
||||
|
||||
/* uncomment this line to get a rough feel of how long the
|
||||
plug-in takes to run */
|
||||
//#define TIMER
|
||||
/* #define TIMER */
|
||||
#ifdef TIMER
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
@ -132,7 +132,7 @@ static UnsharpMaskParams unsharp_params =
|
|||
0 /* default threshold = 0 */
|
||||
};
|
||||
|
||||
//static UnsharpMaskInterface umint = { FALSE };
|
||||
/* static UnsharpMaskInterface umint = { FALSE }; */
|
||||
|
||||
/* Setting PLUG_IN_INFO */
|
||||
GPlugInInfo PLUG_IN_INFO = {
|
||||
|
@ -229,7 +229,7 @@ static void run(char *name, int nparams, GParam *param, int *nreturn_vals,
|
|||
/* here we go */
|
||||
unsharp_mask(drawable, unsharp_params.radius, unsharp_params.amount);
|
||||
|
||||
// values[0].data.d_status = status;
|
||||
/* values[0].data.d_status = status; */
|
||||
gimp_displays_flush ();
|
||||
|
||||
/* set data for next use of filter */
|
||||
|
@ -307,7 +307,7 @@ static void unsharp_region (GPixelRgn srcPR, GPixelRgn destPR,
|
|||
gint cmatrix_length;
|
||||
gdouble* ctable;
|
||||
|
||||
gint row, col; //these are counters for loops
|
||||
gint row, col; /* these are counters for loops */
|
||||
|
||||
/* these are used for the merging step */
|
||||
gint threshold;
|
||||
|
@ -426,16 +426,17 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
gint row;
|
||||
|
||||
|
||||
// this is to take care cases in which the matrix can go over
|
||||
// both edges at once. It's not efficient, but this can only
|
||||
// happen in small pictures anyway.
|
||||
/* this is to take care cases in which the matrix can go over
|
||||
* both edges at once. It's not efficient, but this can only
|
||||
* happen in small pictures anyway.
|
||||
*/
|
||||
if (cmatrix_length > y) {
|
||||
|
||||
for (row = 0; row < y ; row++) {
|
||||
scale=0;
|
||||
// find the scale factor
|
||||
/* find the scale factor */
|
||||
for (j = 0; j < y ; j++) {
|
||||
// if the index is in bounds, add it to the scale counter
|
||||
/* if the index is in bounds, add it to the scale counter */
|
||||
if ((j + cmatrix_length/2 - row >= 0) &&
|
||||
(j + cmatrix_length/2 - row < cmatrix_length))
|
||||
scale += cmatrix[j + cmatrix_length/2 - row];
|
||||
|
@ -451,11 +452,11 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
}
|
||||
}
|
||||
|
||||
else { // when the cmatrix is smaller than row length
|
||||
else { /* when the cmatrix is smaller than row length */
|
||||
|
||||
// for the edge condition, we only use available info, and scale to one
|
||||
/* for the edge condition, we only use available info, and scale to one */
|
||||
for (row = 0; row < cmatrix_length/2; row++) {
|
||||
// find scale factor
|
||||
/* find scale factor */
|
||||
scale=0;
|
||||
for (j = cmatrix_length/2 - row; j<cmatrix_length; j++)
|
||||
scale += cmatrix[j];
|
||||
|
@ -468,7 +469,7 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
dest_col[row*bytes + i] = (guchar)round2int(sum / scale);
|
||||
}
|
||||
}
|
||||
// go through each pixel in each col
|
||||
/* go through each pixel in each col */
|
||||
for ( ; row < y-cmatrix_length/2; row++) {
|
||||
for (i = 0; i<bytes; i++) {
|
||||
sum = 0;
|
||||
|
@ -478,9 +479,9 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
dest_col[row*bytes + i] = (guchar)round2int(sum);
|
||||
}
|
||||
}
|
||||
// for the edge condition , we only use available info, and scale to one
|
||||
/* for the edge condition , we only use available info, and scale to one */
|
||||
for ( ; row < y; row++) {
|
||||
// find scale factor
|
||||
/* find scale factor */
|
||||
scale=0;
|
||||
for (j = 0; j< y-row + cmatrix_length/2; j++)
|
||||
scale += cmatrix[j];
|
||||
|
@ -511,16 +512,17 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
gdouble *ctable_p;
|
||||
|
||||
|
||||
// this first block is the same as the non-optimized version --
|
||||
// it is only used for very small pictures, so speed isn't a
|
||||
// big concern.
|
||||
/* this first block is the same as the non-optimized version --
|
||||
* it is only used for very small pictures, so speed isn't a
|
||||
* big concern.
|
||||
*/
|
||||
if (cmatrix_length > y) {
|
||||
|
||||
for (row = 0; row < y ; row++) {
|
||||
scale=0;
|
||||
// find the scale factor
|
||||
/* find the scale factor */
|
||||
for (j = 0; j < y ; j++) {
|
||||
// if the index is in bounds, add it to the scale counter
|
||||
/* if the index is in bounds, add it to the scale counter */
|
||||
if ((j + cmatrix_length/2 - row >= 0) &&
|
||||
(j + cmatrix_length/2 - row < cmatrix_length))
|
||||
scale += cmatrix[j + cmatrix_length/2 - row];
|
||||
|
@ -537,9 +539,9 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
}
|
||||
|
||||
else {
|
||||
// for the edge condition, we only use available info and scale to one
|
||||
/* for the edge condition, we only use available info and scale to one */
|
||||
for (row = 0; row < cmatrix_middle; row++) {
|
||||
// find scale factor
|
||||
/* find scale factor */
|
||||
scale=0;
|
||||
for (j = cmatrix_middle - row; j<cmatrix_length; j++)
|
||||
scale += cmatrix[j];
|
||||
|
@ -551,7 +553,7 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
dest_col[row*bytes + i] = (guchar)round2int(sum / scale);
|
||||
}
|
||||
}
|
||||
// go through each pixel in each col
|
||||
/* go through each pixel in each col */
|
||||
dest_col_p = dest_col + row*bytes;
|
||||
for ( ; row < y-cmatrix_middle; row++) {
|
||||
cur_col_p = (row - cmatrix_middle) * bytes + cur_col;
|
||||
|
@ -570,9 +572,9 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
}
|
||||
}
|
||||
|
||||
// for the edge condition , we only use available info, and scale to one
|
||||
/* for the edge condition , we only use available info, and scale to one */
|
||||
for ( ; row < y; row++) {
|
||||
// find scale factor
|
||||
/* find scale factor */
|
||||
scale=0;
|
||||
for (j = 0; j< y-row + cmatrix_middle; j++)
|
||||
scale += cmatrix[j];
|
||||
|
@ -745,7 +747,7 @@ static gint unsharp_mask_dialog() {
|
|||
|
||||
|
||||
|
||||
table = gtk_table_new(3, 3, FALSE); //Make a 3x3 table in mainbox
|
||||
table = gtk_table_new(3, 3, FALSE); /* Make a 3x3 table in mainbox */
|
||||
gtk_box_pack_start(GTK_BOX( GTK_DIALOG(window)->vbox), table,
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
|
@ -767,7 +769,7 @@ static gint unsharp_mask_dialog() {
|
|||
/* OK and Cancel buttons */
|
||||
gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(window)->action_area),2);
|
||||
|
||||
// Make OK button
|
||||
/* Make OK button */
|
||||
button = gtk_button_new_with_label("OK");
|
||||
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area), button,
|
||||
|
@ -777,7 +779,7 @@ static gint unsharp_mask_dialog() {
|
|||
gtk_widget_grab_default(button);
|
||||
gtk_widget_show(button);
|
||||
|
||||
// Make Cancel button
|
||||
/* Make Cancel button */
|
||||
button = gtk_button_new_with_label("Cancel");
|
||||
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ dialog_fentry_update(GtkWidget *widget, /* I - Entry widget */
|
|||
gint oldtextlength;
|
||||
gint i;
|
||||
|
||||
// new_value = atod(gtk_entry_get_text(GTK_ENTRY(widget)));
|
||||
/* new_value = atod(gtk_entry_get_text(GTK_ENTRY(widget))); */
|
||||
|
||||
textvalue = gtk_entry_get_text( GTK_ENTRY(widget));
|
||||
strncpy(newtextvalue, textvalue, MAX_ENTRY_LENGTH);
|
||||
|
@ -191,17 +191,17 @@ dialog_fentry_update(GtkWidget *widget, /* I - Entry widget */
|
|||
gtk_signal_handler_block_by_data(GTK_OBJECT(widget), value);
|
||||
/* update the entry text */
|
||||
gtk_entry_set_text( GTK_ENTRY(widget), newtextvalue);
|
||||
//gtk_entry_set_position( GTK_ENTRY(widget), i); //doesn't seem to work
|
||||
/* gtk_entry_set_position( GTK_ENTRY(widget), i); */ /* doesn't seem to work */
|
||||
/* unblock signal handler */
|
||||
gtk_signal_handler_unblock_by_data(GTK_OBJECT(widget), value);
|
||||
|
||||
|
||||
// g_print(newtextvalue);
|
||||
// g_print("\n");
|
||||
/* g_print(newtextvalue); */
|
||||
/* g_print("\n"); */
|
||||
/* set the adjustment thingy */
|
||||
new_value = atof(newtextvalue);
|
||||
|
||||
// g_print("%e.", new_value);
|
||||
/* g_print("%e.", new_value); */
|
||||
|
||||
/* set the new value */
|
||||
if (*value != new_value) {
|
||||
|
|
|
@ -169,7 +169,7 @@ dialog_ientry_update(GtkWidget *widget, /* I - Entry widget */
|
|||
gtk_signal_handler_block_by_data(GTK_OBJECT(widget), value);
|
||||
/* update the entry text */
|
||||
gtk_entry_set_text( GTK_ENTRY(widget), newtextvalue);
|
||||
//gtk_entry_set_position( GTK_ENTRY(widget), i); //doesn't seem to work
|
||||
/* gtk_entry_set_position( GTK_ENTRY(widget), i); */ /* doesn't seem to work */
|
||||
/* unblock signal handler */
|
||||
gtk_signal_handler_unblock_by_data(GTK_OBJECT(widget), value);
|
||||
|
||||
|
|
|
@ -41,11 +41,11 @@
|
|||
There's really no reason to define this, unless you want to see how
|
||||
much pointer aritmetic can speed things up. I find that it is about
|
||||
45% faster with the optimized code. */
|
||||
//#define READABLE_CODE
|
||||
/* #define READABLE_CODE */
|
||||
|
||||
/* uncomment this line to get a rough feel of how long the
|
||||
plug-in takes to run */
|
||||
//#define TIMER
|
||||
/* #define TIMER */
|
||||
#ifdef TIMER
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
@ -132,7 +132,7 @@ static UnsharpMaskParams unsharp_params =
|
|||
0 /* default threshold = 0 */
|
||||
};
|
||||
|
||||
//static UnsharpMaskInterface umint = { FALSE };
|
||||
/* static UnsharpMaskInterface umint = { FALSE }; */
|
||||
|
||||
/* Setting PLUG_IN_INFO */
|
||||
GPlugInInfo PLUG_IN_INFO = {
|
||||
|
@ -229,7 +229,7 @@ static void run(char *name, int nparams, GParam *param, int *nreturn_vals,
|
|||
/* here we go */
|
||||
unsharp_mask(drawable, unsharp_params.radius, unsharp_params.amount);
|
||||
|
||||
// values[0].data.d_status = status;
|
||||
/* values[0].data.d_status = status; */
|
||||
gimp_displays_flush ();
|
||||
|
||||
/* set data for next use of filter */
|
||||
|
@ -307,7 +307,7 @@ static void unsharp_region (GPixelRgn srcPR, GPixelRgn destPR,
|
|||
gint cmatrix_length;
|
||||
gdouble* ctable;
|
||||
|
||||
gint row, col; //these are counters for loops
|
||||
gint row, col; /* these are counters for loops */
|
||||
|
||||
/* these are used for the merging step */
|
||||
gint threshold;
|
||||
|
@ -426,16 +426,17 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
gint row;
|
||||
|
||||
|
||||
// this is to take care cases in which the matrix can go over
|
||||
// both edges at once. It's not efficient, but this can only
|
||||
// happen in small pictures anyway.
|
||||
/* this is to take care cases in which the matrix can go over
|
||||
* both edges at once. It's not efficient, but this can only
|
||||
* happen in small pictures anyway.
|
||||
*/
|
||||
if (cmatrix_length > y) {
|
||||
|
||||
for (row = 0; row < y ; row++) {
|
||||
scale=0;
|
||||
// find the scale factor
|
||||
/* find the scale factor */
|
||||
for (j = 0; j < y ; j++) {
|
||||
// if the index is in bounds, add it to the scale counter
|
||||
/* if the index is in bounds, add it to the scale counter */
|
||||
if ((j + cmatrix_length/2 - row >= 0) &&
|
||||
(j + cmatrix_length/2 - row < cmatrix_length))
|
||||
scale += cmatrix[j + cmatrix_length/2 - row];
|
||||
|
@ -451,11 +452,11 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
}
|
||||
}
|
||||
|
||||
else { // when the cmatrix is smaller than row length
|
||||
else { /* when the cmatrix is smaller than row length */
|
||||
|
||||
// for the edge condition, we only use available info, and scale to one
|
||||
/* for the edge condition, we only use available info, and scale to one */
|
||||
for (row = 0; row < cmatrix_length/2; row++) {
|
||||
// find scale factor
|
||||
/* find scale factor */
|
||||
scale=0;
|
||||
for (j = cmatrix_length/2 - row; j<cmatrix_length; j++)
|
||||
scale += cmatrix[j];
|
||||
|
@ -468,7 +469,7 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
dest_col[row*bytes + i] = (guchar)round2int(sum / scale);
|
||||
}
|
||||
}
|
||||
// go through each pixel in each col
|
||||
/* go through each pixel in each col */
|
||||
for ( ; row < y-cmatrix_length/2; row++) {
|
||||
for (i = 0; i<bytes; i++) {
|
||||
sum = 0;
|
||||
|
@ -478,9 +479,9 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
dest_col[row*bytes + i] = (guchar)round2int(sum);
|
||||
}
|
||||
}
|
||||
// for the edge condition , we only use available info, and scale to one
|
||||
/* for the edge condition , we only use available info, and scale to one */
|
||||
for ( ; row < y; row++) {
|
||||
// find scale factor
|
||||
/* find scale factor */
|
||||
scale=0;
|
||||
for (j = 0; j< y-row + cmatrix_length/2; j++)
|
||||
scale += cmatrix[j];
|
||||
|
@ -511,16 +512,17 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
gdouble *ctable_p;
|
||||
|
||||
|
||||
// this first block is the same as the non-optimized version --
|
||||
// it is only used for very small pictures, so speed isn't a
|
||||
// big concern.
|
||||
/* this first block is the same as the non-optimized version --
|
||||
* it is only used for very small pictures, so speed isn't a
|
||||
* big concern.
|
||||
*/
|
||||
if (cmatrix_length > y) {
|
||||
|
||||
for (row = 0; row < y ; row++) {
|
||||
scale=0;
|
||||
// find the scale factor
|
||||
/* find the scale factor */
|
||||
for (j = 0; j < y ; j++) {
|
||||
// if the index is in bounds, add it to the scale counter
|
||||
/* if the index is in bounds, add it to the scale counter */
|
||||
if ((j + cmatrix_length/2 - row >= 0) &&
|
||||
(j + cmatrix_length/2 - row < cmatrix_length))
|
||||
scale += cmatrix[j + cmatrix_length/2 - row];
|
||||
|
@ -537,9 +539,9 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
}
|
||||
|
||||
else {
|
||||
// for the edge condition, we only use available info and scale to one
|
||||
/* for the edge condition, we only use available info and scale to one */
|
||||
for (row = 0; row < cmatrix_middle; row++) {
|
||||
// find scale factor
|
||||
/* find scale factor */
|
||||
scale=0;
|
||||
for (j = cmatrix_middle - row; j<cmatrix_length; j++)
|
||||
scale += cmatrix[j];
|
||||
|
@ -551,7 +553,7 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
dest_col[row*bytes + i] = (guchar)round2int(sum / scale);
|
||||
}
|
||||
}
|
||||
// go through each pixel in each col
|
||||
/* go through each pixel in each col */
|
||||
dest_col_p = dest_col + row*bytes;
|
||||
for ( ; row < y-cmatrix_middle; row++) {
|
||||
cur_col_p = (row - cmatrix_middle) * bytes + cur_col;
|
||||
|
@ -570,9 +572,9 @@ static inline void blur_line(gdouble* ctable, gdouble* cmatrix,
|
|||
}
|
||||
}
|
||||
|
||||
// for the edge condition , we only use available info, and scale to one
|
||||
/* for the edge condition , we only use available info, and scale to one */
|
||||
for ( ; row < y; row++) {
|
||||
// find scale factor
|
||||
/* find scale factor */
|
||||
scale=0;
|
||||
for (j = 0; j< y-row + cmatrix_middle; j++)
|
||||
scale += cmatrix[j];
|
||||
|
@ -745,7 +747,7 @@ static gint unsharp_mask_dialog() {
|
|||
|
||||
|
||||
|
||||
table = gtk_table_new(3, 3, FALSE); //Make a 3x3 table in mainbox
|
||||
table = gtk_table_new(3, 3, FALSE); /* Make a 3x3 table in mainbox */
|
||||
gtk_box_pack_start(GTK_BOX( GTK_DIALOG(window)->vbox), table,
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
|
@ -767,7 +769,7 @@ static gint unsharp_mask_dialog() {
|
|||
/* OK and Cancel buttons */
|
||||
gtk_container_border_width(GTK_CONTAINER(GTK_DIALOG(window)->action_area),2);
|
||||
|
||||
// Make OK button
|
||||
/* Make OK button */
|
||||
button = gtk_button_new_with_label("OK");
|
||||
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->action_area), button,
|
||||
|
@ -777,7 +779,7 @@ static gint unsharp_mask_dialog() {
|
|||
gtk_widget_grab_default(button);
|
||||
gtk_widget_show(button);
|
||||
|
||||
// Make Cancel button
|
||||
/* Make Cancel button */
|
||||
button = gtk_button_new_with_label("Cancel");
|
||||
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue