head	1.1;
access;
symbols;
locks; strict;
comment	@// @;


1.1
date	95.01.10.19.16.47;	author rjj;	state Exp;
branches;
next	;


desc
@Simple program to general square images with a constant value,
   the default is a 1024x1024 image with value 1 everywhere.
@


1.1
log
@Initial revision
@
text
@// File: black-image.c  Section: 11.4,
//                               Counting Connected Components by Shrinking
//      Copyright 1994, Center for Computer Vision and Visualization,
//      University of Florida.  All rights reserved.
//
// Create a square image of length (&width) as the first parameter, and
//   value equal to the second parameter ( default is 1 ).

#include "UcharDI.h"

int main( int argc, char * argv[] ) {

    int n = 1024, value = 1;
    if ( argc > 1 ) {
	// read n\'s value
	n = atoi( argv[1] );
    }
    if (argc > 2) {
	value = atoi( argv[2] );
    }
    cerr << "Constructing image of size "
	 << n << "x" << n
	 << "with value = " << value << endl;

    IA_Image<IA_Point<int>,u_char>(
	IA_boxy_pset( IA_Point<int>(0,0), IA_Point<int>(n,n) ),
	value
	).write_PGM( cout );

    return 0;
}
@
