ImageMagick Preprocessor
This tool provides additional processing of images that referred in Markdown source, with ImageMagick.
Installation
$ pip install foliantcontrib.imagemagick
Config
To enable the preprocessor, add imagemagick to preprocessors section in the project config:
preprocessors:
- imagemagick
The preprocessor has a number of options with the following default values:
preprocessors:
- imagemagick:
convert_path: convert
cache_dir: .imagemagickcache
convert_path
: Path to convert binary, a part of ImageMagick.
cache_dir
: Directory to store processed images. These files can be reused later.
Usage
Suppose you want to apply the following command to your picture image.eps:
$ convert image.eps -resize 600 -background Orange label:'Picture' +swap -gravity Center -append image.jpg
This command takes the source EPS image image.eps, resizes it, puts a text label over the picture, and writes the result into new file image.jpg. The suffix of output file name specifies that the image must be converted into JPEG format.
To use the ImageMagick preprocessor to do the same, enclose one or more image references in your Markdown source between <<magick> and </magick> tags.
<<magick command_params="-resize 600 -background Orange label:'Picture' +swap -gravity Center -append" output_format="jpg">
(leading exclamation mark here)[Optional Caption](image.eps)
</magick>
Use output_format attribute to specify the suffix of output file name. The whole output file name will be generated automatically.
Use command_params attribute to specify the string of parameters that should be passed to ImageMagick convert binary.
Instead of using command_params attribute, you may specify each parameter as its own attribute with the same name:
<<magick resize="600" background="Orange label:'Picture' +swap" gravity="Center" append="true" output_format="jpg">
(leading exclamation mark here)[Optional Caption](image.eps)
</magick>
Metadata
Release files for foliantcontrib.imagemagick 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| foliantcontrib.imagemagick-1.0.2.tar.gz | 3.7 kB | Without provenance | Details for foliantcontrib.imagemagick-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| foliantcontrib.imagemagick-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for foliantcontrib.imagemagick-1.0.2-py3-none-any.whl |
Total release size: 8.6 kB
Release files / foliantcontrib.imagemagick-1.0.2.tar.gz
| Download URL | foliantcontrib.imagemagick-1.0.2.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af558605eb6da8d0a384fe69dc637100de3bbbb8a55a309b4f5d89f545227f15
|
|
BLAKE2b-256 checksum How to use checksums |
e58d9c6b40de4b05e3b12231d3bb98225238e157cf6e9db375cf5b146fafa8ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Release files / foliantcontrib.imagemagick-1.0.2-py3-none-any.whl
| Download URL | foliantcontrib.imagemagick-1.0.2-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6e03df48d26a5b71a0fc364a21e3ed245d7d8de2f0fa74ea3fbf2e0eb750fc1
|
|
BLAKE2b-256 checksum How to use checksums |
4db007003bc87736282ada3f29742ba02bc5e9ac19a394cf75fbae284886bb5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
|
Security for foliantcontrib.imagemagick 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.