Banner
Views: 865,263,975
Time:
6 users online:  Anorakun, crm0622, Dan Drigues, JonnyManjiro, LOLRyan2006 the Goombud, Nint - Guests: 38 - Bots: 69 Users: 47,922 (2,070 active)
Latest: pardyl2500
Tip: Always check for updated files in the database by sorting them by "Date" in the various sections.Not logged in.
Transparent Image Overlays in PHP
Forum Index - Donut Plains - Computers & Technology - Transparent Image Overlays in PHP
Pages: « 1 » Link


Hello. I've been working on a few things recently. One thing that has caused me a slight bit of grief is that with php, when I resize an image with transparency to overlay on another image (such as a meme macro or something) I lose the transparency and it turns to black. Therefore, the original image is lost and I have a simple resized overlay with transparency turned into blackness. How do I resize a transparent image in php and keep the transparency? By the way, it's an alpha png.
Balloon Party.
At times like this, you need to step back and say, "Where's the Balloon Party?"
What a google search for "resize png keep transparency php" gave me

Basically, if you set
Code
imagealphablending( $targetImage, false );
imagesavealpha( $targetImage, true );

It should work.


The image was fixed, but of note, alphablending should have been ON.
Balloon Party.
At times like this, you need to step back and say, "Where's the Balloon Party?"
Pages: « 1 » Link
Forum Index - Donut Plains - Computers & Technology - Transparent Image Overlays in PHP

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2020 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy