I was trying to save images from a video file but It couldn\'t save any image in my hard drive. I compiled following program without errors.
#include
You forgot to actually save the image:
cvSaveImage(buffer ,img);
Also, the following is redundant:
IplImage* small; // <-- you don't need this IplImage* small=new IplImage(inputArray);