Re: Difference between imagegif/imagejpeg sending to browser <-> saving to file?

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

 



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 "#ff0000": 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


[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