Banner
Views: 236,758,722
Time: 2013-05-25 05:34:39 PM
25 users online: Akireyano, AxemJinx, o Error 52, EvilGuy0613, o FPzero, FuriousVampire, Kazeshin, leod, levelengine, LimeMaster92, Mister Kirby, MolSno, MrDeePay, omegazeroINFI, Purple Rex, Reaper, ShadowFire, o ShadowPhoenix, ShUriK KiD, silverthundr, superdragonyoshi1, TheOtherGuy25, Usetheforce, Vitor Vilela, Z0mbie1337 - Guests: 43 - Bots: 12Users: 22,892 (1,288 active)
Latest: dragon8371
Tip: Add decorations to the overworld. Don't leave large empty grass or sea regions.
Transparent Image Overlays in PHP
Forum Index - Hobbies - 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.
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.
Last edited on 2011-10-09 01:20:56 PM by Vector.
Pages: « 1 »
Forum Index - Hobbies - 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 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 27

Menu