Skip to content

Commit cc9e796

Browse files
committed
Update README
1 parent 9ee4a83 commit cc9e796

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

README.rst

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,19 @@ 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
*******
5446
Install
5547
*******
5648

57-
Prerequisites
58-
=============
59-
::
49+
CLI interface::
6050

6151
pip install imagecast
6252

63-
With service API::
53+
With HTTP API service::
6454

6555
pip install imagecast[service]
6656

@@ -73,7 +63,9 @@ Features
7363
- Cropping with negative right/bottom offsets
7464
- Resizing while keeping aspect ratio
7565
- Output format: Any image formats from Pillow or raw bytes
76-
- HTTP API
66+
- HTML DOM capturing using Playwright
67+
- HTTP API, effectively implementing an image
68+
acquisition and conversion service
7769

7870

7971
********
@@ -91,14 +83,19 @@ Synopsis
9183
# Colorspace reduction, cropping, resizing and format conversion
9284
imagecast --uri="$IMGURL" --grayscale --crop=40,50,-50,-40 --width=200 --save=test.png
9385

86+
# HTML DOM capturing
87+
imagecast --uri="$HTMLURL" --element="#logo"
9488

95-
Example::
89+
Examples::
9690

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

94+
# HTML DOM capturing
95+
imagecast --uri="https://www.iana.org/help/example-domains" --element="#logo"
9996

100-
HTML Capturing
101-
==============
97+
HTML DOM capturing
98+
==================
10299

103100
Imagecast can also capture screenshots of webpages, or elements thereof. It uses
104101
`Playwright`_ and `Firefox`_ to convert full pages or specific DOM elements
@@ -121,13 +118,20 @@ to express a DOM selector to apply::
121118
HTTP API
122119
========
123120

121+
``imagecast`` also provides its features using an HTTP API.
122+
124123
Start the Imagecast service as daemon::
125124

126125
imagecast service
127126

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

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

132136
.. note::
133137

@@ -143,14 +147,15 @@ Example::
143147
listed explicitly, wildcard notations like ``*.iana.org`` are not permitted.
144148

145149

146-
**************
147-
Other projects
148-
**************
150+
*********
151+
Prior Art
152+
*********
149153

150154
- https://github.com/DictGet/ecce-homo
151155
- https://github.com/agschwender/pilbox
152156
- https://github.com/francescortiz/image
153157

154158

155159
.. _Firefox: https://www.mozilla.org/firefox/
160+
.. _Pillow: https://pillow.readthedocs.io/
156161
.. _Playwright: https://playwright.dev/

0 commit comments

Comments
 (0)