Im looking for an open source jpeg library to include to my project.The least thing i want is the library to produce the image in a rectangular array of pixels.
I have already included libtiff which has this kind of functionality.
Has anyone worked with jpeg before to give me some links?
CImg is hardly difficult, particularly under *nix; it's a single header file. Getting a real-time CV library seems overkill to open a simple image.
Edit: To double-check, I actually did it. The following produced an image in a window on my *nix machine.
test.cpp
1 2 3 4 5 6 7 8 9 10 11
#include "CImg.h" // Just a single header - didn't need to install anything else on my machine
#include <iostream>
usingnamespace cimg_library;
int main()
{
CImg<unsignedchar> image("hills.jpg");
CImgDisplay main_disp(image);
std::cin.ignore();
}
compiled with the line
g++ test.cpp -L/usr/X11R6/lib -lm -lpthread -lX11
Obviously if you're not using X11R6 as your windowing mechanism, replace that library appropriately.
The library does not have to include graphical support.I just want to open the image to take the raster do what i have to do with it and then save it as JPEG.
I dont know if this kind of functionlity is optional for an image library or its something common.(create raster)
I want to have a generic image class as base which declares all the functions needed for the proccessing and then each image type just to inherit from this class and add any functionality specific to each image type.
I just want to open the image to take the raster do what i have to do with it and then save it as JPEG. I dont know if this kind of functionlity is optional for an image library or its something common.
I can't think of any image library I've used where a user couldn't set the pixel values.