How can I change imge dimensions?
Show older comments
Hi, everyone!
I have a database of images (the number of images may vary) with different dimensions, need to change thier width/high (resize whole image but not crop it) to same one, then save the new images in a separate folder.
I have tried the im.resize function, but the image is cropped and information lost. It is necessary that the integrity of the image does not change, but only its parameters.
Thanks
6 Comments
Walter Roberson
on 19 Jul 2018
?? imresize never crops.
imresize can give you a result that looks distorted, if you do not preserve the aspect ratio, but it will not crop.
victor
on 19 Jul 2018
Walter Roberson
on 19 Jul 2018
outfilename = strcat('resize_', jpgFileName);
imrewrite(resize, outfilename);
victor
on 20 Jul 2018
Answers (0)
Categories
Find more on Images 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!