/usr/share/octave/site/m/octave-epstk/eidx2rgb.m is in octave-epstk 2.4-3.
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
%% eidx2rgb - converts index-matrix to RGB-matrix
%%
%%SYNOPSIS
%% matrix=eidx2rgb(image,colormap)
%%
%%PARAMETER(S)
%% image index-matrix
%% colormap color table
%% matrix RBG-matrix
%%
% written by stefan.mueller@fhr.fraunhofer.de (C) 2010
function matrix= eidx2rgb (image,colormap)
if (nargin ~= 2)
eusage('matrix = eidx2rgb(image,colormap)');
end
[rows cols]= size(image);
colormap=fix(colormap*255);
colormap=bitshift(colormap(:,1),16)+...
bitshift(colormap(:,2),8)+...
colormap(:,3);
image=reshape(image,rows*cols,1);
image=colormap(image);
matrix=reshape(image,rows,cols);
|