Re: opening jpeg file in c++
- From: drew@xxxxxxxxxxxxxx (Drew Lawson)
- Date: Fri, 31 Oct 2008 16:58:39 +0000 (UTC)
In article <e6c987b9-0e0f-443c-ade7-9547ad8ea804@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
mohi <mohangupta13@xxxxxxxxx> writes:
hello everyone ,
i am trying to read a jpeg image through c++ but is unable to do so ,
presently i tried it with code in c as i use something like ;
[snip code]
Eric already covered the size/order issue that I was going to point
out.
I played with writing some jpeg code a few months back, and I can't
help but wonder whether that might be too big of a project for the
ability level that I think you are at. It's a great data handling
project, but not if it completely overwhelms you.
If you have a practical need, rather than a learning project, I
found jpeglib to be easy to learn (http://www.ijg.org/).
but the problem is the if condition never evalutes to true as i know
that according to the jpeg standard there should be market with value
0xFFD8 and others also .....and also the printf() of integer 'c' as
hex is never displayed it just displays a blank ..
A good thing to try with problems like this is to print out what
you are reading as it is processed. You are only printing after
the loop, so you don't know what you are getting in the loop.
Sometimes seeing the values is all it takes to make it clear what
is going wrong. That's especially true (for me) for spotting byte
order problems.
--
Drew Lawson | Savage bed foot-warmer
| of purest feline ancestry
| Look out little furry folk
| it's the all-night working cat
.
- Follow-Ups:
- Re: opening jpeg file in c++
- From: Malcolm McLean
- Re: opening jpeg file in c++
- References:
- opening jpeg file in c++
- From: mohi
- opening jpeg file in c++
- Prev by Date: Re: opening jpeg file in c++
- Next by Date: Re: dynamically allocate array variable of type LPWSTR
- Previous by thread: Re: opening jpeg file in c++
- Next by thread: Re: opening jpeg file in c++
- Index(es):
Relevant Pages
|