-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into keep-icc-master
- Loading branch information
Showing
39 changed files
with
840 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Publish easy-thumbnails | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
publish: | ||
name: "Publish release" | ||
runs-on: "ubuntu-latest" | ||
|
||
environment: | ||
name: deploy | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install build --user | ||
- name: Build 🐍 Python 📦 Package | ||
run: python -m build --sdist --wheel --outdir dist/ | ||
- name: Publish 🐍 Python 📦 Package to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN_EASY_THUMBNAILS }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Python CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox tox-gh-actions | ||
- name: Run tests | ||
run: tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ docs/_build | |
*.egg | ||
*.pyc | ||
reports/* | ||
.python-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: 2 | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
=============================== | ||
Scalable Vector Graphic Support | ||
=============================== | ||
|
||
Scalable Vector Graphics (SVG) is an XML-based vector image format for two-dimensional graphics with support for | ||
interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C). | ||
|
||
Thumbnailing vector graphic images doesn't really make sense, because being in vector format they can scale to any size | ||
without any quality of loss. However, users of **easy-thumbnails** may want to upload and use SVG images just as if | ||
they would be in PNG, GIF or JPEG format. End users don't necessarily care about the format and definitely don't want | ||
to convert them to a pixel based format. What they want is to reuse their templates with the templatetag | ||
``{% thumbnail image ... as thumb %}``, and scale and crop the images to whatever the | ||
element tag ``<img src="{{ thumb.url }}" width="..." height="...">`` has been prepared for. | ||
|
||
This is done by adding an emulation layer named VIL, which aims to be compatible with PIL. All thumbnailing operations, | ||
such as scaling and cropping behave like their pixel based counterparts. The content and final filesize of such | ||
thumbnailed SVG images doesn't of course change, but their width/height and bounding box may be adjusted to reflect the | ||
desired size of the thumbnailed image. Therefore, "thumbnailed" SVG images are stored side by side with their original | ||
images and hence can be used by third-party apps such as | ||
`django-filer<https://django-filer.readthedocs.io/en/latest/>`_ without modification. | ||
|
||
Since easy-thumbnails version 2.8, you can therefore use an SVG image, just as you would use any other image. | ||
|
||
This requires easy-thumbnails to have been installed with the ``[svg]`` extra enabled. | ||
|
||
Cropping an SVG image works as expected. Filtering an SVG image will however not work. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docutils<0.18 |
Oops, something went wrong.