/usr/share/octave/site/m/pfstools/pfs_read_luminance.m is in octave-pfstools 1.8.5-2+b1.
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 | function Y = pfs_read_luminance( fileName )
## Read hdr image file (formats accepted by pfsin) and return
## luminance channel Y.
##
## Y = hdr_read_luminance( fileName )
## Check if file exists
fid = fopen( fileName, "rb" );
if( fid == -1 )
error( sprintf( "pfs_read_luminance: File '%s' does not exist", fileName ) );
endif
fclose( fid );
unwind_protect
fid = popen( sprintf( "pfsin %s", fileName ), "r" );
pin = pfsopen( fid );
pin = pfsget( pin );
Y = pin.channels.Y;
unwind_protect_cleanup
pfsclose( pin );
fclose( fid );
end_unwind_protect
endfunction
|