MATLAB: How to make a crop image with a white color result

black colorcroppingimcropwhite

%%Cropping column off 25%
file=imread('Airplane.tiff');
CR1=imcrop(file,[128 0 512 512]);
[x,y]=size(CR1);
CRP1=zeros(M,N);
for i=1:x
for j=1:y
CRP1(i,j+127)=CR1(i,j);
end
end
step = step + 1;figure(step); imshow(uint8(CRP1));title('The Watermarked Image with Croping column off 25%');
imwrite(uint8(CRP1),'24.tiff','tiff');
if I run the code the cropping result is a black color, how to change it into a white color? -Thanks for the help-

Best Answer

Do you want white space or not any space over cropped area. Refer this. Since you have not pasted the original image, I am taking your attached image as input.
A=imread('24.jpg');
subplot(1,2,1)
imshow(A)
subplot(1,2,2)
[m,n]=size(A);
imshow(A(round(m/2)-100:round(m/2)+100,round(m/2)-100:round(m/2)+100))