You are here: Re: do I use fopen or fsockopen to get an image as a stream of bytes? « PHP Programming Language « IT news, forums, messages
Re: do I use fopen or fsockopen to get an image as a stream of bytes?

Posted by lkrubner on 11/04/05 21:03

Andy Hassall wrote:
> On 4 Nov 2005 09:42:55 -0800, lkrubner@geocities.com wrote:
>
> >How do I get an image like that, as a stream of bytes? Which function
> >do I use?
>
> Where are you getting it from?
> What format is the image in?
>
> You probably want a sequence of:
>
> http://uk.php.net/file_get_contents - get the image from a file or URL
>
> http://uk.php.net/imagecreatefromstring - create a GD image object
>
> http://uk.php.net/manual/en/function.imagesx.php
> http://uk.php.net/manual/en/function.imagesy.php
> http://uk.php.net/manual/en/function.imagecolorat.phplysis tool

I guess, to some extent, I wish there was a character encoding called
"binary". So I could tell the browser to show me the raw binary bytes
of the image.

I notice that IE renders the image as an image, when I echo just the
image and nothing else.

 

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

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