Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Domain/Patrocinador.cs @ 278:6f5ab71614d4
#125: ABM de patrocinadores.
author | juanjose.montesdeocaarbos |
---|---|
date | Wed, 21 Dec 2011 08:47:05 -0300 |
parents | 72a96459f910 |
children | 9bc60d166c8a |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Domain/Patrocinador.cs Tue Dec 20 08:28:33 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Domain/Patrocinador.cs Wed Dec 21 08:47:05 2011 -0300 @@ -19,10 +19,12 @@ public virtual void LoadLogo(string path) { - var image = Image.FromFile(path); - var ms = new MemoryStream(); - image.Save(ms, image.RawFormat); - Logo = ms.ToArray(); + using (var image = Image.FromFile(path)) + { + var ms = new MemoryStream(); + image.Save(ms, image.RawFormat); + Logo = ms.ToArray(); + } } } } \ No newline at end of file