Ant
no notes

GDI Error and Images loaded via a stream

Part of the improvements to Cropper was to save a thumbnail of the image in the CropSet file. This meant loading was dramatically improved as it didn't have to load the original and make a thumbnail each time.

However, it seems an image loaded using the FromStream method will keep the stream alive during the life time of the image (see link)
http://support.microsoft.com/Default.aspx?id=814675

So, attempting to save it to another stream will cause the Generic GDI+ error.

The way around, as suggested by MS, is to create a copy of the image. They have given two ways of doing this, I don't know which is best, but I've chosen the first.

Post a Note

(required)

(required never shown)

On Twitter Follow MrAntix on Twitter

1 hours ago
TheNextWeb
Bing's search API now live on the Windows Azure Marketplace http://t.co/utX8uOuG by @alex

15/05/2012
WindowsAzure
Announcing the MEET Windows Azure Event! Streamed online June 7th. Register at http://t.co/bObzTAuL  #MEETAzure #WindowsAzure

One hour ago
commadelimited
Buy the @amazon Kindle version of mine and @cfjedimaster's @jquerymobile book for $10 today: http://t.co/PWRZ2dkd

just now
kamoswin
Microsoft Corporation : Pariveda Solutions Builds Cloud Applications on Windows Azure - 4-traders... http://t.co/M5o5TxdL #cloud #azure

just now
TeChameleon
RT @msPartner: Bob Kelly offers details on Microsoft’s #cloud strategy: http://t.co/GECtwycA  via @rcpmag #Azure #mspartner ^NW