New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Note that only the RAWBITS variants of PPM files are supported #7297
Comments
When you say that only P4, P5 and P6 are supported, are you saying that you can't open images with that format, or you can't save images with that format? Because I think you should be able to open images with that format, thanks to #5242 in Pillow 9.2.0. Are you using an earlier version of Pillow? If you're talking about saving, we can add a note to the documentation if you like. Also, where does the term "RAWBITS" come from? I can't see it in https://netpbm.sourceforge.net/doc/ppm.html. |
I guess I mean that I can’t save in the ASCII format. I hadn’t actually tried to read a file in that format.
I am surprised that RAWBITS does not appear in the documentation you cited. It’s a phrase that has been in use, to the best of my knowledge, since the format was first introduced. Searching for the phrase [portable pixmap "rawbits"] on DuckDuckGo turns up several hits. For example, https://platformx.sourceforge.net/Documents/Enhancements/PoskanzerPPM.html
*RAWBITS Variant*
*There is also a variant on the format, available by setting the RAWBITS option at compile time. *
|
I notice now that https://netpbm.sourceforge.net/doc/ppm.html does refer to "plain" and "raw" formats
I've created PR #7298. See what you think. |
The change looks good. If I may digress, I can remember when the raw format was added to the specification. One advantage of the plain format is that, like an XBM image, you can embed simple images (icons, convolution filters,
etc.) in your source code without needing to translate them to and from a binary representation. I imagine the RAWBITS terminology was dropped when the raw format ceased to be optional and the compile time option of the same name was removed.
|
Having this documented would have saved me a couple of hours of web searches.
See https://github.com/samwyse/Pillow/tree/samwyse-patch-1
The text was updated successfully, but these errors were encountered: