Re: Imagick question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brady Mitchell wrote:
I'm sure it can be done, but without seeing your code we can't really help.
Easily solved. From the PHP manual (http://www.php.net/manual/en/function.imagick-roundcorners.php):

     <?php

       $image = new Imagick();
       $image->newPseudoImage(100, 100, "magick:rose");
       $image->setImageFormat("png");

       $image->roundCorners(5,3);
       $image->writeImage("rounded.png");
     ?>

That produces a nice transparent cornered image, as it should. However, try saving it as a JEPG instead. Set the image format to 'jpeg' and write it out as 'rounded.jpg' and you'll notice the corners are now black.

I know JPEG doesn't support transparency, that's fine. What I want is to change the black to white instead.

   -- A

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux