function image_normalize_test ( )

%*****************************************************************************80
%
%% IMAGE_NORMALIZE_TEST tests IMAGE_NORMALIZE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    15 December 2018
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../image_normalize' )

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'IMAGE_NORMALIZE_TEST\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test IMAGE_NORMALIZE.\n' );

  filename1 = 'stallone1.jpg';
  A1 = imread ( filename1 );
  [ h1, w1, colors1 ] = size ( A1 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Input file is "%s"\n', filename1 );
  fprintf ( 1, '  Height = %d, Width = %d, Colors = %d\n', h1, w1, colors1 );

  h2 = 120;
  w2 = 90;
  A2 = image_normalize ( filename1, h2, w2 );

  colors2 = 1;
  filename2 = 'stallone2.jpg';
  imwrite ( A2, filename2, 'jpeg' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Output file is "%s"\n', filename2 );
  fprintf ( 1, '  Height = %d, Width = %d, Colors = %d\n', h2, w2, colors2 );
  
  figure ( 1 )
  imshow ( A1 )
  title ( filename1 )

  figure ( 2 )
  imshow ( A2 )
  title ( filename2 )
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'IMAGE_NORMALIZE_TEST\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../image_normalize' )

  return
end
