You are here: Re: outputing image directly to browser « PHP Programming Language « IT news, forums, messages
Re: outputing image directly to browser

Posted by Edward Z. Yang on 06/08/07 01:07

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jon Slaughter wrote:
> I created an image using gd and when I do imagepng I just get the binary
> data for the image written as text instead of the image itself. Now I'm
> writing the file to a temp file and using html to load the temp but seems
> like a waste of cycles and space ;/

The data: URI scheme was created with this sort of functionality in
mind, but it is not supported by many browsers and not recommended.

What you should be doing is caching the generated image files and
referencing those using <img>. Not a waste of cycles at all!

- --
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <htmlpurifier.org> Anti-XSS HTML Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGaKvnqTO+fYacSNoRAsNiAJ9o/tgwCoDEd63XnDGqoCeaNcsA2gCdEHfa
zrRmQ3s2dXQY23YsXhJ2CQk=
=UYap
-----END PGP SIGNATURE-----

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация