A high resolution image manager for pan and zooming into images
Project description
About
Django Loupe provides an easy way to display zoomable, large images. The images may be hosted locally by uploading the original large image, or externally. Externally hosted images are referenced by their URL.
Zoomable images are displayed by making a tiled image pyramid. There are several methods and formats for making this pyramids. Django Loupe creates locally-hosted tiles in the Deep Zoom format developed by Microsoft using the open source VIPS library.
The OpenSeadragon JavaScript library displays the locally- or externally-hosted images.
Install
Install Django Loupe using pip:
pip install django-loupe
Add "loupe", to your Django project’s INSTALLED_APPS.
Install VIPS on your platform. There are packages for Windows, and most Linux distributions include a package. There is a homebrew recipe for Mac OS X.
Upload an image
Add a new loupe image
Enter in a title and description
Click on the upload file button and select a high-res file
Save.
Enter an externally hosted image
Add a new loupe image
Enter a title and description
Enter in the URL for the tiles. This is not the URL for the page where you view the image. You will have to look at the page source to discover the tileset URL. Different formats have standard description files and Django Loupe will determine the correct URL from these.
Deep Zoom: http://example.com/path/to/image/imagename.dzi
International Image Interoperability Framework: http://example.com/path/to/image/info.xml
Zoomify: http://example.com/path/to/image/ImageProperties.xml
Select the type of External tileset type from the selection.
Save.
Serving an image
In the template include the JavaScript:
{% load loupe_tags %}{% openseadragon_js %}
{{ object.render }} will include the HTML fragment for the large image.
If it is an external tile set, it looks for <modulename>/<classname>_<tileset_type>.html where <tileset_type> is the short name of the tileset type choice.
Finally, it looks in <modulename>/<classname>_default.html
Using remote storage
Use django-queued-storage
Set 'IMAGE_STORAGE' to appropriate storage type.
Specify setting 'QUEUED_STORAGE_TASK' to either 'loupe.task.TileAndTransfer' or 'loupe.task.TileTransferAndDelete'.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-image-loupe-0.3.2.tar.gz
.
File metadata
- Download URL: django-image-loupe-0.3.2.tar.gz
- Upload date:
- Size: 724.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d27f92cb47a69e2afddd72faefa35b8f08f53b04234d59f86d4fe2fdfb182849 |
|
MD5 | b4dedcac2e6d3e09646730d05cfed667 |
|
BLAKE2b-256 | a70c38bcc9d8e2b0bad98c5c37a289cf695e359a252abac74ba7589d5db2cf7a |