remove deprecated cli programs
removed some deprecated or now-replaced cli programs
This commit is contained in:
parent
e17435c105
commit
c0b98a19f9
@ -645,7 +645,6 @@ AC_OUTPUT([
|
||||
tools/Makefile
|
||||
tools/iofuncs/Makefile
|
||||
tools/mosaicing/Makefile
|
||||
tools/other/Makefile
|
||||
tools/scripts/Makefile
|
||||
tools/scripts/batch_crop
|
||||
tools/scripts/batch_image_convert
|
||||
|
@ -2,5 +2,4 @@
|
||||
SUBDIRS = \
|
||||
iofuncs \
|
||||
mosaicing \
|
||||
other \
|
||||
scripts
|
||||
|
@ -1,27 +0,0 @@
|
||||
bin_PROGRAMS = \
|
||||
cooc \
|
||||
cooc_features \
|
||||
glds \
|
||||
glds_features \
|
||||
simcontr \
|
||||
sines \
|
||||
spatres \
|
||||
squares
|
||||
|
||||
cooc_SOURCES = cooc.c
|
||||
cooc_features_SOURCES = cooc_features.c
|
||||
glds_SOURCES = glds.c
|
||||
glds_features_SOURCES = glds_features.c
|
||||
simcontr_SOURCES = simcontr.c
|
||||
sines_SOURCES = sines.c
|
||||
spatres_SOURCES = spatres.c
|
||||
squares_SOURCES = squares.c
|
||||
|
||||
INCLUDES = -I${top_srcdir}/libvips/include @VIPS_CFLAGS@ @VIPS_INCLUDES@
|
||||
AM_LDFLAGS = @LDFLAGS@
|
||||
LDADD = @VIPS_CFLAGS@ ${top_builddir}/libvips/libvips.la @VIPS_LIBS@
|
||||
if ENABLE_CXX
|
||||
LDADD += @VIPS_CXX_LIBS@
|
||||
endif
|
||||
|
||||
|
@ -1,91 +0,0 @@
|
||||
/* @(#) Creates a cooourrence matrix from an image
|
||||
* @(#) Usage: cooc image matrix xpos ypos xsize ysize dx dy flag
|
||||
*
|
||||
* Copyright: 1991, N. Dessipris.
|
||||
*
|
||||
* Author: N. Dessipris
|
||||
* Written on: 26/03/1991
|
||||
* Modified on:
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser 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
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
IMAGE *image, *matrix;
|
||||
int xpos, ypos, xsize, ysize, dx, dy, flag;
|
||||
|
||||
if (argc != 10)
|
||||
error_exit("Usage:\n\
|
||||
%s image matrix xpos ypos xsize ysize dx dy flag\n\
|
||||
WARNING: The program overwrites the output file if the owner has rw access.",
|
||||
argv[0]);
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
setlocale( LC_ALL, "" );
|
||||
|
||||
xpos = atoi(argv[3]);
|
||||
ypos = atoi(argv[4]);
|
||||
xsize = atoi(argv[5]);
|
||||
ysize = atoi(argv[6]);
|
||||
dx = atoi(argv[7]);
|
||||
dy = atoi(argv[8]);
|
||||
flag = atoi(argv[9]);
|
||||
|
||||
if ( (image = im_open(argv[1],"r")) == NULL )
|
||||
error_exit("Unable to open %s for input", argv[1]);
|
||||
|
||||
if ( (matrix = im_open(argv[2],"w")) == NULL )
|
||||
error_exit("Unable to open %s for output", argv[2]);
|
||||
|
||||
if ( im_cooc_matrix(image, matrix, xpos, ypos, xsize, ysize,
|
||||
dx, dy, flag) == -1 )
|
||||
error_exit("Unable to im_cooc_matrix");
|
||||
|
||||
if ( im_updatehist(matrix, argv[0], argc - 1, argv + 1) == -1)
|
||||
error_exit("Unable to update history");
|
||||
|
||||
if ( ( im_close( image ) == -1 )||( im_close( matrix ) == -1 ) )
|
||||
error_exit("Unable to close %s or %s",argv[1], argv[2]);
|
||||
|
||||
return(0);
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
/* @(#) Prints features of cooc to stdout
|
||||
* @(#) Usage: cooc_features matrix
|
||||
*
|
||||
* Copyright: 1991, N. Dessipris.
|
||||
*
|
||||
* Author: N. Dessipris
|
||||
* Written on: 26/03/1991
|
||||
* Modified on:
|
||||
* 16/6/93 J.Cupitt
|
||||
* - stupid cooc_features externs removed
|
||||
* - ANSIfied
|
||||
* - print to stdout
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser 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
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
|
||||
int
|
||||
main( int argc, char *argv[] )
|
||||
{
|
||||
IMAGE *matrix;
|
||||
double fasm, fent, fcor, fcon;
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
setlocale( LC_ALL, "" );
|
||||
|
||||
if( argc != 2 )
|
||||
error_exit( "usage: %s matrix_image", argv[0] );
|
||||
|
||||
if( !(matrix = im_open(argv[1],"r")) )
|
||||
error_exit( "unable to open %s for input",
|
||||
argv[1] );
|
||||
|
||||
if( im_cooc_asm( matrix, &fasm ) )
|
||||
error_exit( "unable to im_cooc_asm" );
|
||||
|
||||
if( im_cooc_contrast( matrix, &fcon ) )
|
||||
error_exit( "unable to im_cooc_contrast");
|
||||
|
||||
if( im_cooc_entropy( matrix, &fent ) )
|
||||
error_exit( "unable to im_cooc_entropy");
|
||||
|
||||
if( im_cooc_correlation( matrix, &fcor ) )
|
||||
error_exit( "unable to im_cooc_correlation");
|
||||
|
||||
if( im_close( matrix ) )
|
||||
error_exit( "unable to close %s", argv[1]);
|
||||
|
||||
printf( "cooc: ASM=%f, ENT=%f, COR=%f, CON=%f\n",
|
||||
fasm, fent, fcor, fcon);
|
||||
|
||||
return( 0 );
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
/* @(#) Creates a cooourrence matrix from an image
|
||||
* @(#) Usage: glds image matrix xpos ypos xsize ysize dx dy
|
||||
*
|
||||
* Copyright: 1991, N. Dessipris.
|
||||
*
|
||||
* Author: N. Dessipris
|
||||
* Written on: 26/03/1991
|
||||
* Modified on:
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser 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
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
IMAGE *image, *matrix;
|
||||
int xpos, ypos, xsize, ysize, dx, dy;
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
setlocale( LC_ALL, "" );
|
||||
|
||||
if (argc != 9)
|
||||
error_exit("Usage:\n\
|
||||
%s image matrix xpos ypos xsize ysize dx dy\n\
|
||||
WARNING: The program overwrites the output file if the owner has rw access.",
|
||||
argv[0]);
|
||||
|
||||
xpos = atoi(argv[3]);
|
||||
ypos = atoi(argv[4]);
|
||||
xsize = atoi(argv[5]);
|
||||
ysize = atoi(argv[6]);
|
||||
dx = atoi(argv[7]);
|
||||
dy = atoi(argv[8]);
|
||||
|
||||
if ( (image = im_open(argv[1],"r")) == NULL )
|
||||
error_exit("Unable to open %s for input", argv[1]);
|
||||
|
||||
if ( (matrix = im_open(argv[2],"w")) == NULL )
|
||||
error_exit("Unable to open %s for output", argv[2]);
|
||||
|
||||
if ( im_glds_matrix(image, matrix, xpos, ypos, xsize, ysize,
|
||||
dx, dy) == -1 )
|
||||
error_exit("Unable to im_glds_matrix");
|
||||
|
||||
if ( im_updatehist(image, argv[0], argc - 1, argv + 1) == -1)
|
||||
error_exit("Unable to update history");
|
||||
|
||||
if ( ( im_close( image ) == -1 )||( im_close( matrix ) == -1 ) )
|
||||
error_exit("Unable to close %s or %s", argv[1], argv[2]);
|
||||
|
||||
return(0);
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
/* @(#) Prints features of glds in stderr
|
||||
* @(#) Usage: glds_features matrix
|
||||
*
|
||||
* Copyright: 1991, N. Dessipris.
|
||||
*
|
||||
* Author: N. Dessipris
|
||||
* Written on: 26/03/1991
|
||||
* Modified on:
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser 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
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
|
||||
int
|
||||
main( int argc, char *argv[] )
|
||||
{
|
||||
IMAGE *matrix;
|
||||
double fasm, fent, fmean, fcon;
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
setlocale( LC_ALL, "" );
|
||||
|
||||
if( argc != 2 )
|
||||
error_exit( "usage: %s matrix_image", argv[0] );
|
||||
|
||||
|
||||
if( !(matrix = im_open(argv[1],"r")) )
|
||||
error_exit( "unable to open %s for input",
|
||||
argv[1] );
|
||||
|
||||
if( im_glds_asm( matrix, &fasm ) )
|
||||
error_exit( "unable to im_glds_asm");
|
||||
|
||||
if( im_glds_contrast( matrix, &fcon ) )
|
||||
error_exit( "unable to im_glds_contrast");
|
||||
|
||||
if( im_glds_entropy( matrix, &fent ) )
|
||||
error_exit( "unable to im_glds_entropy");
|
||||
|
||||
if( im_glds_mean( matrix, &fmean ) )
|
||||
error_exit( "unable to im_glds_mean");
|
||||
|
||||
if( im_close( matrix ) )
|
||||
error_exit( "unable to close %s", argv[1]);
|
||||
|
||||
printf( "glds: ASM=%f, ENT=%f, MEAN=%f, CON=%f\n",
|
||||
fasm, fent, fmean, fcon);
|
||||
|
||||
return(0);
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
/* @(#) Creates a pattern showing the simultaneous contrast
|
||||
* @(#) Usage: simcontr file xsize ysize
|
||||
*
|
||||
* Copyright: 1991, N. Dessipris.
|
||||
*
|
||||
* Author: N. Dessipris
|
||||
* Written on: 26/03/1991
|
||||
* Modified on:
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser 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
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
#include <vips/internal.h>
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
IMAGE *image;
|
||||
int xsize, ysize;
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
setlocale( LC_ALL, "" );
|
||||
|
||||
if (argc != 4)
|
||||
error_exit("Usage:\n%s file xsize ysize\n\n\
|
||||
WARNING: The program overwrites the output file if the owner has rw access.",
|
||||
argv[0]);
|
||||
|
||||
xsize = atoi(argv[2]);
|
||||
ysize = atoi(argv[3]);
|
||||
|
||||
|
||||
if ( (image = im_openout(argv[1])) == NULL )
|
||||
error_exit("Unable to open %s for output", argv[1]);
|
||||
|
||||
if ( im_simcontr(image, xsize, ysize) == -1 )
|
||||
error_exit("Unable to im_simcontr");
|
||||
|
||||
if ( im_updatehist(image, argv[0], argc - 1, argv + 1) == -1)
|
||||
error_exit("Unable to update history");
|
||||
|
||||
if ( im_close( image ) == -1 )
|
||||
error_exit("Unable to close %s", argv[1]);
|
||||
|
||||
return(0);
|
||||
}
|
@ -1,90 +0,0 @@
|
||||
/* @(#) Creates a scaled uchar sinewave waveform.
|
||||
* @(#) Usage: sines file xsize ysize horfrew verfreq
|
||||
*
|
||||
* Copyright: 1991, N. Dessipris.
|
||||
*
|
||||
* Author: N. Dessipris
|
||||
* Written on: 26/03/1991
|
||||
* Modified on:
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser 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
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
#include <vips/internal.h>
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
IMAGE *image, *bufim;
|
||||
int xsize, ysize;
|
||||
double horfreq, verfreq;
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
setlocale( LC_ALL, "" );
|
||||
|
||||
if (argc != 6)
|
||||
error_exit("Usage:\n%s file xsize ysize horfreq verfreq\n\n\
|
||||
WARNING: The program overwrites the output file if the owner has rw access.",
|
||||
argv[0]);
|
||||
|
||||
xsize = atoi(argv[2]);
|
||||
ysize = atoi(argv[3]);
|
||||
horfreq = atof(argv[4]);
|
||||
verfreq = atof(argv[5]);
|
||||
|
||||
if ( (bufim = im_setbuf("temp.v")) == NULL )
|
||||
error_exit("Unable to set buffer image");
|
||||
|
||||
if ( im_sines(bufim, xsize, ysize, horfreq, verfreq) == -1 )
|
||||
error_exit("Unable to im_sines");
|
||||
|
||||
if ( (image = im_openout(argv[1])) == NULL )
|
||||
error_exit("Unable to open %s for output", argv[1]);
|
||||
|
||||
if ( im_scale(bufim, image) == -1)
|
||||
error_exit("Unable to im_scale");
|
||||
|
||||
if ( im_updatehist(image, argv[0], argc - 1, argv + 1) == -1)
|
||||
error_exit("Unable to update history");
|
||||
|
||||
if ( ( im_close( image ) == -1 )||( im_close( bufim ) == -1 ) )
|
||||
error_exit("Unable to close %s or buffer image",argv[1]);
|
||||
|
||||
return(0);
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
/* @(#) Reduces the spatial resolution of an image by increasing the
|
||||
* @(#) pixel size
|
||||
* @(#)
|
||||
* @(#) Usage: spatres in out step
|
||||
* @(#)
|
||||
*
|
||||
* Copyright: 1991, N. Dessipris.
|
||||
*
|
||||
* Author: Nicos Dessipris
|
||||
* Written on: 27/03/1991
|
||||
* Modified on :
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser 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
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
IMAGE *in, *out;
|
||||
int step = 0;
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
setlocale( LC_ALL, "" );
|
||||
|
||||
if ( (argc != 4)||(argv[1][0] == '-') )
|
||||
error_exit(
|
||||
"Usage:\n%s in out step\n\n\
|
||||
WARNING: The program destroys the opfile if the owner has rw access on it.",
|
||||
argv[0]);
|
||||
|
||||
step = atoi(argv[3]);
|
||||
|
||||
if ((in= im_open(argv[1],"r")) == NULL)
|
||||
error_exit("Unable to open %s for input", argv[1]);
|
||||
|
||||
if ( (out=im_open(argv[2],"w")) == NULL )
|
||||
error_exit("Unable to open %s", argv[2]);
|
||||
|
||||
if ( im_spatres(in, out, step) == -1)
|
||||
error_exit("Unable to im_spatres");
|
||||
|
||||
if ( im_updatehist(out, argv[0], argc - 1, argv + 1) == -1)
|
||||
error_exit("Unable to update history");
|
||||
|
||||
if ( (im_close(in) == -1)||(im_close(out) == -1) )
|
||||
error_exit("unable to close %s or %s",argv[1],argv[2]);
|
||||
|
||||
return(0);
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
/* @(#) Creates a byte square waveform. Binary image with 0 and 255
|
||||
* @(#) Usage: squares file xsize ysize horfreq verfreq
|
||||
*
|
||||
* Copyright: 1991, N. Dessipris.
|
||||
*
|
||||
* Author: N. Dessipris
|
||||
* Written on: 26/03/1991
|
||||
* Modified on:
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
This file is part of VIPS.
|
||||
|
||||
VIPS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser 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
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /*HAVE_CONFIG_H*/
|
||||
#include <vips/intl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <vips/vips.h>
|
||||
#include <vips/internal.h>
|
||||
#include <vips/deprecated.h>
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
IMAGE *image, *bufim;
|
||||
int xsize, ysize;
|
||||
double horfreq, verfreq;
|
||||
|
||||
if( im_init_world( argv[0] ) )
|
||||
error_exit( "unable to start VIPS" );
|
||||
textdomain( GETTEXT_PACKAGE );
|
||||
setlocale( LC_ALL, "" );
|
||||
|
||||
if (argc != 6)
|
||||
error_exit("Usage:\n%s file xsize ysize horfreq verfreq\n\n\
|
||||
WARNING: The program overwrites the output file if the owner has rw access.",
|
||||
argv[0]);
|
||||
|
||||
xsize = atoi(argv[2]);
|
||||
ysize = atoi(argv[3]);
|
||||
horfreq = atof(argv[4]);
|
||||
verfreq = atof(argv[5]);
|
||||
|
||||
if ( (bufim = im_setbuf("temp.v")) == NULL )
|
||||
error_exit("Unable to set buffer image");
|
||||
|
||||
if ( im_sines(bufim, xsize, ysize, horfreq, verfreq) == -1 )
|
||||
error_exit("Unable to im_sines");
|
||||
|
||||
if ( (image = im_openout(argv[1])) == NULL )
|
||||
error_exit("Unable to open %s for output", argv[1]);
|
||||
|
||||
if ( im_thresh(bufim, image, (double)0.0) == -1)
|
||||
error_exit("Unable to im_thresh");
|
||||
|
||||
if ( im_updatehist(image, argv[0], argc - 1, argv + 1) == -1)
|
||||
error_exit("Unable to update history");
|
||||
|
||||
if ( ( im_close( image ) == -1 )||( im_close( bufim ) == -1 ) )
|
||||
error_exit("Unable to close %s or buffer image",
|
||||
argv[1]);
|
||||
|
||||
return(0);
|
||||
}
|
Loading…
Reference in New Issue
Block a user