Hi Galen,

Many thanks for your reply. I tried to find things in the php manual relating to bit depth, but I didn't find anything relevant:

http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF-8&oe=UTF-8&q=site:www%2Ephp%2Enet+bit+depth

I haven't read every single one of the image functions in detail, but I did look through them all, and at the moment I can't see anything that allows me to manipulate the bit depth. The closest thing I can see is the imagecolorstotal function which returns the number of colors in the specified image's palette.

Apologies if I'm missing something obvious, but if anybody knows about a specific function that does this I'd be very interested to hear about it.

Many thanks in advance.

CHEERS> SAM

Galen wrote:

IIRC, the goal of PNG is lossless output and it outputs that exactly with PHP. What you send is what you get out. When you're using GD, I suggest you make an 8 bit GD image resource, then make that into PNG. There are several functions dealing with converting bit depth and such, poke around the GD image reference section in the PHP manual.

Sorry if this is too vague, it's all off the top of my head but I think it will give you enough to go on.

-Galen

On May 14, 2004, at 3:05 PM, Sam Joseph wrote:

Hi all,

I've recently got the GD libraries set up and working with php and I have been resizing and reformating images to my hearts content.
One thing I notice however is that when I output png images they seem by default to come out in the larger size PNG32 format, as opposed to the lightweight PNG8 format that I would prefer.


I've checked the archives and googled and found no direct reference to this issue.

If anybody can tell me how to adjust the png output format php I'd be very grateful. Although I have the feeling that this might well require hacking away at the gd source ....

Thanks in advance.

CHEERS> SAM

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





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



Reply via email to