Skip to content

Commit

Permalink
iss #7 xp_plotimage.m now can handle missing files without crashing.
Browse files Browse the repository at this point in the history
  • Loading branch information
davestanley committed Apr 11, 2017
1 parent d215a68 commit fb33611
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions library_plots/xp_plotimage.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@

if ~isempty(xp.data{1})
if iscellstr(xp.data{1})
rgb = imread(xp.data{1}{op.saved_fignum});
currfile = xp.data{1}{op.saved_fignum};
elseif ischar(xp.data{1})
rgb = imread(xp.data{1});
currfile = xp.data{1};
end

if exist(currfile,'file')
rgb = imread(currfile);

if ~isempty(op.scale)
rgb = imresize(rgb,op.scale);
end

if ~isempty(op.scale)
rgb = imresize(rgb,op.scale);
hxp.hcurr = imshow(rgb);
end

hxp.hcurr = imshow(rgb);

end

end
Expand Down

0 comments on commit fb33611

Please sign in to comment.