Add support for reading and writing grayscale PFM images#7696
Add support for reading and writing grayscale PFM images#7696hugovk merged 4 commits intopython-pillow:mainfrom
Conversation
|
Interestingly, there is disagreement in the documentation about row order - one says top to bottom, the other says bottom to top. https://linux.die.net/man/5/pfm
https://www.pauldebevec.com/Research/HDR/PFM/
Could you explain why you went with the https://www.pauldebevec.com/Research/HDR/PFM/ version? |
|
Huh, I thought https://linux.die.net/man/5/pfm was identical to https://netpbm.sourceforge.net/doc/pfm.html, which says
From https://sourceforge.net/p/netpbm/code/1682/tree//userguide/pfm.html?diff=51243f8e2718460a4a53b63a:1681, it looks like this was changed in 2012, with "bottom to top" being the newer version. I suspect the doc file was wrong until then, since looking at the 10.22 release of netpbm from 2004, the HISTORY file shows that this is the version that added PFM support and the source code for the PFM utilities shows bottom to top order being used. Similarly, Wikipedia says:
I've also tested Gimp, ImageMagick's |
hugovk
left a comment
There was a problem hiding this comment.
Please could you also add this to the release notes?
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Done |
|
Thanks! |
Based on documentation:
hopper.pfmcreated by convertinghopper("F").save("im.tiff")using https://convertio.co/tiff-pfm/.hopper_be.pfmcreated usingstruct.pack.Color PFM images are not supported due to #1888.