2009/7/22 Brian Mason <[email protected]>

>  I am trying to take an image off the new and save it to a file.  This is
> what I have so far:
>
>
>
> (FileStream newFileNamed: 'test.jpg')
>
>                 nextPutAll: ('http://freetalklive.com/images/amondson.jpg'
> asUrl retrieveContents) getContentFromStream;
>
>                 close
>
>
>
> The image exists, is found, and the file is written.  There is something
> wrong with the format of the local jpg.
>

I've already replied to this, but it looks like the email got stuck in the
tubes somewhere...

Your stream needs to be binary:



(FileStream newFileNamed: 'test.jpg') binary;

                nextPutAll: ('http://freetalklive.com/images/amondson.jpg'
asUrl retrieveContents) getContentFromStream;

                close


Gulik.


-- 
http://gulik.pbwiki.com/
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to