/usr/share/octave/site/m/octave-epstk/ergbsplitt.m is in octave-epstk 2.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | %%NAME
%% ergbsplitt - splitt RGB-matrix to red, green and blue matrix
%%
%%SYNOPSIS
%% [red,green,blue]=ergbsplitt(matrix)
%%
%%PARAMETER(S)
%% matrix RBG-matrix
%% red red color part of matrix,min. value=0,max value=1
%% green green color part of matrix,min. value=0,max value=1
%% blue blue color part of matrix,min. value=0,max value=1
%%
% written by stefan.mueller@fhr.fraunhofer.de (C) 2010
function [red,green,blue]= ergbsplitt (matrix)
if (nargin ~= 1) || (nargout ~= 3)
eusage('[red,green,blue] = ergbsplitt(matrix)');
end
red=bitshift(matrix,-16);
matrix=matrix-bitshift(red,16);
green=bitshift(matrix,-8);
blue=matrix-bitshift(green,8);
green=green/255;
red=red/255;
blue=blue/255;
|