Errors with .emf and .tif pictures
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!