File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,12 @@ Saving I mode images as PNG
200200
201201In order to fit the 32 bits of I mode images into PNG, when PNG images can only contain
202202at most 16 bits for a channel, Pillow has been clipping the values. Rather than quietly
203- changing the data, this is now deprecated.
203+ changing the data, this is now deprecated. Instead, the image can be converted to
204+ another mode before saving::
205+
206+ from PIL import Image
207+ im = Image.new("I", (1, 1))
208+ im.convert("I;16").save("out.png")
204209
205210Removed features
206211----------------
Original file line number Diff line number Diff line change @@ -28,7 +28,12 @@ Saving I mode images as PNG
2828
2929In order to fit the 32 bits of I mode images into PNG, when PNG images can only contain
3030at most 16 bits for a channel, Pillow has been clipping the values. Rather than quietly
31- changing the data, this is now deprecated.
31+ changing the data, this is now deprecated. Instead, the image can be converted to
32+ another mode before saving::
33+
34+ from PIL import Image
35+ im = Image.new("I", (1, 1))
36+ im.convert("I;16").save("out.png")
3237
3338API changes
3439===========
You can’t perform that action at this time.
0 commit comments