This documentation is for the old version. Go to the latest Graphics Mill docs

Working with URL

With Graphics Mill for .NET you can load files not only from files or database. You can even download images from specified URL. The code example below demonstrates it.

The idea is very simple: you should use some object which can open a System.IO.Stream over the specified URL and pass this stream into the Save method of the Bitmap class. It will make Graphics Mill for .NET to download this image and decompress it.

Visual Basic
Dim webClient As New System.Net.WebClient

Dim stream As System.IO.Stream = webClient.OpenRead( _

Dim bitmap As New Aurigma.GraphicsMill.Bitmap(stream)


Aurigma.GraphicsMill.Bitmap bitmap = null;

using (System.Net.WebClient webClient = new System.Net.WebClient())
    using (System.IO.Stream stream = webClient.OpenRead(
        bitmap = new Aurigma.GraphicsMill.Bitmap(stream);