Another approach is to set up a web server and to load the image via the localhost <img src='http://localhost/img.jpg'>
. This prevents creating temporary images images on disk.
If you don't want to deal with a web server, simple image tiling combined with the mentioned data URI parameter would work. A single tile can be obtained by:
Rectangle region = new Rectangle(x, y, tileWidth, tileHeight);
Bitmap tile = sourceBitmap.Clone(region, sourceBitmap.Clone.PixelFormat);
You just repeat the tile generation for varying parameters of Rectangle region
until you have covered the complete source image. You might try out which tileWidth
and tileHeight
are appropriate to result in tiles with data size lower than 32kB.