Sign in to follow this  

[.net] Problem with compressed images !!

Recommended Posts

mishal153    116
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
Kambiz    758
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
dirtyharry    122
you may want to check out the FreeImage library:

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
RipTorn    722

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


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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this