Comments (7)
These modes aren't actually used by any image format (the rawmodes are, but not the modes). So a discussion about how they should behave is just about consistency with how the rest of Pillow behaves.
But speaking of the fact that they aren't used
- Support for creating images with these modes was added in #7010 in Pillow 9.5.0 in response to #6769 (comment).
- Support for access for these modes was added in #7303 in Pillow 10.1.0 to help #7209 and #7260
If your goal is to progressively ensure that all Pillow operations are supported for all modes, I don't think building out support for them in a test-driven development fashion is a worthwhile endeavour if there's no evidence that they would be used.
I'm more in favour of the idea from #2228 of just removing BGR;15, BGR;16 and BGR;24 as modes entirely.
from pillow.
I agree with removing them, but I think that will require a deprecation period. Slightly changing how they work doesn't require a deprecation period, so it could be done at the same time.
from pillow.
Also, the two converters changed in #7972 should be added as packers. There's not really any difference between a packer, an unpacker, and a converter, so they could all be grouped into one list.
from pillow.
I've created #7978 to deprecate them.
Slightly changing how they work doesn't require a deprecation period, so it could be done at the same time.
The modes are currently supported for image creation, converting to the mode, access, unpacking and putdata()
. There's no way to use the final image result for these modes except by getting the pixel values. So if you're using these modes, and then you find the scale of the pixel values returned is different, you have to rewrite your code.
Introducing a breaking change to a feature at the same time as deprecating it seems counterproductive.
Also, the two converters changed in #7972 should be added as packers. There's not really any difference between a packer, an unpacker, and a converter, so they could all be grouped into one list.
I don't see anything special about converting RGB to BGR;15 or BGR;16 that means we need packers for them specifically. If you want to restructure packers, unpackers and converters in general, then I suggest you start a new conversation about that.
from pillow.
How does packing work without a packer? There is currently a packer from BGR;15/16 to BGR;15/16, but there is not a packer from RGB to BGR;15/16. There already are unpackers from BGR;15/16 to RGB.
from pillow.
How does packing work without a packer?
You think that Pillow is currently packing without a packer, for some scenario? Could you provide an example of that scenario?
There is currently a packer from BGR;15/16 to BGR;15/16,
but there is not a packer from RGB to BGR;15/16.
...so? I don't see how that contradicts anything, or why there would have to be at the moment.
There already are unpackers from BGR;15/16 to RGB.
Yes.
I think you're drifting off-topic from BGR;* scaling, and this would be better asked in a new conversation.
from pillow.
Related Issues (20)
- Empty JPEG2000 image after upgrading from 10.2.0 to 10.3.0 HOT 5
- fontfamily (font1 (include some chars)+font2(include most chars)) cannot show some characters HOT 1
- Error: cannot import name '_imagingft' HOT 11
- JPEG image has wrong size HOT 2
- ImageSequence encounters an exception when JPEG pixels exceed 4096*4096 HOT 2
- `ImageMath.eval` deprecation warning running `selftest.py` HOT 1
- Memory leak when opening images HOT 3
- Add small number of carefully curated screenshots to handbook tutorial HOT 4
- KeyError: 'setting text direction, language or font features is not supported without libraqm' HOT 3
- Wrong JPEG library version: library is 90, caller expects 80 HOT 2
- Can't install Pillow on Ubuntu HOT 13
- Unable to open AVIF images HOT 1
- Channel data read incorrectly from uncompressed .dds HOT 6
- Unknown test comment HOT 6
- cannot identify image file (PNG file from scanner) HOT 20
- toqpixmap() doesn't work with PyQt5 HOT 6
- Grayscale PNG converted with standard tool to 8-bit grayscale TIFF won't load HOT 4
- GIFs saving with unexpected transparency (or perhaps undefined pixels?) HOT 6
- Image CMS modes HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pillow.