%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Author: Roland Miezianko (rmiezian@astro.temple.edu)
% Date: October 6, 2002
% Instructor: Dr.Longin Jan Latecki
% Course: CIS 581
% Project : Assignment 1 (Image Complement Part)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function [inputFileName] = revPixels

% read this file name
inputFileName = 'moon.tiff';

% read original gray-scale image from file
im8 = imread(inputFileName);

% convert original image to doubles
im8d = double(im8);

% create a reversed image
im8dcomp = 255 - im8d;

% show the original and reversed images on one plot

% Plot the original image
subplot(1,2,1);
imagesc(im8d);
colormap(gray);
axis square;
axis off;
grid off;
title('Original','FontSize',12,'Color','b')

% Plot the reversed image
subplot(1,2,2);
imagesc(im8dcomp);
colormap(gray);
axis square;
axis off;
grid off;
title('Reversed','FontSize',12,'Color','b')

return;