[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.3.9 IMG_isJPG

int IMG_isJPG(SDL_RWops *src)

src

If the JPG format is supported, then the image data is tested to see if it is readable as a JPG, otherwise it returns false (Zero).

Returns: 1 if the image is a JPG and the JPG format support is compiled into SDL_image. 0 is returned otherwise.

 
// Test sample.jpg to see if it is a JPG
SDL_RWops *rwop;
rwop=SDL_RWFromFile("sample.jpg", "rb");
if(IMG_isJPG(rwop))
	printf("sample.jpg is a JPG file.\n");
else
	printf("sample.jpg is not a JPG file, or JPG support is not available.\n");

See Also:
3.2.12 IMG_LoadJPG_RW, 3.2.3 IMG_LoadTyped_RW



This document was generated on November, 3 2009 using texi2html