필터 지우기
필터 지우기

How to use imwrite command for manually save image?

조회 수: 3 (최근 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);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by