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-----
[Back to original message]
|