• Advertisement
Sign in to follow this  

[.net] Problem with compressed images !!

This topic is 4359 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, i am writing a program which will open DICOM images(used in medical domain). Problem is that they are sometimes compressed using various compression methods like jpeg_lossless,lossy...etc. I am making my project in C# and wanted some info on whether >net contains any libraries to deal with compressed images? Currently i am targetting "Jpeg lossless" . thanx a lot in advance :) bye mishal

Share this post


Link to post
Share on other sites
Advertisement
You can load jpg and some other formats with the following function:
public static Image FromFile ( string filename )
But you have no access to the low level decompressing functions.
There are two classes in the namespace System.IO.Compression, they Provide methods and properties for compressing and decompressing streams using the Deflate algorithm but that is not really helpful for image decompression!

Share this post


Link to post
Share on other sites
you may want to check out the FreeImage library:
http://freeimage.sourceforge.net/

it is open source with an active forum. i don't know if it supports the image formats you need but you may find help in the forum.

they also have a .NET wrapper.
i use FreeImage under .NET all the time and it works very well.

Share this post


Link to post
Share on other sites

.net supports the image formats defined in System.Drawing.Imaging.ImageFormat,
so:

bitmap
emf
exif
gif
icon
jpeg
png
tiff
wmf

My understanding is that when you call System.Drawing.Image.FromStream(stream) if will determine the image format itself, and load it accordingly. I am not sure you can manually specify the image format when you load it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement