|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
<P> 读入一个图像文件后,进行了文件格式的判断,结果出错,请大家帮我看看问题出在哪,谢谢!<BR>具体代码和出错信息如下:<BR>[FileName,PathName]=uigetfile(...<BR>{'*.bmp;*.jpg;*.tif;*.png','IMAGE Files (*.bmp,*.jpg,*.tif,*.png)';<BR> '*.bmp','Bitmap (*.bmp)'; ...<BR> '*.jpg','Joint Photographic Experts Group (*.jpg)'; ...<BR> '*.tif','Tagged Image files (*.tif)'; ...<BR> '*.png','Portable Network Graphics (*.png)'; ...<BR> '*.*','All Files (*.*)'},...<BR> 'File Selector','')<BR>x1=imread(FileName);<BR>h_axes=axes('position',[0.04,0.35,0.45,0.40],'visible','on'); <BR>imshow(x1)<BR>info=imfinfo(FileName);<BR>if (info.ColorType=='truecolor'|info.ColorType=='indexed')<BR> h1 = uicontrol(gcf, ... <BR> 'style','pushbutton',...<BR> 'Callback','changeformat', ... <BR> 'Position',[0.45 0.12 0.16 0.06], ... <BR> 'String','格式转换', ... <BR> 'Tag','Pushchange');<BR>end<BR>出错信息:<BR>??? Error using ==> eq<BR>Array dimensions must match for binary array op.</P>
<P>Error in ==> open at 60<BR>if info.ColorType=='truecolor'</P>
<P>??? Error while evaluating uicontrol Callback.</P> |
|