Summary: | Local cover 'thumbnail' size is bigger than 'imagefile' size in biblioimages table | ||
---|---|---|---|
Product: | Koha | Reporter: | Andreas Roussos <arouss1980> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P3 | CC: | jonathan.druart, lucas, magnus, martin.renvoize, nick, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22988 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 23963, 23984 | ||
Attachments: |
Bug 21987: Add tests
Bug 21987: Do not generate true color thumbnails if not needed Bug 21987: Do not generate true color thumbnails if not needed Bug 21987: Add tests Bug 21987: Do not generate true color thumbnails if not needed |
Description
Andreas Roussos
2018-12-12 14:36:00 UTC
Here's some more info from tests I conducted earlier: Original image -> Koha imagefile Koha thumbnail --------------------------- -------------- -------------- aliakmon 160x245 24-bit JPG -> 160x245 8-bit 140x214 24-bit aliakmon 601x801 24-bit JPG -> 600x800 24-bit 140x187 24-bit oatrotf 599x799 32-bit PNG -> 599x799 8-bit 140x187 24-bit oatrotf 601x801 32-bit PNG -> 600x800 24-bit 140x187 24-bit testing 200x400 8-bit GIF -> 200x400 8-bit 140x280 24-bit testing 601x801 8-bit GIF -> 600x800 24-bit 140x187 24-bit whitebg 599x799 24-bit PNG -> 599x799 1-bit 140x187 24-bit * whitebg 601x801 24-bit PNG -> 600x800 24-bit 140x187 24-bit worrying 599x799 8-bit PNG -> 599x799 8-bit 140x187 24-bit worrying 601x801 8-bit PNG -> 600x800 24-bit 140x187 24-bit [*] the uploaded image was empty (white background), perhaps that explains the resulting 1-bit imagefile? Created attachment 83369 [details] [review] Bug 21987: Add tests Created attachment 83370 [details] [review] Bug 21987: Do not generate true color thumbnails if not needed If the original image is not a true color image we should not generate a true color thumbnail. A test plan could be: - Attach image to a bibliographic record - Confirm that the thumbnail is not bigger than the original image Use 8-bit and 24-bit images. Created attachment 86215 [details] [review] Bug 21987: Do not generate true color thumbnails if not needed If the original image is not a true color image we should not generate a true color thumbnail. Signed-off-by: Michal Denar <black23@gmail.com> Created attachment 86525 [details] [review] Bug 21987: Add tests Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 86526 [details] [review] Bug 21987: Do not generate true color thumbnails if not needed If the original image is not a true color image we should not generate a true color thumbnail. Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> All works here, Passing QA Awesome work all! Pushed to master for 19.05 Pushed to 18.11.x for 18.11.04 backported to 18.05.x for 18.05.11 See bug 22988 for a possible regression caused by this bug. (In reply to Magnus Enger from comment #12) > See bug 22988 for a possible regression caused by this bug. This should probably be reverted in the meantime, as it could be considered data-loss (In reply to Tomás Cohen Arazi from comment #13) > (In reply to Magnus Enger from comment #12) > > See bug 22988 for a possible regression caused by this bug. > > This should probably be reverted in the meantime, as it could be considered > data-loss Our customer would tend to agree, I think. Reverted as bug 23963 |