Re: opening jpeg file in c++



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
.



Relevant Pages

  • Re: saving series of "*.jpg" in a for loop
    ... and save them as JPEG images. ... in JPEG format. ... Also, unless you change colormap in the loop, put it outside the loop. ...
    (comp.soft-sys.matlab)
  • Re: Anyone install Nikon Capture NX yet?
    ... What advantage would there be to saving a jpeg image as RAW? ... The ONLY thing I might need CS2 for is the clone tool and if I ...
    (rec.photo.digital)
  • www.CeBeans.com - new program listings - Nov 30 2009
    ... This program allows you to select a JPEG image and converts to a monochrome ... The JPEG libraries are from Independent JPEG Group. ... The new bitmap file is written to the storage folder. ...
    (microsoft.public.pocketpc)
  • www.CeBeans.com - new program listings - Nov 23 2009
    ... This program allows you to take customized JPEG screen shots of your ... The JPEG libraries are from Independent JPEG Group. ... file to convert it to a JPEG image and send as an email attachment. ...
    (microsoft.public.pocketpc)
  • Re: Telepathology and DICOM
    ... Microscope with digital camera for telepathology application. ... camera will give JPEG output. ... You can use the JPEG encoder to wrap the DICOM layer around the JPEG image and then use the other tools to send them to a specific IP address ... The only reason for using DICOM is to store patient and other information in the same file as the JPEG, if you do not care about patient informatin or information related to the subject etc etc then just send the JPEG image and use the EXIF additional tag information to ...
    (comp.protocols.dicom)