How to use imwrite command for manually save image?

4 vues (au cours des 30 derniers jours)
msahar
msahar le 15 Fév 2014
Commenté : Elangovan K le 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]);

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 15 Fév 2014
file=fullfile(pathname,filename)
imwrite(y,file);
  2 commentaires
msahar
msahar le 15 Fév 2014
thankyou
Elangovan K
Elangovan K le 24 Jan 2018
Thank You

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by