You are here: Re: Creating an image file with only PHP « PHP Programming Language « IT news, forums, messages
Re: Creating an image file with only PHP

Posted by Justin Koivisto on 10/08/02 11:31

Peter Jay Salzman wrote:
> Is it possible to create an image file from a string using only functions
> from core PHP (in other words, without 3rd party libraries/applications)?
>
> I'm interested in any image file that is displayable without plugins or
> helper applications, like jpg, png, gif.
>
> Thanks!

http://us2.php.net/manual/en/ref.image.php
"Note: Since PHP 4.3 there is a bundled version of the GD lib. This
bundled version has some additional features like alpha blending, and
should be used in preference to the external library since its codebase
is better maintained and more stable."

Therefore, if you are using php 4.3 or better, the functions are there.
You'd need to test for supported types and such since I believe it does
depend on what the server system supports. I usually use things like

if(function_exists('imagepng'))

to check if a certain type is supported on the server.
http://us2.php.net/manual/en/function.function-exists.php

HTH

--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com

 

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

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