How to read JPEG in .NET

Posting it for Vijay L...
 

How can I read JPEG, GIF and PNG in .NET if I am using J#
< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I know one solution:

I can use System,Drawing.Bitmap to read JPEG/GIF. Use Bitmap to do further processing and then save back as JPEG.

 Problem with this solution:

- Bitmaps take more space than JPEGs.

- This is not an elegant solution,

 Is there any other way I can read these different formats

 Regards,

VJ




Answer this question

How to read JPEG in .NET

  • Jim25_SQL

    JPEG/GIF and others are all just compression formats to store an image.  However, if you want to do any image processing you would first need to uncompress it.

    It's very similar to a zip file.  If you want to do anything with the compressed file, you'd first need to uncompress it, work on it and then save it back.

    There's nothing inelegant in it.


  • DeviPriya

    In memory, everything is a bitmap.  That is what an image is.  JPEG is just the way it is stored on disk.  As soon as you put it in memory (to draw, manipulate), it must be some form of a bitmap.

    Unless your in very tight memory conditions, it won't do you too much good to worry about memory (but, if you were in a tight memory situation, .NET as a whole wouldn't do you a lot of good).

  • How to read JPEG in .NET