function image_diffuse_test ( )

%*****************************************************************************80
%
%% image_diffuse_test tests image_diffuse.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 February 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../image_diffuse' );

  timestamp ( )
  fprintf ( 1, '\n' );
  fprintf ( 1, 'image_diffuse_test:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test image_diffuse.\n' );

  gray = imread ( 'fool.png' );
  c = 0.05;
  k = 20;
  gray_new = image_diffuse ( gray, c, k );
  filename = 'fool_c0.05_k20.png';
  imwrite ( gray_new, filename, 'png' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  figure ( 1 )
  imshow ( gray_new )

  gray = imread ( 'fool.png' );
  c = 0.50;
  k = 1;
  gray_new = image_diffuse ( gray, c, k );
  filename = 'fool_c0.50_k01.png';
  imwrite ( gray_new, filename, 'png' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  figure ( 2 )
  imshow ( gray_new )

  gray = imread ( 'fool.png' );
  c = 0.50;
  k = 20;
  gray_new = image_diffuse ( gray, c, k );
  filename = 'fool_c0.50_k20.png';
  imwrite ( gray_new, filename, 'png' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  figure ( 3 )
  imshow ( gray_new )

  gray = imread ( 'fool.png' );
  c = 1.00;
  k = 1;
  gray_new = image_diffuse ( gray, c, k );
  filename = 'fool_c1.00_k01.png';
  imwrite ( gray_new, filename, 'png' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
  figure ( 4 )
  imshow ( gray_new )
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'image_diffuse_test:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( )

  rmpath ( '../image_diffuse' );

  return
end

