Why the image size changes after saving it to hard drive?
Show older comments
During program run my image size was 256*64*3, but when i store it in my D:/ and retrieve it back from there, the size is not same as the one I have saved? Y it is so? Where am I making error? Please help.
Fs=16000;
samples = [1+opening,count*Fs*1.05];
audio=audioread('D:\Fazeel_Data\16KAll\TestNoisy.wav',samples);
%Destination folder for storing images
Dest = 'D:\Fazeel_Data\TestNoisyPics\';
[Q,F,T] = spectrogram(audio,hann(512),256,512,Fs,'yaxis');
% Taking the log of Z-Axis (Brightness)
Q=Q(1:256,:);
F=F(1:256);
figure(2)
D=surf(T,F,log(abs(Q).^2));
colormap parula
shading interp
view([0 90])
axis tight
set(gca,'xtick',[])
set(gca,'ytick',[])
% [a b c]=size(I)
export_fig AA.jpg -native -c[31 52 46 72]% https://www.mathworks.com/matlabcentral/fileexchange/23629-export_fig
% resizing the image
I=imread('AA.jpg');
outputImage = imresize(I, [256,64]);
export_fig AA.jpg -native -c[31 86 58 85]% clipping top right bottom left
[o p q]=size(outputImage)
************************************
The values of parameters shown in workspace are
o =256, p=64, q=3
but when I use the command [o p q]=size("AA.jpg), the values are
o=1, p=6, q=1, why it is so?????????
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!