Image icon indicating copy to clipboard operation
Image copied to clipboard

Image png distort

Open thiagopr opened this issue 9 years ago • 4 comments

png Image distort after open by fromData method.

use Gregwar\Image\Image; require "vendor/autoload.php";

$content = file_get_contents('image-png.png'); echo '<img src="'.Image::fromData($content)->cacheFile('png').'"><br><br>';

Result: demo

original image: image-png

Thanks!

thiagopr avatar Apr 30 '16 17:04 thiagopr

Hello Do you have the sale issue with ::open?

Gregwar avatar Apr 30 '16 17:04 Gregwar

Hello, No, with ::open work fine, but i can't use ::open because of the image (content) is stored on database.

-----Mensagem Original----- De: "Grégoire Passault" [email protected] Enviada em: ‎30/‎04/‎2016 14:58 Para: "Gregwar/Image" [email protected] Cc: "Thiago Oliveira" [email protected]; "Author" [email protected] Assunto: Re: [Gregwar/Image] Image png distort (#113)

Hello Do you have the sale issue with ::open? — You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

thiagopr avatar Apr 30 '16 18:04 thiagopr

Hi all,

Any answer ? method fromData can't support transparent PNG ?

Thanks

LoicLEMEUT avatar Jan 31 '18 13:01 LoicLEMEUT

When $content is the string (file_get_contents) of my transparent PNG Image:

Don't work: $image = GregwarImage::fromData($content);

This work: $image = GregwarImage::fromResource(imagecreatefromstring(content));

LoicLEMEUT avatar Jan 31 '18 14:01 LoicLEMEUT