downloading jpeg using python--extra bytes?
.:|:.
ng at hardlight.couk.com
Mon Apr 10 22:40:38 EDT 2000
More information about the Python-list mailing list
Mon Apr 10 22:40:38 EDT 2000
- Previous message (by thread): downloading jpeg using python--extra bytes?
- Next message (by thread): downloading jpeg using python--extra bytes?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Gabriel,
> The script works, with one exception: the jpeg image has
> extra bytes in it that corrupt the file. I'm not sure exactly
> how the bytes are dispersed, but they're not all at the
> beginning or at the end.
> g = open("myjpeg.jpg","w")
I can only presume you are in an MS-DOS environment where you need to use
g = open("myjpeg.jpg","wb")
instead of
g = open("myjpeg.jpg","w")
otherwise linefeeds are converted into carriage return / linefeed pairs
(it does tell you this in the manual page for open :-)
Matt
- Previous message (by thread): downloading jpeg using python--extra bytes?
- Next message (by thread): downloading jpeg using python--extra bytes?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list