I would look at ImageMagick. There is an example on the website which shows how to read images and save them using the C interface:
ImageMagick: MagickWand, C API for ImageMagick
Also in the source there is a inline function called ReadCLIPBOARDImage which seems to do exactly what you want. It reads from the Windows clipboard and saves an Image* which ImageMagick can use. Adapting this into the above example lets you take the clipboard as input and produce a thumbnail JPEG image as output (or do whatever you want using the ImageMagick API):
Code:
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <wand/MagickWand.h>
#include <wand/magick-image.h>
#include <magick/image.h>
#include <magick/methods.h>
#include <windows.h>
#include <wingdi.h>
#include "magick/quantum-private.h"
#include "magick/exception-private.h"
#include "ReadCLIPBOARDImage.inline.h"
int main()
{
// Acquire Image from Windows Clipboard.
ImageInfo *ii = AcquireImageInfo();
ExceptionInfo *ie = AcquireExceptionInfo();
Image *img = ReadCLIPBOARDImage(ii, ie);
// Create MagickWand from image.
MagickWandGenesis();
MagickWand *magick_wand;
magick_wand = NewMagickWandFromImage(img);
// Scale the image down to a thumbnail.
MagickResetIterator(magick_wand);
while (MagickNextImage(magick_wand) != MagickFalse) {
MagickResizeImage(magick_wand, 106, 80, LanczosFilter, 1.0);
}
// Write the image to a file.
MagickStatusType status;
status = MagickWriteImages(magick_wand, "clipboard_thumbnail.jpg", MagickTrue);
if (status == MagickFalse) {
fprintf(stderr, "Could not write file.\n");
}
// Clean up.
DestroyImageInfo(ii);
DestroyExceptionInfo(ie);
DestroyMagickWand(magick_wand);
MagickWandTerminus();
return 0;
}
The file READClipboardImage.inline.h is a copy of the function of the same name from the source archive. It is a static inline function. The "-private.h" header files are also from the source archive.