xwdread.m

来自「有关matlab的电子书籍有一定的帮助希望有用」· M 代码 · 共 32 行

M
32
字号
function [M,CM] = xwdread(fname,flag)
%XWDREAD Read a XWD (X window dump) file from disk.
%   Note: XWDREAD has been grandfathered; use IMREAD instead.
%
%   [X,MAP] = XWDREAD('filename') reads the file 'filename' and
%   returns the indexed image X and colormap MAP. 
%
%   XWDREAD will read XWDs in the following formats:
%           Zpixmaps with depth of 1 or 8 bits
%           XYbitmaps
%           XYpixmaps with depth of 1
%
%   See also IMFINFO, IMREAD, IMWRITE.

%   Drea Thomas, 7-20-93.
%   updated to call IMREAD, Chris Griffin, 8-19-96
%   Copyright 1993-1998 The MathWorks, Inc.  All Rights Reserved.
%   $Revision: 5.6 $  $Date: 1997/11/24 15:36:45 $


[info,msg] = imfinfo(fname,'xwd');
if ~isempty(msg), 
    error(msg);
end

[M,CM] = imread(fname, 'xwd');

M = double(M)+1;



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?