How to save png images into one tiff file format with export_fig?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear all,
I have images in png format and I would like to save these images into one tiff. I found function export_fig at this link: http://www.mathworks.com/matlabcentral/fileexchange/23629-export-fig But I don´t know, where I can put images for transfer to tiff. I try this in export_fig.m:
fig = get(0, 'Binarizace_okoli_ 1.png');
[fig, options] = parse_args(nargout, fig, varargin{:});
but this is only one (first) image of my images.
Even so this error appears:
Error using get
There is no Binarizace_okoli_ 1.png property on the Root class.
Error in export_fig (line 265)
fig = get(0, 'Binarizace_okoli_ 1.png');
Can you advice me, where I put or load my images to transfer into tiff?
Thank you for your answers.
0 Kommentare
Antworten (1)
Walter Roberson
am 22 Apr. 2017
projectdir = '.'; %name of folder where images are
output_tiff = 'MyMultipage.tif';
dinfo = dir( fullfile(projectdir, '*.png') );
filenames = fullfile(projectdir, {dinfo.name} );
for K = 1 : length(filenames)
this_data = imread(filenames{K});
if K == 1
imwrite(this_data, output_tiff);
else
imwrite(this_data, output_tiff, 'WriteMode', 'append');
end
end
This has nothing to do with export_fig()
0 Kommentare
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!