Project

General

Profile

Feature #1426

API: display image smaller size

Added by Bernhard Koschicek 3 months ago. Updated about 1 month ago.

Status:
Acknowledged
Priority:
Low
Category:
API
Target version:
Start date:
2020-12-01
Estimated time:

Description

Some images can be very large in file size. Since the API should also provide data for different front-ends, it can be useful, that API clients can forcefully downsize images. One idea is, that the normal display path will show the full image. With parameters the client can demand a 30% size version of the image. Or the image pixel size will be downsized to a number like 1200px. The path will be /api/display/image.jpg?size=30 or /api/display/hsize=1200 or /api/display/vsize=1200 (horizontal and vertical size)

If python can not do it by itself, maybe the Pillow package can do this.


Related issues

Related to Feature #1280: Picture PreviewAcknowledged2020-06-17Actions

History

#1

Updated by Alexander Watzinger 3 months ago

#2

Updated by Alexander Watzinger 3 months ago

My take on this is that we will need some image processing in OpenAtlas sooner or later anyway. I linked a related issue about previews and although nobody wrote a ticket so far some people mentioned they would like a slideshow and similar. Once we have solved this for OpenAtlas (thumbnails, previews, slideshows, ...) we could decide if this is sufficient for the API too or if we would need extra functionality there.

What would be needed now is a volunteer who delves into this topic and drafts a solution proposal which we can than discuss together ;)
I started a draft and everybody is welcomed to join/take over: Image processing

#3

Updated by Bernhard Koschicek about 2 months ago

I tried to play around with Pillow, but sadly couldn't make it work on my machine.

#4

Updated by Bernhard Koschicek about 1 month ago

pillow has no buster package... I looked into pythonmagick (https://packages.debian.org/buster/python3-pythonmagick) and found Wand (https://packages.debian.org/buster/libmagickwand-dev) with following documentation: https://docs.wand-py.org/en/0.6.5/.
Alex, can you look at the package https://packages.debian.org/buster/libmagickwand-dev and tell me, if this will work with OA installations?

Also available in: Atom PDF