4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: satine88 on June 15, 2010, 10:29:07 PM

Title: Add .Png but a black background appears when I add on 4images
Post by: satine88 on June 15, 2010, 10:29:07 PM
Hello

Is it possible to make transparent images

I added. Png but a black background appears when I add on 4images:

(http://nsa14.casimages.com/img/2010/06/15//10061510280866464.jpg)
Title: Re: Add .Png but a black background appears when I add on 4images
Post by: V@nо on June 16, 2010, 12:44:55 AM
are they being resized? if they are, what graphic library do you use? (ImageMagic, GD or NetPBM)
Title: Re: Add .Png but a black background appears when I add on 4images
Post by: satine88 on June 16, 2010, 07:36:08 PM
are they being resized? if they are, what graphic library do you use? (ImageMagic, GD or NetPBM)

Yes, GD :)
Title: Re: Add .Png but a black background appears when I add on 4images
Post by: V@no on June 17, 2010, 01:50:30 AM
There is a way fix this, but I'll need a sample image to play with ;)
Title: Re: Add .Png but a black background appears when I add on 4images
Post by: satine88 on June 17, 2010, 08:15:01 PM
There is a way fix this, but I'll need a sample image to play with ;)

No problem

Website :
http://icones.fond-ecran-gratuit.biz

Image
http://icones.fond-ecran-gratuit.biz/data/media/10/My_Documents.png
(Http://icones.fond-ecran-gratuit.biz/img-my-documents-2358.htm)

Thumb
http://icones.fond-ecran-gratuit.biz/data/thumbnails/10/My_Documents.png
(Http://icones.fond-ecran-gratuit.biz/cat-dossiers-10.htm)

Thanks
:)
Title: Re: Add .Png but a black background appears when I add on 4images
Post by: V@no on June 18, 2010, 01:28:50 AM
In includes/image_utils.php find:
    $thumb = imagecreatetruecolor($width, $height);

Insert below:
    imagealphablending($thumb, false);
    imagesavealpha($thumb, true);
Title: Re: Add .Png but a black background appears when I add on 4images
Post by: satine88 on June 18, 2010, 07:41:32 PM
I deleted all the pictures, then I
create new every time I had this message :

Code: [Select]
Warning: imagesavealpha (): Supplied argument Is Not
a valid Image resource in
/ Homez.93/fondecra/www/icones/includes/image_utils.p
hp on line 75

Code:

Quote
$types = array(1 => "gif", 2 => "jpeg", 3 => "png");
  if ($convert_options['convert_gd2']) {
         imagealphablending($thumb, false);
    imagesavealpha($thumb, true);
    $thumb = imagecreatetruecolor($width, $height);
  }
  else {
    $thumb = imagecreate($width, $height);
  }

Thanks
Title: Re: Add .Png but a black background appears when I add on 4images
Post by: V@no on June 19, 2010, 01:51:33 AM
yeah, well, pay attention to the instructions ;)

Insert below not above

Should work once you fix it :)
Title: Re: Add .Png but a black background appears when I add on 4images
Post by: satine88 on June 19, 2010, 12:48:31 PM
yeah, well, pay attention to the instructions ;)

Insert below not above

Should work once you fix it :)

LOL
Sorry

To thank you for your help, the problem is solved (http://icones.fond-ecran-gratuit.biz/)