function image_decimate_gray_test ( )

%*****************************************************************************80
%
%% image_decimate_gray_test() tests image_decimate_gray().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 May 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'image_decimate_gray_test():\n' );
  fprintf ( 1, '  image_decimate_gray() "decimates" a gray scale image file.\n' );

  filename = 'casablanca.pgm';
  gray = imread ( filename );
  imshow ( gray );
  pause ( 5 );
  [ m, n ] = size ( gray );
  fprintf ( 1, '  Original size of "%s" is %d by %d\n', filename, m, n );

  for i = 1 : 5
    gray_old = gray;
    gray = image_decimate_gray ( gray );
    imshow ( gray );
    pause ( 3 );
    [ m, n ] = size ( gray );
    fprintf ( 1, '  Size after decimation #%d is %d by %d\n', i, m, n );
  end

  return
end
