How to decode a portion of a JPEG file in C#

Hi All

I was wondering if this is possible. I am dealing with very large images and I often run into out of memory exceptions etc. etc. Most of the time I have to read it into photoshop to reduce the size to something manageable for .net.

I am only every interested in a portion of the image, so I was wondering is it possible to only read in to a byte array for example only the portion of the image that I am interested in rather than the whole thing?

Thanks
LVL 4
erik_nodlandAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

greatsubashCommented:
Please Refer the following link,
http://www.codeproject.com/KB/GDI/2D-DCT.aspx
0
TiberiuGalCommented:
Hi,
You could use a freeware application like irfanview to crop/resize your images, it offers batch processing as well.
0
erik_nodlandAuthor Commented:
Hi

greatsubash: Thanks for the link. I have taken a look at the project and unfortunately it still requires you to load the image fully first. I need a way of only loading a specific portion of the image without enitrely loading the image first.

Tiberiugal: I do use irfanview but it wont handle the image sizes that I need. And I would also need to programmatically crop the image.

Thanks again both
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.