diff --git a/README.md b/README.md index 460fce6..ddb7db0 100644 --- a/README.md +++ b/README.md @@ -2777,7 +2777,7 @@ from PIL import Image = Image.open() # Identifies format based on file's contents. = .convert('') # Converts image to the new mode (see Modes). .save() # Selects format based on extension (PNG/JPG…). -.show() # Opens image in the default preview app. +.show() # Displays image in default preview app. ``` ```python @@ -2795,7 +2795,7 @@ from PIL import Image ```python = np.array() # Creates a 2d/3d NumPy array from the image. - = Image.fromarray(np.uint8()) # Use `.clip(0, 255)` to clip values. + = Image.fromarray(np.uint8()) # Use .clip(0, 255) to clip the values. ``` ### Modes @@ -3422,7 +3422,7 @@ import plotly.express as px, pandas as pd ```python = px.line(, x=col_key, y=col_key) # Or: px.line(x=, y=) .update_layout(margin=dict(t=0, r=0, b=0, l=0)) # Also `paper_bgcolor='rgb(0, 0, 0)'`. -.write_html/json/image('') # Also .show(). +.write_html/json/image('') # .show() displays the plot. ``` ```python diff --git a/index.html b/index.html index 47e63ce..40a9906 100644 --- a/index.html +++ b/index.html @@ -2263,7 +2263,7 @@ right = [[0.1, 0.1# Identifies format based on file's contents. <Image> = <Image>.convert('<mode>') # Converts image to the new mode (see Modes). <Image>.save(<path>) # Selects format based on extension (PNG/JPG…). -<Image>.show() # Opens image in the default preview app. +<Image>.show() # Displays image in default preview app.
<int/tup> = <Image>.getpixel((x, y))            # Returns pixel's value (its color).
 <ImgCore> = <Image>.getdata()                   # Returns a flattened view of pixel values.
@@ -2275,7 +2275,7 @@ right = [[0.1,  0.1# Use ImageEnhance.<name>(<Image>) for Enhance.
 
<array> = np.array(<Image>)                     # Creates a 2d/3d NumPy array from the image.
-<Image> = Image.fromarray(np.uint8(<array>))    # Use `<array>.clip(0, 255)` to clip values.
+<Image> = Image.fromarray(np.uint8(<array>))    # Use <array>.clip(0, 255) to clip the values.
 

Modes

  • 'L' - Lightness (greyscale image). Each pixel is an int between 0 and 255.
  • @@ -2782,7 +2782,7 @@ z
    <Fig> = px.line(<DF>, x=col_key, y=col_key)            # Or: px.line(x=<list>, y=<list>)
     <Fig>.update_layout(margin=dict(t=0, r=0, b=0, l=0))   # Also `paper_bgcolor='rgb(0, 0, 0)'`.
    -<Fig>.write_html/json/image('<path>')                  # Also <Fig>.show().
    +<Fig>.write_html/json/image('<path>')                  # <Fig>.show() displays the plot.
     
    <Fig> = px.area/bar/box(<DF>, x=col_key, y=col_key)    # Also `color=col_key`.
     <Fig> = px.scatter(<DF>, x=col_key, y=col_key)         # Also `color/size/symbol=col_key`.