Hello, I have an issue using the library in a C++ project. I am using the following code:
const int JPEG_QUALITY = 75;
const int COLOR_COMPONENTS = 3;
int _width = 1920;
int _height = 1080;
long unsigned int _jpegSize = 0;
unsigned char* _compressedImage = NULL;
GLubyte data = (GLubyte)malloc(3 * PROPERTY__WIDTH * PROPERTY__HEIGHT);
glReadPixels(0, 0, PROPERTY__WIDTH, PROPERTY__HEIGHT, GL_RGB, GL_UNSIGNED_BYTE, data);
tjhandle _jpegCompressor = tjInitCompress();
tjCompress2(_jpegCompressor, data, _width, 0, _height, TJPF_RGB, &_compressedImage, &_jpegSize, TJSAMP_444, JPEG_QUALITY,TJFLAG_FASTDCT);
ofstream myfile;
myfile.open ("test.jpg");
myfile << _jpegCompressor;
myfile.close();
tjDestroy(_jpegCompressor);
tjFree(_compressedImage);
Successfully built the library using the instructions in BUILD.txt and am linking my project in Eclipse IDE to build/.libs/libturbojpeg.a
When trying to execute tjCompress2(), i'm getting the following output and the app crashes:
"No source available for "jsimd_extrgb_ycc_convert_sse2.columnloop() at 0x47077e"
I am getting the same source missing issue with non SIMD build, only this time it's rgb_ycc_convert() method that is missing.
What am I doing wrong?!
No clue. Have you tried our pre-built binaries? If those work, then there is something wrong with how you are building libjpeg-turbo. There is little I can do to diagnose that unless you provide specific information about the platform you are building on, the exact steps you are using to build, etc. Suffice it to say that others aren't having these issues, so I really suspect that this is not a bug. Have you tried actually installing the libjpeg-turbo libraries before linking against them? libtool does some things during installation, so perhaps linking with the libs directly out of the build directory is causing problems.
Also, any query that ends in "what am I doing wrong?" is typically a support query, not a bug report. In the future, please post support queries to one of the mailing lists. This one probably should have been on libjpeg-turbo-devel. Part of the reason for this is that the mailing lists are monitored by multiple people, and thus the community can help provide insight. Bug reports go only to me.
Building under Ubuntu 14.04. Building with instructions from BUILDING.txt. Tried all of the above, including linking to built and/or installed libraries. Prebuilt binaries?? Not tried, but expect same result as build completes with no errors.
How to i use the mailing list, as I can't find a server to email to? Can't start topics, either..
Sign up for the e-mail lists here:
https://sourceforge.net/p/libjpeg-turbo/mailman/
It works the same as every other SourceForge project.
Try the pre-built binaries. I don't care if you "expect" the same result. Things are often different than we expect.
Diff: