Mantis - Squeak
Viewing Issue Advanced Details
7777 Network minor always 07-12-13 22:15 07-12-13 22:15
tim  
 
normal  
new 4.4  
open  
none    
none  
0007777: HTTPSocket httpJpeg: & httpGif: use archaic api for image decoding
HTTPSocket methods httpGif: & httpJpeg: seem to use rather archaic messages to get the images decoded.

I suspect that it would be cleaner to replace
httpJpeg: url
    "Fetch the given URL, parse it using the JPEG reader, and return the resulting Form."

    | doc ggg |
    doc := self httpGet: url.
    doc binary; reset.
    (ggg := JPEGReadWriter new) setStream: doc.
    ^ ggg nextImage.

with something more like
httpJpeg: url
    "Fetch the given URL, parse it using the JPEG reader, and return the resulting Form."

    | doc |
    doc := self httpGet: url.
    doc binary; reset.
    (ImageReadWriter formFromStream: doc) nextImage.

for example

There are no notes attached to this issue.