Ask Your Question
0

Getting JPG Image Data

asked 2014-02-27 12:11:44 -0600

dondan1976 gravatar image

updated 2014-02-27 12:27:37 -0600

berak gravatar image

Hello there, Is it possible that i can get the JPG data for a image? I know it's possible to get the Image Data, but what i want is the complete data with the header and everything as per JPG format.

So am expecting something like,

unsigned char* pJpgData = cvGetJpgData(img); // where "img" is a Iplimage* or CMat

Thanks

edit retag flag offensive close merge delete

Comments

Do you mean for a JPG image that you are loading, or have loaded as Mat?

Will Stewart gravatar imageWill Stewart ( 2014-02-27 13:35:15 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-02-27 12:26:45 -0600

berak gravatar image

imencode does exactly that.

(and please, stop living under a rock, get rid of the deprecated c-api)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-02-27 12:11:44 -0600

Seen: 140 times

Last updated: Feb 27 '14