Errors with .emf and .tif pictures

조회 수: 1 (최근 30일)
André
André 2013년 11월 14일
function addfmpicture1_button_callback(hObject, eventdata, handles)
global dataStruct
[FileName,PathName] = uigetfile('*.emf'); % open the file
if FileName == 0
return;
end
fmpicture1_image = strcat(PathName,FileName); % generate the variable name of the file opened
fmpicture1_image = imread(fmpicture1_image); % load image
cla(handles.fmpicture1_axes);
image('Parent', handles.fmpicture1_axes, 'CData', flipdim(fmpicture1_image,1));
axis(handles.fmpicture1_axes,'tight');
dataStruct.fmpicture1_image = flipdim(get(findobj(handles.fmpicture1_axes,'type','image'),'CData'),1);
end
---
function addchippicture_button_callback(hObject, eventdata, handles) global dataStruct [FileName,PathName] = uigetfile('*.tif'); % open the file if FileName == 0 return; end chip_image = strcat(PathName,FileName); % generate the variable name of the file opened chip_image = imread(chip_image); % load image cla(handles.chip_axes); image('Parent', handles.chip_axes, 'CData', flipdim(chip_image,1)); axis(handles.chip_axes,'tight'); dataStruct.chip_image = flipdim(get(findobj(handles.chip_axes,'type','image'),'CData'),1);
end
--- // ---
We developed a code to storage some data. We got two errors when working with .emf and .tif files. In the first case, the picture doesn't appear. In the second case, the picture appears but becomes almost fully red. With others formats like .png or .jpeg it doesn't happen. I don't use any toolbox now.
Anyone knows why it happens and how should a fix it?
Thank you very much for any reply!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by