#include "png_loader.h"
#include "video.h"

#include <iostream>
		
#ifdef Revision
#undef Revision
#endif
#define Revision "jpg_loader.cpp $Revision: 1.2 $"

extern Video_Surface *IMG_LoadPNG ( Video_Interface *video, std::string fname, std::string grp_name, std::string surf_name, bool overwrite );

	Image_Loader* _get_imageloader ( void )
	{
		return new PNG_Loader;
	}

	bool PNG_Loader::_loadimage ( std::string video_name, std::string image_name, std::string group_name, std::string surface_name, bool overwrite )
	{
		Video_Surface *srf;
		Video_Interface *vid=video_get_interface( video_name );
		if(!vid){imageloader_seterror("No such video device: \""+video_name+"\"");return false;}
		srf=IMG_LoadPNG ( vid, image_name, group_name, surface_name, overwrite );
		return srf!=0;
	}
