By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,912 Members | 1,723 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,912 IT Pros & Developers. It's quick & easy.

Invoking IJG JPEG LIB from C#

P: n/a
Greetings,

We are writing an application wherein we have to display jpeg images,
we are thinking of using the IJG JPEG LIB written in C code. Will be
greatfull if someone could guide us as to how we can invoke or use the
IJG LIB through C#.
Thanks in Advance
MasooD

Dec 5 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Masood wrote:
Greetings,

We are writing an application wherein we have to display jpeg images,
we are thinking of using the IJG JPEG LIB written in C code. Will be
greatfull if someone could guide us as to how we can invoke or use the
IJG LIB through C#.
Don't bother. Windows forms can already display JPEG images just fine. I'm
pretty sure that winforms (via GDI+) actually uses the IJG code - or
something better - under the covers.

See the System.Drawing.Image.FromFile (or .FromStream) methods for creating
an Image from a JPEG file (or stream). If you have the bits of a JPEG image
(e.g. from a database), simply wrap the buffer holding the bits in a
MemoryStream and then use Image.FromStream to decode the JPEG image.

-cd
Dec 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.