Banner
Views: 807,103,646
Time:
14 users online: chickaDEE Magazine, Dan Drigues, Darkslayer, DPBOX, ECS.98, Eminus, Epic_Manky,  KevinM, Milon Luxy, MrBread,  Ninja Boy, Shizufuzu,  Tob, Zandro - Guests: 96 - Bots: 207 Users: 42,340 (1,939 active)
Latest: IndoorCrab
Tip: If you use custom music, make sure your ROM has been expanded to at least 1MB.Not logged in.
Transparent Image Overlays in PHP
Forum Index - Donut Plains - Computers & Technology - Transparent Image Overlays in PHP
Pages: « 1 »


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 »
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


Total queries: 7

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

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