Author Topic: Add .Png but a black background appears when I add on 4images  (Read 16713 times)

0 Members and 1 Guest are viewing this topic.

Offline satine88

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Hello

Is it possible to make transparent images

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


Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: Add .Png but a black background appears when I add on 4images
« Reply #1 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)
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline satine88

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: Add .Png but a black background appears when I add on 4images
« Reply #2 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 :)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Add .Png but a black background appears when I add on 4images
« Reply #3 on: June 17, 2010, 01:50:30 AM »
There is a way fix this, but I'll need a sample image to play with ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Add .Png but a black background appears when I add on 4images
« Reply #5 on: June 18, 2010, 01:28:50 AM »
In includes/image_utils.php find:
    $thumb imagecreatetruecolor($width$height);

Insert below:
    imagealphablending($thumbfalse);
    
imagesavealpha($thumbtrue);
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline satine88

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: Add .Png but a black background appears when I add on 4images
« Reply #6 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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Add .Png but a black background appears when I add on 4images
« Reply #7 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 :)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline satine88

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: Add .Png but a black background appears when I add on 4images
« Reply #8 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/)