<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
<div>What about ...</div><div><br></div>Form fromBinaryStream: (WebClient httpGet: 'https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Squeak-x11.png/617px-Squeak-x11.png') contentStream.<div><br></div><div>... I think we should add a #fromUrl: besides Form class >> #fromFileNamed: and there distinguish between file paths and HTTP urls etc:</div><div><br></div><div><span style="font-size: 13.3333px">Form fromUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Squeak-x11.png/617px-Squeak-x11.png'.</span></div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
<p style="color: #AAAAAA; margin-top: 10px;">Am 21.03.2019 11:51:58 schrieb H. Hirzel <hannes.hirzel@gmail.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">Hello<br><br>What is a good modern way in Squeak to load a picture from the web?<br><br>I am looking for an equivalent of<br><br>| pngPicURL aStream |<br><br>pngPicURL := 'https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Squeak-x11.png/617px-Squeak-x11.png'.<br><br>aStream := HTTPSocket httpGet: pngPicURL.<br><br>(ImageReadWriter formFromStream: aStream) asMorph openInHand<br><br>And answer or just comments are welcome.<br><br>Thank you.<br><br>Kind regards<br><br>Hannes<br><br></div></blockquote>
</div></body>