Psychedelic PAM P7 4 byte/Pixel GRAYSCALE_ALPHA rendering

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
brianp
Posts: 4
Joined: Sun Oct 06, 2019 3:21 pm

Psychedelic PAM P7 4 byte/Pixel GRAYSCALE_ALPHA rendering

Post by brianp »

I am looking at 4 byte/pixel, grayscale-alpha .PAM P7 files in XnView MP on Linux, latest.
The images seem to be interpreting the gray-opacity data as RGB(A?).
ImageMagick converts it correctly to PNG so the format seems to be correct.
pf-269361_9.red.sp0.5.m1.16.a.xnview.psycho.2k.jpg
The Sendspace links point to the RGB rendering of the PAM P7 GRAYSCALE_ALPHA by XnView
The XV PGM flattening against a White background
Histogram of the Grayscale and the Opacity channels
The original PAM, P7 image

pf-269361_9.red.sp0.5.m1.16.a.xnview.psycho.jpg -- https://www.sendspace.com/file/1ten20 [1]
pf-269361_9.red.sp0.5.m1.16.a.xv.normal.white.jpg -- https://www.sendspace.com/file/c5ecya [1]
pf-269361_9.red.sp0.5.m1.16.a.pam.hist.png -- https://www.sendspace.com/file/qjropc [1]
pf-269361_9.red.sp0.5.m1.16.a.pam -- https://www.sendspace.com/file/muidyx [1] 145 MBytes

Here is the header:

Code: Select all

head -n7  pf-269361_9.red.sp0.5.m1.16.a.pam
P7
WIDTH 7360
HEIGHT 4912
DEPTH 2
MAXVAL 65535
TUPLTYPE GRAYSCALE_ALPHA
ENDHDR
Here is the sdev info for the PAM P7

Code: Select all

Read_PAM:  xr=7360, yr=4912, qb=2, ptype=7, nchan=2, hdrlen=79 + bmaplen=144609280 -> fsize=144609359
Gray:   SDev=11687.4, ave=21279.7, count=36152320, range [760 .. 62292],   Skew=0.681915, Kurt=-0.135353
Alpha: SDev=15125.7, ave=25888.1, count=36152320, range [242 .. 60883],  Skew=0.318397, Kurt=-1.017546
The 5 detail images on the histogram:
  • Grayscale
    Alpha
    Grayscale and Alpha flattened against a White background
    Grayscale and Alpha flattened against a Black background
    Grayscale and Alpha flattened against a Checkerboard background
pf-269361_9.red.sp0.5.m1.16.a.pam.hist.2k.png

NOTE: [1]: I can't inline or attach even tiny camera pictures. They all get a 'file too large' error.
XnView MP Linux Version 0.95 64bits (Jan 26 2020) Libformat version 7.36
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Psychedelic PAM P7 4 byte/Pixel GRAYSCALE_ALPHA rendering

Post by xnview »

could you send me the greyscale exported version?
Pierre.
brianp
Posts: 4
Joined: Sun Oct 06, 2019 3:21 pm

Re: Psychedelic PAM P7 4 byte/Pixel GRAYSCALE_ALPHA rendering

Post by brianp »

Code: Select all

pam2pgm   pf-269361_9.red.sp0.5.m1.16.a.pam -a -n -d    
PAM->PGM against ALPHA (A=0) bkg w/ 8 threads in 0.0123 sec
WBHB: Wrote 72.304659MB (19 + 72304640) in 23.537ms, 3071.909 MB/s
     pf-269361_9.red.sp0.5.m1.16.a.pam.a.pgm

PAM->PGM against NULL (N=1) bkg w/ 8 threads in 0.0146 sec
WBHB: Wrote 72.304659MB (19 + 72304640) in 23.689ms, 3052.264 MB/s
    pf-269361_9.red.sp0.5.m1.16.a.pam.n.pgm

TE: Report: Accum time for 8 events=132.93 ms  Run 2020-02-09 09:50:45
  Time=  0.047 sec = 35.565%, WRITE_BINARY_FILE    , hits=2, 0.024 sec each
  Time=  0.044 sec = 32.944%, READ_PAM_BMAP_UINT32 , hits=1
  Time=  0.015 sec = 11.024%, FLATTEN_PAM_ON_BKG_MT, hits=1
  Time=  0.012 sec =  9.295%, FLATTEN_PAM_ON_ALP_MT, hits=1
  Time=  0.010 sec =  7.598%, BITCH_SWAP_UINT16_BUF, hits=2, 5.050 ms  each
Grayscale pf-269361_9.red.sp0.5.m1.16.a.pam.n.pgm
https://www.sendspace.com/file/111wto

Code: Select all

sdev_pgm   pf-269361_9.red.sp0.5.m1.16.a.pam.n.pgm 
Read_PGM: xr=7360, yr=4912, qb=2, ptype=5, nchan=1, hdrlen=19 + bmaplen=72304640 -> fsize=72304659
Gray:  std_dev_uint16_d(): SDev=11687.4, ave=21279.7, sum=769313881008, count=36152320, range [760 .. 62292], 36.382ms
----

Alpha pf-269361_9.red.sp0.5.m1.16.a.pam.a.pgm
https://www.sendspace.com/file/tovdzm

Code: Select all

sdev_pgm  pf-269361_9.red.sp0.5.m1.16.a.pam.a.pgm 
Read_PGM: xr=7360, yr=4912, qb=2, ptype=5, nchan=1, hdrlen=19 + bmaplen=72304640 -> fsize=72304659
Alpha:  std_dev_uint16_d(): SDev=15125.7, ave=25888.1, sum=935914878888, count=36152320, range [242 .. 60883], 35.784ms
----

This is part of an HDR experiment so the PNG file is largely transparent.
PNG pf-269361_9.red.sp0.5.m1.16.a.png
https://www.sendspace.com/file/jg2zzm

Code: Select all

pam2png  pf-269361_9.red.sp0.5.m1.16.a.pam
Wrote 144.625290 MB / 45.333 ms -> 3190.319 MB/s  > pf-269361_9.red.sp0.5.m1.16.a.png 
TE: Report: Accum time for 8 events=218.21 ms  Run 2020-02-09 10:53:41
  Time=  0.069 sec = 31.548%, READ_PAM_BMAP_UINT32 , hits=1
  Time=  0.060 sec = 27.401%, ZLIB_DEFLATE_BITMAP  , hits=2, 0.030 sec each
  Time=  0.045 sec = 20.799%, SYS_WRITE_TO_DISK    , hits=1
  Time=  0.030 sec = 13.966%, CRC32_16B_PREFETCH   , hits=1
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Psychedelic PAM P7 4 byte/Pixel GRAYSCALE_ALPHA rendering

Post by xnview »

thanks will be fixed
Pierre.
Post Reply