jpg woes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

jpg woes

Smalltalkman

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 would appreciate some guidance.

 

 

"You can have everything you want if you just help enough other people get what they want." - Zig Zigglar

 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: jpg woes

Michael van der Gulik-2


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

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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project