  function Trim(F)
% F is a string that names a jpeg file in the current working directory,
% e.g. GWB.jpg
% The pixel dimension is adjusted so that the row and column pixel
% dimensions are divisible by 8.
A = imread(F);
[m,n,p] = size(A);
m = 8*floor(m/8);
n = 8*floor(n/8);
A = A(1:m,1:n,1:p);
imwrite(A,F,'jpg');