xwdwrite.m

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

M
27
字号
function xwdwrite(M,CM,fname)
%XWDWRITE  Write a XWD (X window dump) file to disk.
%   Note: XWDWRITE has been grandfathered; use IMWRITE instead.
%
%   XWDWRITE(X,MAP,'filename') writes an XWD file containing the
%   indexed image X and colormap MAP to a disk file called 'filename'.
%   Valid range for elements of X is from 1 to the number of entries
%   in the colormap.
%
%   The extension '.xwd' will be added to 'filename' if it doesn't
%   already have an extension.
%
%   See also IMFINFO, IMREAD, IMWRITE.

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

if ~any(fname==46), fname = [fname,'.xwd']; end

if isa(M,'uint8')
    error('UINT8 inputs not supported for xwdwrite, use IMWRITE instead.');
end

imwrite(M,CM,fname,'xwd');

⌨️ 快捷键说明

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