How to use imwrite command for manually save image?

1 回表示 (過去 30 日間)
msahar
msahar 2014 年 2 月 15 日
コメント済み: Elangovan K 2018 年 1 月 24 日
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]);

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 2 月 15 日
file=fullfile(pathname,filename)
imwrite(y,file);
  2 件のコメント
msahar
msahar 2014 年 2 月 15 日
thankyou
Elangovan K
Elangovan K 2018 年 1 月 24 日
Thank You

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by