Click here to Skip to main content
16,007,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: load jpg file in C++ Pin
Chris Losinger8-Mar-07 15:43
professionalChris Losinger8-Mar-07 15:43 
GeneralRe: load jpg file in C++ Pin
cedance8-Mar-07 16:38
cedance8-Mar-07 16:38 
GeneralRe: load jpg file in C++ Pin
cp98768-Mar-07 17:03
cp98768-Mar-07 17:03 
GeneralRe: load jpg file in C++ Pin
cedance8-Mar-07 17:19
cedance8-Mar-07 17:19 
GeneralRe: load jpg file in C++ Pin
cp98768-Mar-07 18:02
cp98768-Mar-07 18:02 
AnswerRe: load jpg file in C++ Pin
Paresh Chitte8-Mar-07 17:37
Paresh Chitte8-Mar-07 17:37 
GeneralRe: load jpg file in C++ Pin
cedance8-Mar-07 17:54
cedance8-Mar-07 17:54 
GeneralRe: load jpg file in C++ Pin
Mark Salsbery8-Mar-07 18:30
Mark Salsbery8-Mar-07 18:30 
So you want to load and decompress the image, and THEN do some processing on the pixels?

The CImage class can help

#include <atlimage.h>
...
CImage image;
image.Load("C:\\TEST.JPG");

Then you can use
image.GetWidth()/image.GetWidth() to get the image dimensions in pixels
image.GetBPP() to get the bits-per-pixel
image.GetPitch() to get the bytes-per-row in the pixel data
image.GetBits() to get a pointer to the RGB pixel data


"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")

GeneralRe: load jpg file in C++ Pin
cedance8-Mar-07 19:47
cedance8-Mar-07 19:47 
GeneralRe: load jpg file in C++ Pin
Paresh Chitte8-Mar-07 18:34
Paresh Chitte8-Mar-07 18:34 
GeneralRe: load jpg file in C++ Pin
cedance8-Mar-07 19:49
cedance8-Mar-07 19:49 
GeneralRe: load jpg file in C++ Pin
Paresh Chitte8-Mar-07 20:05
Paresh Chitte8-Mar-07 20:05 
AnswerRe: load jpg file in C++ Pin
Paresh Chitte8-Mar-07 21:07
Paresh Chitte8-Mar-07 21:07 
QuestionStrange private boolean member behaviour inside a public function (long question) Pin
Joan M8-Mar-07 10:37
professionalJoan M8-Mar-07 10:37 
QuestionRe: Strange private boolean member behaviour inside a public function (long question) Pin
Mark Salsbery8-Mar-07 12:14
Mark Salsbery8-Mar-07 12:14 
AnswerRe: Strange private boolean member behaviour inside a public function (long question) Pin
Joan M8-Mar-07 20:06
professionalJoan M8-Mar-07 20:06 
GeneralRe: Strange private boolean member behaviour inside a public function (long question) Pin
Mark Salsbery9-Mar-07 6:47
Mark Salsbery9-Mar-07 6:47 
GeneralRe: Strange private boolean member behaviour inside a public function (long question) Pin
Joan M9-Mar-07 7:00
professionalJoan M9-Mar-07 7:00 
Questionfread switching endianness on unformatted binary file Pin
regzim8-Mar-07 9:42
regzim8-Mar-07 9:42 
QuestionRe: fread switching endianness on unformatted binary file Pin
David Crow8-Mar-07 9:52
David Crow8-Mar-07 9:52 
AnswerRe: fread switching endianness on unformatted binary file Pin
Chris Losinger8-Mar-07 11:10
professionalChris Losinger8-Mar-07 11:10 
GeneralRe: fread switching endianness on unformatted binary file Pin
regzim8-Mar-07 19:01
regzim8-Mar-07 19:01 
GeneralRe: fread switching endianness on unformatted binary file Pin
cp98768-Mar-07 19:27
cp98768-Mar-07 19:27 
GeneralRe: fread switching endianness on unformatted binary file Pin
Chris Losinger9-Mar-07 1:14
professionalChris Losinger9-Mar-07 1:14 
GeneralRe: fread switching endianness on unformatted binary file Pin
regzim9-Mar-07 8:16
regzim9-Mar-07 8:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.