MATLAB Answers

How to use imwrite command for manually save image?

14 views (last 30 days)
msahar
msahar on 15 Feb 2014
Commented: Elangovan K on 24 Jan 2018
I want to make a simple program that ask image file from user, resize it and then it ask from user where to save it. Everything went right except this imwrite command. i dont know to use it properly . below is the code.
clc;
clear all;
close all;
getimage=imgetfile();
x=imread(getimage);
figure(1); imshow(x); title('1024*1024 Image')
y=imresize(x,[512 512]);
figure(2); imshow(y); title('512*512 Resized Image');
[filename, pathname] = uiputfile('*.jpg', 'Save Picture as');
imwrite([y, filename, pathname]);

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.