[Koha-patches] [PATCH] [SIGNED-OFF] Preservation transparency of png-images cover.

Mason James mtj at kohaaloha.com
Tue May 15 05:39:37 CEST 2012


On 2012-05-15, at 8:29 AM, Serhij Dubyk {Сергій Дубик} wrote:

> From: Serhij Dubyk {‹¡‹µÑ•‹“ш‹’ ‹?= =?UTF-8?q?‰Ñ∞‹±‹¸‹º} <serhijdubyk at gmail.com>
> 
> 
> Signed-off-by: Serhij Dubyk {‹¡‹µÑ•‹“ш‹’ ‹‰Ñ∞‹±‹¸‹º} <serhijdubyk at gmail.com>
> ---
> C4/Images.pm |    8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/C4/Images.pm b/C4/Images.pm
> index 8afc8fa..3a8a383 100644
> --- a/C4/Images.pm
> +++ b/C4/Images.pm
> @@ -187,10 +187,14 @@ sub _scale_image {
>           and warn "Reducing image by "
>           . ( $percent_reduce * 100 )
>           . "\% or to $width_reduce pix X $height_reduce pix";
> -        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...
> +        #my $newimage = $image->clone;
> +        $newimage->alphaBlending(0);
> +        $newimage->saveAlpha(1);
> +        #$newimage->transparent( $image->transparent() );
>         $newimage->copyResampled( $image, 0, 0, 0, 0, $width_reduce,
>             $height_reduce, $width, $height );
> +        #$newimage->transparent( $image->transparent() );
>         return $newimage;
>     }
>     else {
> -- 
> 1.7.10
> 

hmmm, a bugzilla ticket would help to ensure this important patch does not get lost...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 535 bytes
Desc: This is a digitally signed message part
URL: </pipermail/koha-patches/attachments/20120515/276070d9/attachment.pgp>


More information about the Koha-patches mailing list