Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed May 2, 2024
1 parent 6fdfec8 commit 7887c1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmdapp/vtracer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ vtracer.convert_image_to_svg_py(inp, out, colormode='binary')

# Convert from raw image bytes
input_img_bytes: bytes = get_bytes() # e.g. reading bytes from a file or a HTTP request body
svg_str: str = vtracer.convert_raw_image_to_svg(input_img_bytes, img_format = 'jpg')
svg_str: str = vtracer.convert_raw_image_to_svg(input_img_bytes, img_format='jpg')

# Convert from RGBA image pixels
from PIL import Image
img = Image.open(input_path).convert('RGBA')
pixels: list[tuple[int, int, int, int]] = list(img.getdata())
svg_str: str = vtracer.convert_pixels_to_svg(pixels)
svg_str: str = vtracer.convert_pixels_to_svg(pixels, img.size)

# All the bells & whistles, also applicable to convert_raw_image_to_svg and convert_pixels_to_svg.
vtracer.convert_image_to_svg_py(inp,
Expand Down

0 comments on commit 7887c1e

Please sign in to comment.