function correctGamma(inFile, outFile, gamma)

% Usage: correctGamma(inFile, outFile, gammaValue)
%
% Takes in a bmp file and a gamma value, and creates
% a tiff file of the gamma-corected image.
%
% KLY 98

disp('Reading bmp file....')
[r g b] = bmpread(inFile);
disp('Correcting red channel....')
r = r.^gamma;
disp('Correcting green channel....')
g = g.^gamma;
disp('Correcting blue channel....')
b = b.^gamma;
disp('Saving....')
tiffwrite(r,g,b, outFile);
disp('Done!')
