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.068 seconds

  I found "cook" two days ago. Played around with it for a day and then within a day got rid of two legacy applications in IBM Lotus Domino Notes and replaced them with "cook". It was really easy. A piece of cake. Actually it was even easier than cooking. Cooking involves more work than developing with "cook". What can I say about "cook"? Great application great price for what it delivers great forum with a lot of information and fast responses active and friendly community fast forward moving development cycle So what should I say "Monsieur Le Cook"? Keep the good work going it will lead to success. Having become a paying member in the words of Edith Piaf may I say ..... non rien de rien ... je ne regrette rien. Vive La France.
FK (JED)
         

Get Started