Bugzilla – Attachment 191024 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) Tidy
Bug-8088-follow-up-Tidy.patch (text/plain), 2.60 KB, created by
Owen Leonard
on 2026-01-08 12:24:40 UTC
(
hide
)
Description:
Bug 8088: (follow-up) Tidy
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2026-01-08 12:24:40 UTC
Size:
2.60 KB
patch
obsolete
>From cd41f6839b3f4251415b45cf28b153cfd4a67345 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 8 Jan 2026 07:03:28 -0500 >Subject: [PATCH] Bug 8088: (follow-up) Tidy > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > Koha/CoverImage.pm | 7 +++---- > tools/upload-cover-image.pl | 4 ++-- > 2 files changed, 5 insertions(+), 6 deletions(-) > >diff --git a/Koha/CoverImage.pm b/Koha/CoverImage.pm >index 9239e59495f..fb0b5cf5856 100644 >--- a/Koha/CoverImage.pm >+++ b/Koha/CoverImage.pm >@@ -74,8 +74,8 @@ sub new { > sub _scale_image { > my ( $self, $image, $maxwidth, $maxheight ) = @_; > my ( $width, $height ) = $image->getBounds(); >- $image->alphaBlending(0); >- $image->saveAlpha(1); >+ $image->alphaBlending(0); >+ $image->saveAlpha(1); > if ( $width > $maxwidth || $height > $maxheight ) { > > my $percent_reduce; # Percent we will reduce the image dimensions by... >@@ -87,8 +87,7 @@ sub _scale_image { > } > my $width_reduce = sprintf( "%.0f", ( $width * $percent_reduce ) ); > my $height_reduce = sprintf( "%.0f", ( $height * $percent_reduce ) ); >- my $newimage = GD::Image->new( $width_reduce, $height_reduce, 1 ) >- ; #'1' creates true color image... >+ my $newimage = GD::Image->new( $width_reduce, $height_reduce, 1 ); #'1' creates true color image... > $newimage->alphaBlending(0); > $newimage->saveAlpha(1); > $newimage->copyResampled( $image, 0, 0, 0, 0, $width_reduce, $height_reduce, $width, $height ); >diff --git a/tools/upload-cover-image.pl b/tools/upload-cover-image.pl >index 330c4a04283..239a78c5db5 100755 >--- a/tools/upload-cover-image.pl >+++ b/tools/upload-cover-image.pl >@@ -101,7 +101,7 @@ my @results; > if ( $op eq 'cud-process' && $fileID ) { > my $upload = Koha::UploadedFiles->find($fileID); > if ( $filetype eq 'image' ) { >- my $fh = $upload->file_handle; >+ my $fh = $upload->file_handle; > GD::Image->trueColor(1); > my $srcimage = GD::Image->new($fh); > $fh->close if $fh; >@@ -185,7 +185,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/ ){ >+ if ( $full_filename =~ /^\Q$dir\E/ ) { > GD::Image->trueColor(1); > $srcimage = GD::Image->new($full_filename); > } >-- >2.39.5
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
|
191023
| 191024