Skip to content

Commit a7f22bb

Browse files
committed
Update README
1 parent 9ee4a83 commit a7f22bb

1 file changed

Lines changed: 23 additions & 16 deletions

File tree

README.rst

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,8 @@ Imagecast
3838
About
3939
*****
4040

41-
Imagecast is like ImageMagick but for Pythonistas. Optionally provides its
42-
features via HTTP API.
43-
44-
Currently, this is based on Pillow_. However, it might be based on Wand_ in
45-
the future.
46-
47-
There might still be dragons.
48-
49-
.. _Pillow: https://pillow.readthedocs.io/
50-
.. _Wand: http://wand-py.org/
41+
Imagecast is like ImageMagick but for Pythonistas. It is based on Pillow_,
42+
and optionally provides its features via HTTP API.
5143

5244

5345
*******
@@ -73,7 +65,9 @@ Features
7365
- Cropping with negative right/bottom offsets
7466
- Resizing while keeping aspect ratio
7567
- Output format: Any image formats from Pillow or raw bytes
76-
- HTTP API
68+
- HTML DOM capturing using Playwright
69+
- HTTP API, effectively implementing an image
70+
acquisition and conversion service
7771

7872

7973
********
@@ -91,14 +85,19 @@ Synopsis
9185
# Colorspace reduction, cropping, resizing and format conversion
9286
imagecast --uri="$IMGURL" --grayscale --crop=40,50,-50,-40 --width=200 --save=test.png
9387

88+
# HTML DOM capturing
89+
imagecast --uri="$HTMLURL" --element="#logo"
9490

95-
Example::
91+
Examples::
9692

93+
# Image manipulation
9794
imagecast --uri="https://unsplash.com/photos/WvdKljW55rM/download?force=true" --monochrome=80 --crop=850,1925,-950,-900 --width=640 --display
9895

96+
# HTML DOM capturing
97+
imagecast --uri="https://www.iana.org/help/example-domains" --element="#logo"
9998

100-
HTML Capturing
101-
==============
99+
HTML DOM capturing
100+
==================
102101

103102
Imagecast can also capture screenshots of webpages, or elements thereof. It uses
104103
`Playwright`_ and `Firefox`_ to convert full pages or specific DOM elements
@@ -121,13 +120,20 @@ to express a DOM selector to apply::
121120
HTTP API
122121
========
123122

123+
``imagecast`` also provides its features using an HTTP API.
124+
124125
Start the Imagecast service as daemon::
125126

126127
imagecast service
127128

128-
Example::
129+
Examples::
130+
131+
# Image manipulation
132+
http "http://localhost:9999/?uri=https%3A%2F%2Funsplash.com%2Fphotos%2FWvdKljW55rM%2Fdownload%3Fforce%3Dtrue&monochrome=80&crop=850,1925,-950,-900&width=640"
133+
134+
# HTML DOM capturing
135+
http "http://localhost:9999/?uri=https://www.iana.org/help/example-domains&element=%23logo"
129136

130-
http "localhost:9999/?uri=https%3A%2F%2Funsplash.com%2Fphotos%2FWvdKljW55rM%2Fdownload%3Fforce%3Dtrue&monochrome=80&crop=850,1925,-950,-900&width=640"
131137

132138
.. note::
133139

@@ -153,4 +159,5 @@ Other projects
153159

154160

155161
.. _Firefox: https://www.mozilla.org/firefox/
162+
.. _Pillow: https://pillow.readthedocs.io/
156163
.. _Playwright: https://playwright.dev/

0 commit comments

Comments
 (0)