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.098 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started