Why Is My Gif Background Black?
Edit two: SUCCESS! many thank you to moycakes!
The right way to convert a PNG to a GIF while retaining transparency goes as follows:
$input = "data:prototype/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXwAAAEYCAYAAABfgk2GAAAemklEQVR4Xu2dzYsm13WHe7rHxGATtw1Zu8UMY0wIkv6AoF44ZOEspFWyUytkkRASJG0sgS2NPkCKF5qxMSSboNbOu4xJcAxZaJRNlhqRVYaZpPUPSC2wiYmm38k5rS75delW1b1V9+Pcuk9BMR/vrXvPfc6p33veU7eqLu2wQQACEIBAEwQuNTFLJgkBCEAAAjsIPkEAAQhAoBECCH4jjmaaEIAABBB8YgACEIBAIwQQ/EYczTQhAAEIIPjEAAQgAIFGCCD4jTiaaUIAAhBA8IkBCEAAAo0QQPAbcTTThAAEIIDgEwMQgAAEGiGA4DfiaKYJAQhAAMGvJwYeE1OfkP3JC5P3L/48vfjzlvz5nux36pkSlkIAAjkJIPg5ac8b60gOe1n2A8/DT6Tdddnf8WxPMwhAoBECCL5dRx+KaW8HCH1/Jir8T5Hx23UwlkEgNwEEPzdxv/E0q1exj7E9I50cx+iIPiAAgboJIPj2/Kfi/HRks7RPFX62dRLg+s46/Rp9Vgh+dKSLOoyZ2fcNIdNf5BqTB2u8cH3HpGtsGoXg2/HLoZjybmJzHpf+WcWTGHKG7jVWuL6TAfTahkDw7Xj0REz5ZmJzdIxHEo9B92kJxPwVyK++tL4y1zuCb8MlMU/iqRn9nTR4YaoRn5skcCxWcX3HpGvqMArBt+GnHNl9N9ON/GXPxrSxIoBAyqSATD/AETU3RfDLe09XWLyf2Qxq+ZmBLxzuUI7n+s5CiBy+w0vMDQTBs2LDjcx2PCfj3cw8JsPNJ5DjF6COwfWd+T6q4kgy/PJuui0m6DNycm76zB3NGtnsEzgSE2PdhDc1W0o7U4Qq/xzBL+9ABL+8DyxbkCO77+ZPlm85EiLYhuBHgLiwC10X/+jCPkIP1zG1js9mmwDXd2z7pzrrEPzyLish+B/ItFVM2GwT4P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7vhi0+gZAs36SOxUeyvEfToM6z/R0RSN8XnJ8L/d71a6f3Mwvq+asQRVA1a9dt70JQzy4EdU8E9UwENXlGvzwi6MFFQP2pWafu28+nafXehBxRguAnoGxa8Lv56h25e5Khnu1cPhdUiYRzQRXjzwV1b+fBrTPJUNNn9Ak8QJc1EdgWfrV7e2VJTfOowdaQsk4VOmYBOqAseAEbIACBIQI+mT465hk/gPIERTMIQKAIgalMn1U6AW5B8ANg0RQCEIBAzQQQ/Jq9h+0QgAAEAggg+AGwaAoBCECgZgIIfs3ew3YIQAACAQQQ/ABYNIUABCBQMwEEv2bvYTsEIACBAAIIfgAsmkIAAhComQCCX7P3sB0CEIBAAAEEPwAWTSEAAQjUTADBr9l72A4BCEAggACCHwCLphCAAARqJoDg1+w9bIcABCAQQADBD4BFUwhAAAI1E0Dwa/YetkMAAhAIIIDgB8CiKQQgAIGaCSD4NXsP2yEAAQgEEEDwA2DRFAIQgEDNBBD8mr2H7RCAAAQCCCD4AbBoCgEIQKBmAgh+zd7DdghAAAIBBBD8AFg0hQAEIFAzAQS/Zu9hOwQgAIEAAgh+ACyaQgACEKiZAIJfs/ewHQIQgEAAAQQ/ABZNIQABCNRMAMGv2XvYDgEIQCCAAIIfAIumEIAABGomgODX7D1shwAEIBBAAMEPgEVTCEAAAjUTQPBr9h62QwACEAgggOAHwKIpBCAAgZoJIPg1ew/bIQABCAQQQPADYNEUAhCAQM0EEPyavYftEIAABAIIIPgBsGgKAQhAoGYCCH7N3sN2CEAAAgEEEPwAWDSFAAQgUDMBBL9m72E7BCAAgQACCH4ALJpCAAIQqJkAgl+z97AdAhCAQAABBD8AFk0hAAEI1Ezg/wFm7lJkZahzkgAAAABJRU5ErkJggg=="; $image = imagecreatefrompng($input); imagesavealpha($epitome, true); imagecolortransparent($image, 127<<24); imagegif($image, 'img/exam.gif');
GOSH! two days for such a unproblematic few lines of code >__<
Thank you to everyone who posted a suggestion.
old post:
Alright, I'g at my wits terminate now. (Why is the GD library in PHP and so confusing??) I've been at this for several hours two days now.. and I just can't get PHP to make a GIF from a PNG with a transparent groundwork.
There are several posts about this on StackOverflow merely none of the solutions provided really helped me at all. I always terminate up with either a black background image or everything black in my paradigm becomes transparent except for the background (or just everything stays blackness).
I've typed imagecolorallocate
and imagecolortransparent
so many times that these commands accept lost their meaning to me.. >___<
my code looks like this:
$input = "information:paradigm/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXwAAAEYCAYAAABfgk2GAAAemklEQVR4Xu2dzYsm13WHe7rHxGATtw1Zu8UMY0wIkv6AoF44ZOEspFWyUytkkRASJG0sgS2NPkCKF5qxMSSboNbOu4xJcAxZaJRNlhqRVYaZpPUPSC2wiYmm38k5rS75delW1b1V9+Pcuk9BMR/vrXvPfc6p33veU7eqLu2wQQACEIBAEwQuNTFLJgkBCEAAAjsIPkEAAQhAoBECCH4jjmaaEIAABBB8YgACEIBAIwQQ/EYczTQhAAEIIPjEAAQgAIFGCCD4jTiaaUIAAhBA8IkBCEAAAo0QQPAbcTTThAAEIIDgEwMQgAAEGiGA4DfiaKYJAQhAAMGvJwYeE1OfkP3JC5P3L/48vfjzlvz5nux36pkSlkIAAjkJIPg5ac8b60gOe1n2A8/DT6Tdddnf8WxPMwhAoBECCL5dRx+KaW8HCH1/Jir8T5Hx23UwlkEgNwEEPzdxv/E0q1exj7E9I50cx+iIPiAAgboJIPj2/Kfi/HRks7RPFX62dRLg+s46/Rp9Vgh+dKSLOoyZ2fcNIdNf5BqTB2u8cH3HpGtsGoXg2/HLoZjybmJzHpf+WcWTGHKG7jVWuL6TAfTahkDw7Xj0REz5ZmJzdIxHEo9B92kJxPwVyK++tL4y1zuCb8MlMU/iqRn9nTR4YaoRn5skcCxWcX3HpGvqMArBt+GnHNl9N9ON/GXPxrSxIoBAyqSATD/AETU3RfDLe09XWLyf2Qxq+ZmBLxzuUI7n+s5CiBy+w0vMDQTBs2LDjcx2PCfj3cw8JsPNJ5DjF6COwfWd+T6q4kgy/PJuui0m6DNycm76zB3NG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= imagecreatefromstring(base64_decode($imgData)); imagealphablending($image, true); // setting alpha blending on imagesavealpha($image, truthful); // save alphablending setting //my code works up until this point (I can output a transparent PNG successfully) //this is where I would brand a new image with- //the transparent background and put my transparent PNG on it- //to prep it for imagegif(); //i kinda had some success with: //$make full = imagecolorallocate($image, 255, 250, 214); //imagefill($image, 0, 0, $fill); //just to test if I could actually alter the background.. //but anything similar a circumvolve with a transparent centre would not-- //get filled with transparency and would remain black. //so this obviously isn't the fashion to do it. imagegif($img, 'test.gif');
The end result has to be a GIF preserving the PNG's transparent background.
I'm actually stuck ¬____¬ delight help me.
Thank you in advance for any advice you tin can provide.
Edit: To evidence you an example of why chrislondon's second example does not work, I have drawn a one-half circle and a full circumvolve in this image and then spun information technology through chrislondon's code (resulting in a .GIF image which is what I want):
The (lumpy)black circle is non filled by me, it is just the transparency in the center not showing through. The (lumpy)circle to the right is not completed all the way leaving a gap then the transparency is filled.
I promise this will articulate up any remaining misunderstandings to what I'm trying to accomplish.
Why Is My Gif Background Black?,
Source: https://stackoverflow.com/questions/17010758/black-background-on-gif-instead-of-transparency-in-php-using-imagegif
Posted by: williamsstenly.blogspot.com
0 Response to "Why Is My Gif Background Black?"
Post a Comment