#include "SDL/SDL.h"
int main( int argc, char* args[] )
{
bool quit = false;
//images
SDL_Surface* picture = NULL;
SDL_Surface* screen = NULL;
//start SDL & screen
SDL_Init( SDL_INIT_EVERYTHING );
screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE );
//create event
SDL_Event event;
//Here is where the program would take the picture, and save it as picture.bmp
//Load image
picture = SDL_LoadBMP( "picture.bmp" );
//Apply image
SDL_BlitSurface( picture, NULL, screen, NULL );
SDL_Flip( screen );
//Loops untill user exits program
while ( quit == false )
{
//Grabs events
while ( SDL_PollEvent( &event))
{
if (event.type == SDL_QUIT)
{
quit = true;
}
}
}
//Exiting
SDL_FreeSurface( picture );
SDL_Quit();
return 0;
}
Threw searching on the web I haven't found anything helpful except for a reference to DirectShow (now part of the windows SDK). I would greatly appreciate it if some one could point me in the right direction to take a picture using a USB camera.