Skip to content

Instantly share code, notes, and snippets.

@olekscode
Created January 10, 2023 18:26
Show Gist options
  • Save olekscode/93a109d76c39eeae50417fe576e0f36a to your computer and use it in GitHub Desktop.
Save olekscode/93a109d76c39eeae50417fe576e0f36a to your computer and use it in GitHub Desktop.
url := 'http://192.168.27.64:8080/shot.jpg'.
client := ZnClient new
url: url;
yourself.
imagePresenter := SpImagePresenter new.
imagePresenter autoScale: true.
imagePresenter open.
keepRunning := true.
[ [ keepRunning ] whileTrue: [
response := client
get;
response.
bytearray := response contents.
form := ImageReadWriter formFromStream: bytearray readStream.
imagePresenter image: form ] ] fork.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment