Bug 8088 - Png-images of covers lost transparency
Summary: Png-images of covers lost transparency
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Hammat wele
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-14 20:35 UTC by Serhij Dubyk
Modified: 2025-01-16 13:45 UTC (History)
8 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
Small changes in C4/Images.pm (1.53 KB, patch)
2012-05-14 20:39 UTC, Serhij Dubyk
Details | Diff | Splinter Review
Transparent image (529.76 KB, image/png)
2024-12-20 18:01 UTC, Hammat wele
Details
Bug 8088: Png-images of covers lost transparency (2.94 KB, patch)
2024-12-20 18:28 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 8088: Png-images of covers lost transparency (2.99 KB, patch)
2024-12-27 19:59 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 8088: (follow-up) keep image transparency when importing a batch of cover images (2.23 KB, patch)
2025-01-08 21:23 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 8088: Png-images of covers lost transparency (3.24 KB, patch)
2025-01-14 20:10 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 8088: Png-images of covers lost transparency (3.19 KB, patch)
2025-01-14 20:14 UTC, Hammat wele
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Serhij Dubyk 2012-05-14 20:35:16 UTC
Images of covers must preserve transparency of png-images. This is useful for example for the covers of CD/DVD disks.
Comment 1 Serhij Dubyk 2012-05-14 20:39:18 UTC
Created attachment 9573 [details] [review]
Small changes in C4/Images.pm

Replace 
 my $newimage = $image->clone;
by
 my $newimage = GD::Image->new( $width_reduce, $height_reduce, 1 );    
 $newimage->alphaBlending(0);
 $newimage->saveAlpha(1);
Comment 2 Chris Cormack 2012-05-20 09:26:32 UTC
I like the idea, but do we need the commented out transparency lines? 

Can we safely remove those?
Comment 3 Chris Cormack 2012-07-15 09:50:49 UTC
Still waiting on answer to the question before signoff
Comment 4 Serhij Dubyk 2013-03-03 18:08:32 UTC
(In reply to comment #2)
> I like the idea, but do we need the commented out transparency lines? 
> 
> Can we safely remove those?

Yes.
Comment 5 Marc Véron 2016-10-03 15:28:53 UTC
Still valid?
Comment 6 Eric Bégin 2024-12-19 16:10:12 UTC
After few years, this still an issue. ;-)
Comment 7 Hammat wele 2024-12-20 18:01:58 UTC
Created attachment 175852 [details]
Transparent image
Comment 8 Hammat wele 2024-12-20 18:28:37 UTC
Created attachment 175853 [details] [review]
Bug 8088: Png-images of covers lost transparency

Images of covers must preserve transparency of png-images. This is useful for example for the covers of CD/DVD disks.

Plan test :
1. Apply the patch.
2. In 'Koha administration > System preferences', set 'LocalCoverImages' to 'show' and  OPACLocalCoverImages to 'show'.
3. Create a new bibligraphical record
4. In the record details select tab Images and click on upload
5. click on « Drop files here » and select the image file to upload then click «Process images»
6. Search for the record created on step 3
7. Click on the record to view detail page (detail.pl)
8. Click on the image to view it fully
   --->Notice the background is transparent
9. Save the image and open it
   ---> Notice the background is transparent
Comment 9 ByWater Sandboxes 2024-12-27 19:59:59 UTC
Created attachment 175964 [details] [review]
Bug 8088: Png-images of covers lost transparency

Images of covers must preserve transparency of png-images. This is useful for example for the covers of CD/DVD disks.

Plan test :
1. Apply the patch.
2. In 'Koha administration > System preferences', set 'LocalCoverImages' to 'show' and  OPACLocalCoverImages to 'show'.
3. Create a new bibligraphical record
4. In the record details select tab Images and click on upload
5. click on « Drop files here » and select the image file to upload then click «Process images»
6. Search for the record created on step 3
7. Click on the record to view detail page (detail.pl)
8. Click on the image to view it fully
   --->Notice the background is transparent
9. Save the image and open it
   ---> Notice the background is transparent

Signed-off-by: esther <esther@bywatersolutions.com>
Comment 10 Esther Melander 2024-12-27 20:01:10 UTC
The image retained transparency after uploading. Also checked the OPAC and the image had transparency.
Comment 11 Hammat wele 2025-01-08 21:23:19 UTC Comment hidden (obsolete)
Comment 12 Hammat wele 2025-01-14 20:10:11 UTC Comment hidden (obsolete)
Comment 13 Hammat wele 2025-01-14 20:14:01 UTC
Created attachment 176537 [details] [review]
Bug 8088: Png-images of covers lost transparency

Images of covers must preserve transparency of png-images. This is useful for example for the covers of CD/DVD disks.

Plan test :
1. Apply the patch.
2. In 'Koha administration > System preferences', set 'LocalCoverImages' to 'show' and  OPACLocalCoverImages to 'show'.
3. Create a new bibligraphical record
4. In the record details select tab Images and click on upload
5. click on « Drop files here » and select the image file to upload then click «Process images»
6. Search for the record created on step 3
7. Click on the record to view detail page (detail.pl)
8. Click on the image to view it fully
   --->Notice the background is transparent
9. Save the image and open it
   ---> Notice the background is transparent
Comment 14 Owen Leonard 2025-01-16 13:45:16 UTC
This looks like it's working correctly but please run the qa script on it and fix the errors it reports.