Re: [PHP] Difference between imagegif/imagejpeg sending to browser - saving to file?

2008-05-08 Thread zyro

Lo again,

found my mistake.. in fact, it was the hex-to-rgb conversion not working
properly in some cases.

[SUBJECT CLOSED]


zyro wrote:
 
 Hello together,
 
 I stumbled onto a curious problem:
 i am generating a jpeg/gif with the imagejpeg/imagegif functions (type
 does not alter the result).
 
 Example color #ff: The hexToRGB coversion etc is all working fine.
 The image (if its send directly to the browser via header and
 imagegif/imagejpeg) is displayed 100% correctly.
 But if i save it to a file on the servers file system, the red above gets
 lime green. And not only those two colors are bugged: It looks like the
 whole palette gets scrambled up ???
 
 So my question: Is there a-n-y difference between sending and saving the
 image?
 Or do I have to do some additional work before an image can be saved
 correctly? php func reference says something about using
 imagecolortransparent() on the image first to achieve the 89a format (in
 case of gif) but again: This does not alter the result either. Also,
 transparency is not needed at this point but used in images that are
 merged (gifs) to achieve the final result.
 
 Another interesting point:
 - generated image sent to browser, properties: ~3kb
 - generated image, saved in filesys, properties: ~15kb
 What explains that diff in filesize?
 
 Thanks for your help,
 
 greets,
 
 zyro
 

-- 
View this message in context: 
http://www.nabble.com/Difference-between-imagegif-imagejpeg-sending-to-browser-%3C-%3E-saving-to-file--tp17078670p17123492.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



[PHP] Difference between imagegif/imagejpeg sending to browser - saving to file?

2008-05-06 Thread zyro

Hello together,

I stumbled onto a curious problem:
i am generating a jpeg/gif with the imagejpeg/imagegif functions (type does
not alter the result).

Example color #ff: The hexToRGB coversion etc is all working fine. The
image (if its send directly to the browser via header and
imagegif/imagejpeg) is displayed 100% correctly.
But if i save it to a file on the servers file system, the red above gets
lime green. And not only those two colors are bugged: It looks like the
whole palette gets scrambled up ???

So my question: Is there a-n-y difference between sending and saving the
image?
Or do I have to do some additional work before an image can be saved
correctly? php func reference says something about using
imagecolortransparent() on the image first to achieve the 89a format (in
case of gif) but again: This does not alter the result either. Also,
transparency is not needed at this point but used in images that are merged
(gifs) to achieve the final result.

Another interesting point:
- generated image sent to browser, properties: ~3kb
- generated image, saved in filesys, properties: ~15kb
What explains that diff in filesize?

Thanks for your help,

greets,

zyro
-- 
View this message in context: 
http://www.nabble.com/Difference-between-imagegif-imagejpeg-sending-to-browser-%3C-%3E-saving-to-file--tp17078670p17078670.html
Sent from the PHP - General mailing list archive at Nabble.com.


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