![]() ![]() So - it was interesting, but I have to go now and search for another workaround instead to display my transparent thumbnails on a non-bundled system. Everytime I think, it works - the images on the other host have artefacts or turn black. Your library has a lot of useful functions. ![]() It was very interesting to learn a lot about the gd extension and about transparent gif Nice work. I tried a rewrite with this approach, fixed the 1bit-white-bug - and lost the transparency in thumbnails again (crop + resize = 2x truecolorimage = weird_imagecolortransparent). It also loses transparency with 1bit-transparent-white gif files. merge multiple sub-images as that requires the use of a non-simple image operation. Next, click on Select on the left-hand side of the bar located at the top of your page. But it turns black when calling crop and resize in one run. The transparency (alpha) channel of an image is completely optional. Here’s how to do it using Windows 10: Open the image you wish to use in Paint on your computer. It looks nice, crop and resize work on bundled and libgd. I found a very simple gd image class to crop and resize and I wanted to know, how the author fixed the gif transparency issue ( docs). The color palette was bigger with a few gray values. Not sure about this, but I realized a difference when rotating a black square with Illustrator and exporting it. So the position of the original transparent pixel moves, too. They have no effect on gif filesĪ theory, why rotate leads to losing transparency: If you rotate a black rectangle, the edges turn gray and the whole color palette moves/gets bigger. Imagesavealpha and imagealphablending are for png files. without imagepalettetotruecolor detecting imagecolortransparent works, but all imagefilters don't work anymore.detecting the transparent color with imagecolortransparent doesn't work (correct) anymore.Gif files don't have alpha channels, they have one color in the palette, which is used as alpha. I digged again into the code and I want to share my conclusions and theories. But I'm very limited to a small set of test hosts.Ĭan you point me in a direction, please? Otherwise I would try to write a workaround for my specific needs and wait/hope for a fix in an upcoming PHP version with libgd 2.2.6. I can do some more tests with other functions, too. Adding a check for gif and png in the crop function would be easy. This is probably not enough to write a consistent version check. And I want to achieve this goal soon.Įverything I know about gd is what I read about it today and 4 days ago. The next steps would be to publish a new SimpleImage release 3.3.4 so Cockpit CMS can be updated via composer dependencies and I can use my favourite web hoster. My goal is to fix (all) transparent gif and png issues - at least in the crop function. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |