diff examples/menu/filebrowser.c @ 601:8863d23cea4b openvg

Load images with Imlib2. Image loader, now, use Imlib2 to load images into ARGB 32bits pixels. It can load png, jpg, bmp, tiff, ...., etc.
author Thinker K.F. Li <thinker@branda.to>
date Fri, 02 Jul 2010 11:59:17 +0800
parents d7f224b97b7f
children ac2e6468a22a
line wrap: on
line diff
--- a/examples/menu/filebrowser.c	Thu Jul 01 16:39:59 2010 +0800
+++ b/examples/menu/filebrowser.c	Fri Jul 02 11:59:17 2010 +0800
@@ -112,7 +112,8 @@
 
     printf("check %s\n",s);
 
-    if (endWith(s,".png")) {
+    if (endWith(s,".png") || endWith(s, ".jpg") ||
+	endWith(s, ".PNG") || endWith(s, ".JPG")) {
     	    snprintf(path,1024,"%s%s", data->curDir,data->titles[select]);
 	    mypreview(data,path);
     }