Sam,
File size totally depends on what you're working with. For text and
graphics, PNG is significantly smaller than JPEGs that have quality
settings anywhere near close to looking similar. For other things, it's
tricky.
Certainly, reducing the number of colors is a good way to cut file
size.
Hi Galen,
Thanks for that - all sorted now. I had looked at
imagetruecolortopalette, but had not taken it on board. I'm now using
it as follows to get a balance between image quality and file size (for
png output):
imagetruecolortopalette ( $myImage, true, 64);
It's just remarkable how much
Sam,
OK, sorry, I only had a few moments before. Let's see if this points
you in the right direction.
Basically, you can have "standard" 8-bit images ("color") and then
"true" color images (24 bit). When you "create" the GD image resource,
you use a function to do that. One such function is
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 fun
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
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
lightweigh
6 matches
Mail list logo