Avatar of canuckconsulting
canuckconsulting
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

Determine size of image in memory

I have a .Net 4 Windows Forms project created with Visual Studio 2010 using c#.

I need to open an image file (jpg or gif) and resize the dimensions to a fixed size and then adjust the quality of the image until the image size is 30kb or less. Is there a way to calculate the memory used by this image while in memory?  I don't want the overhead of saving it to disk to check System.IO.FileInfo.  I would be happy to use a free library or utility which would help.

Scott
.NET ProgrammingC#Images and Photos

Avatar of undefined
Last Comment
Carlos Villegas

8/22/2022 - Mon