Bug 31049 - Add tool to set/reduce local cover image size and quality, interactively and in batch.
Summary: Add tool to set/reduce local cover image size and quality, interactively and ...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low new feature
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 23984 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-26 22:47 UTC by Manos PETRIDIS
Modified: 2024-09-04 17:47 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Image before upload 1085x1597 pixels 24bit jpeg 430KB (430.47 KB, image/jpeg)
2023-02-27 19:14 UTC, Manos PETRIDIS
Details
koha processed image 600x883 pixels 24bit png 940KB (940.43 KB, image/png)
2023-02-27 19:15 UTC, Manos PETRIDIS
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manos PETRIDIS 2022-06-26 22:47:33 UTC
It would be useful I think to add functionality that would 

a) process local cover images and set colour depth, resolution, quality and compression to certain levels set in authorized values at library level, before commiting new images to the database.

b) process in batch images already existing in the db, according to the values set.

c) store in the db settings used for each local cover image, so that it wouln't be re-processed unless new, lesser image quality settings were set and patch processing was invoked. 

It seems (Bug 21987 and Bug 22988) that some kind of processign is already performed but I found no related settings or documentation.
Comment 1 Galen Charlton 2023-02-20 16:06:53 UTC
Koha currently uses GD's copyResampled to resize local cover images upon upload. Two versions of the original image are produced:

* a thumbnail with a maximum width of 140 and a maximum height of 200
* a "full size" version with a maximum width of 600 and a maximum height of 800

Koha only scales down; it does not scale images up if they're already within the size limits. Also, if the width is larger than the maximum, the width adjustment is what controls the overall resizing, meaning that it's possible for the result to be taller than the maximum height.
Comment 2 Manos PETRIDIS 2023-02-27 19:14:22 UTC
Created attachment 147467 [details]
Image before upload 1085x1597 pixels 24bit jpeg 430KB
Comment 3 Manos PETRIDIS 2023-02-27 19:15:51 UTC
Created attachment 147468 [details]
koha processed image 600x883 pixels 24bit png 940KB
Comment 4 Manos PETRIDIS 2023-02-27 19:21:01 UTC
koha manages however to increase file size by 119% (430KB to 940KB) while reducing image size to 30,6% of the original, both in 24bit colour. Is that sane?
Comment 5 Manos PETRIDIS 2023-02-28 15:07:08 UTC
Please also check Bug 23984 - Local cover 'thumbnail' size is bigger than 'imagefile' size in biblioimages table
Comment 6 Hinemoea Viault 2023-05-29 20:27:05 UTC
We noticed the same behavior from Koha.

You can see Bug 33857
The patch add a script that reduce and resize oversized local cover images.
Comment 7 russellgeeps 2024-07-23 12:42:14 UTC
We are experiencing the same issues with our Koha.
We upload high quality images of maps, but they all get reduced in quality so much that you can't make out any details.

Please assist, which conf. files can we modify to make it stop or to no change the quality?
Comment 8 Bosse 2024-09-04 17:47:19 UTC
*** Bug 23984 has been marked as a duplicate of this bug. ***