Skip to content

Commit 5a8b8b9

Browse files
committed
Use literal code blocks
1 parent 9830abd commit 5a8b8b9

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

CHANGES.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5057,7 +5057,7 @@ http://svn.effbot.org/public/pil/
50575057
and the documentation; this is a bug, and will most likely be fixed
50585058
in a future version. In this release, PIL prints a warning message
50595059
instead. To silence the warning, change any calls of the form
5060-
"frombuffer(mode, size, data)" to
5060+
"frombuffer(mode, size, data)" to::
50615061

50625062
frombuffer(mode, size, data, "raw", mode, 0, 1)
50635063

@@ -5069,14 +5069,11 @@ http://svn.effbot.org/public/pil/
50695069
Image class (based on code by Travis Oliphant).
50705070

50715071
This allows you to easily convert between PIL image memories and
5072-
NumPy arrays:
5072+
NumPy arrays::
50735073

50745074
import numpy, Image
5075-
50765075
im = Image.open('hopper.jpg')
5077-
50785076
a = numpy.asarray(im) # a is readonly
5079-
50805077
im = Image.fromarray(a)
50815078

50825079
- Fixed CMYK polarity for JPEG images, by treating all images as
@@ -5128,7 +5125,7 @@ http://svn.effbot.org/public/pil/
51285125

51295126
- Added pixel access object. The "load" method now returns a
51305127
access object that can be used to directly get and set pixel
5131-
values, using ordinary [x, y] notation:
5128+
values, using ordinary [x, y] notation::
51325129

51335130
pixel = im.load()
51345131
v = pixel[x, y]
@@ -5363,7 +5360,7 @@ http://svn.effbot.org/public/pil/
53635360
- Added optional "encoding" argument to the ImageFont.truetype
53645361
factory. This argument can be used to specify non-Unicode character
53655362
maps for fonts that support that. For example, to draw text using
5366-
the Microsoft Symbol font, use:
5363+
the Microsoft Symbol font, use::
53675364

53685365
font = ImageFont.truetype("symbol.ttf", 16, encoding="symb")
53695366
draw.text((0, 0), unichr(0xF000 + 0xAA))
@@ -5661,7 +5658,7 @@ http://svn.effbot.org/public/pil/
56615658

56625659
- Added DPI read/write support to the JPEG codec. The decoder
56635660
sets the info["dpi"] attribute for JPEG files with JFIF dpi
5664-
settings. The encoder uses the "dpi" option:
5661+
settings. The encoder uses the "dpi" option::
56655662

56665663
im = Image.open("file.jpg")
56675664
dpi = im.info["dpi"] # raises KeyError if DPI not known
@@ -5858,7 +5855,7 @@ http://svn.effbot.org/public/pil/
58585855
-----
58595856

58605857
- Added Toby J. Sargeant's quantization package. To enable
5861-
quantization, use the "palette" option to "convert":
5858+
quantization, use the "palette" option to "convert"::
58625859

58635860
imOut = im.convert("P", palette=Image.ADAPTIVE)
58645861

@@ -5952,7 +5949,7 @@ The test suite includes 825 individual tests.
59525949
- The Image "histogram" method now works for "I" and "F" images.
59535950
For these modes, PIL divides the range between the min and
59545951
max values used in the image into 256 bins. You can also
5955-
pass in your own min and max values via the "extrema" option:
5952+
pass in your own min and max values via the "extrema" option::
59565953

59575954
h = im.histogram(extrema=(0, 255))
59585955

@@ -5969,7 +5966,7 @@ The test suite includes 825 individual tests.
59695966
- Added JPEG "save" and "draft" support for mode "YCbCr" images.
59705967
Note that if you save an "YCbCr" image as a JPEG file and read
59715968
it back, it is read as an RGB file. To get around this, you
5972-
can use the "draft" method:
5969+
can use the "draft" method::
59735970

59745971
im = Image.open("color.jpg")
59755972
im.draft("YCbCr", im.size)
@@ -6006,7 +6003,7 @@ The test suite includes 750 individual tests.
60066003
to make the methods compatible with the "fromstring"
60076004
factory function.
60086005

6009-
To get the old behaviour, use the following syntax:
6006+
To get the old behaviour, use the following syntax::
60106007

60116008
data = im.tostring("raw", "RGBX", 0, -1)
60126009
im.fromstring(data, "raw", "RGBX", 0, -1)
@@ -6026,6 +6023,7 @@ The test suite includes 750 individual tests.
60266023
uses floyd-steinberg error diffusion for "P" and "1" targets,
60276024
so this option is only used to *disable* dithering. Allowed
60286025
values are NONE (no dithering) or FLOYDSTEINBERG (default).
6026+
::
60296027

60306028
imOut = im.convert("P", dither=Image.NONE)
60316029

0 commit comments

Comments
 (0)