Bugzilla – Attachment 176278 Details for
Bug 8088
Png-images of covers lost transparency
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8088: (follow-up) keep image transparency when importing a batch of cover images
Bug-8088-follow-up-keep-image-transparency-when-im.patch (text/plain), 2.23 KB, created by
Hammat wele
on 2025-01-08 21:23:19 UTC
(
hide
)
Description:
Bug 8088: (follow-up) keep image transparency when importing a batch of cover images
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-01-08 21:23:19 UTC
Size:
2.23 KB
patch
obsolete
>From dd8f235ff9adb9fed8198522fe2b8d37cab7bdda Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Wed, 8 Jan 2025 21:22:43 +0000 >Subject: [PATCH] Bug 8088: (follow-up) keep image transparency when importing > a batch of cover images >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Images of covers must preserve transparency of png-images when uploading a batches of images in a ZIP file > >Plan test : > >Make sure you have a valid Zip file that contains the images to upload and a valid datalink.txt or idlink.txt file > >1. Apply the patch. >2. In 'Cataloging > Upload local cover image', set 'LocalCoverImages' to 'show' and OPACLocalCoverImages to 'show'. >3. Click on « Drop files here » and select the ZIP file to upload then click «Process images» >6. For each notice check the transparency of images > --->Notice the background is transparent >--- > Koha/CoverImage.pm | 5 ----- > tools/upload-cover-image.pl | 1 + > 2 files changed, 1 insertion(+), 5 deletions(-) > >diff --git a/Koha/CoverImage.pm b/Koha/CoverImage.pm >index 0d9e1faf44..ea84594502 100644 >--- a/Koha/CoverImage.pm >+++ b/Koha/CoverImage.pm >@@ -67,11 +67,6 @@ sub new { > $params->{mimetype} = 'image/png'; > $params->{imagefile} = $fullsize->png(); > $params->{thumbnail} = $thumbnail->png(); >- # Convert the image to PNG and print it on standard output >- >- open my $fh1, '>', '/inlibro/BD/outputV.png'; >- print {$fh1} $params->{thumbnail}; >- close $fh1; > } > > return $class->SUPER::new($params); >diff --git a/tools/upload-cover-image.pl b/tools/upload-cover-image.pl >index 8627e50286..1ec7ffe1f6 100755 >--- a/tools/upload-cover-image.pl >+++ b/tools/upload-cover-image.pl >@@ -191,6 +191,7 @@ if ( $op eq 'cud-process' && $fileID ) { > my $full_filename = Cwd::abs_path("$dir/$filename"); #Resolve any relative filepath references > my $srcimage; > if ( $full_filename =~ /^\Q$dir\E/ ){ >+ GD::Image->trueColor(1); > $srcimage = GD::Image->new($full_filename); > } > my $biblio; >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8088
:
9573
|
175852
|
175853
|
175964
|
176278
|
176536
|
176537