Re: do I use fopen or fsockopen to get an image as a stream of bytes?



On 4 Nov 2005 10:05:06 -0800, lkrubner@xxxxxxxxxxxxx wrote:

>Andy Hassall wrote:
>> On 4 Nov 2005 09:42:55 -0800, lkrubner@xxxxxxxxxxxxx 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
>
>Well, I'm groping in the dark here, but I think that
>imagecreatefromstring would give me an actual image, whereas what I
>want is an actual string, and I don't know how to get a string from an
>image file.

That was why I posted the rest of my post, you've stopped reading too early.
--
Andy Hassall :: andy@xxxxxxxxxxx :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
.



Relevant Pages

  • Re: Question about design, defmacro, macrolet, and &environment
    ... "Expects to find the literal string on the stream." ... (defun send (string &optional stream) ... (declaim (inline make-adjustable-string)) ...
    (comp.lang.lisp)
  • Re: Strange problem when not in debugger
    ... private string huidigWeb; ... int buffLength = 2048; ... // Opens a file stream to read the file to be uploaded ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ReplacerStream
    ... string, do a replace on that string and create a stream again to be ... If those are problems, and you are looking just for a single string, it seems to me that you could just read the stream one character at a time, checking to see if it matches the current character in your search string. ...
    (microsoft.public.dotnet.framework)
  • Re: Strange problem when not in debugger
    ... private string huidigWeb; ... int buffLength = 2048; ... // Opens a file stream to read the file to be uploaded ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: HTTP Object and Retrieving HTML Programatically
    ... I had to hardcode some query string and form post values, ... chunks defined by the buffer size ... //create a stream reader grabbing text we get over HTTP ... while (workingbuffersize> 0) ...
    (microsoft.public.dotnet.framework.aspnet)