www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@SystemColors/convertToIRGB.m

    function val = convertToIRGB(obj,val)
%CONVERTTOIRGB Converts from RGB triplet to IRGB integer
%
%  CONVERTTOIRGB(OBJ, RGB) converts a uint8 (m-by-n-by-3) array of RGB
%  triplets into an int32 (m-by-n) array of IRGB data.
%
%  An RGB triplet is three uint8 elements, e.g. [0 255 0] for green. The
%  IRGB form is used in Java.  The highest order byte is intensity,
%  followed by bytes for red, green, blue. The return value from this
%  function will always have I=255.

%  Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc.


% This function has been implemented in a mex file