Search found 3 matches

by appel
2014-02-13T10:22:27-07:00
Forum: Users
Topic: PNG8 semi-transparent pixel matte
Replies: 5
Views: 2925

Re: PNG8 semi-transparent pixel matte

I managed to find the secret to this, a method called Imagick::paintTransparentImage()

<?php
$width = 200;
$height = 40;
$text = "Hello world";

$image = new Imagick();
$image->newImage($width, $height, new ImagickPixel('#000000'));
$image->setImageFormat('png8');

$draw = new ImagickDraw ...
by appel
2014-02-13T08:53:10-07:00
Forum: Users
Topic: PNG8 semi-transparent pixel matte
Replies: 5
Views: 2925

Re: PNG8 semi-transparent pixel matte

Thanks a lot for that.

I'm not really so clever using the command line, seems to obscure. How would that translate to php functions?

Here's my experiment code:

<?php
$width = 100;
$height = 20;
$text = "Hello world";

$image = new Imagick();
$image->newImage($width, $height, new ImagickPixel ...
by appel
2014-02-13T05:01:56-07:00
Forum: Users
Topic: PNG8 semi-transparent pixel matte
Replies: 5
Views: 2925

PNG8 semi-transparent pixel matte

I'm trying to make semi-transparent pixels output with a matte color (black in my case).

Currently when I output an image as 'png8' all pixels that are not 100% opaque will appear as fully transparent!

What I want is twofold:
1) 100% transparent pixels remain 100% transparent
2) pixels that are ...