Compressing IplImage to JPEG using libjpeg in OpenCV -
So I have this problem. I have an ipype that I have to compress with JPEG and do something with it "libus Input colorspace goes to the function of jpeg_start_compress () with an error when it use libzpeg8b.The code exhaust. Here's my code. #include "highgui.h" #include & lt; Stdio.h & gt; #include "jpeglib.h" #include "cv.h" # Include & lt; Iostream & gt; # Include & lt; Fstream & gt; using namespace std; Using namespace cv; #pragma Comment (lib, "jpeglib.lib") bool ipl2jpeg (IplImage * frame, unsigned char ** outbuffer, unsigned long * outlen) {IplImage * img = new IplImage; Memcpy (img, frame, frame & gt; n shape); Unsigned four * outdata = (uchar *) img- & gt; Image data; Struct jpeg_compress_struct cinfo = {0}; Struct jpeg_error_mgr Ger; JSAMPROW row_ptr [1]; Int row_stride; * Outbuffer = Faucet; * Outlines = 0; Cinfo.err = jpeg_std_error (& jerr); Jpeg_create_compress (& amp; cinfo); Jp...