Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[FIXED] PNG Black background Fix 16 Nov 2012 09:28 #5408

Hello,

I had a problem with black backgrounds appearing on png images. After looking into the images.php class, I found a solution which worked for me.

I added these two lines at line 385:

imagesavealpha($resampled, true);
imagealphablending($resampled, false);

(after the line: $resampled = imagecreatetruecolor($w, $h);)

There might be a better solution, but this works for me.

Kind regards,

Misha
The following user(s) said Thank You: JoomGuy

Please Log in or Create an account to join the conversation.

Re: PNG Black background Fix 16 Nov 2012 09:31 #5409

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Thanks for sharing your solution Micha (@blue-canoe)!

I think you are right with your solution as from memory, no specific provisions had been made for alpha transparency. These were images that contained transparency, right?

Thanks again,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Re: PNG Black background Fix 17 Nov 2012 10:19 #5433

Yes, those were transparent images (png).

There where some provisions made for alpha transparency, but only when the image is first created. Later on a new instances was created (to create the border etc if necessary) and there it was not done.
The following user(s) said Thank You: JoomGuy

Please Log in or Create an account to join the conversation.

Re: PNG Black background Fix 17 Nov 2012 11:17 #5434

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Hi Misha,

Karma +1 For sharing your fix!

Thanks again,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Re: PNG Black background Fix 21 Nov 2012 12:39 #5558

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986

There might be a better solution, but this works for me.


Why are you saying this ?
It looks great !

Karma +1
It is a very nice fix because I recognize to had many problems with png. In com_media as well (The one I partially inspirated)
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: PNG Black background Fix 28 Nov 2012 13:25 #5674

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
FIXED with your tip.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.063 seconds

Let me first state that this is an amazing and fascinating product exactly what I was looking for. In just a few hours (listening to the very well made and clearly understandable videos learning doing) I completed and installed my first component. I am now in the second refining phase. I will make a recommenation in JED. Thanks for the effort in creating such a great product. Incidentally some of the best Joomla extension I use are of French origin !
Giori (Forum)

Get Started