4 #include <lib/gdi/gpixmap.h>
5 #include <lib/base/thread.h>
6 #include <lib/python/python.h>
7 #include <lib/base/message.h>
8 #include <lib/base/ebase.h>
22 unsigned char *pic_buffer;
26 Cfilepara(const char *mfile, int mid, std::string size)
33 picinfo += + "\n" + size + "\n";
38 if(pic_buffer != NULL) delete pic_buffer;
42 void addExifInfo(std::string val) { picinfo += val + "\n"; }
46 class ePicLoad: public eMainloop, public eThread, public Object, public iObject
48 DECLARE_REF(ePicLoad);
50 enum{ F_PNG, F_JPEG, F_BMP, F_GIF};
56 Cfilepara *m_filepara;
64 unsigned char background[4];
84 eFixedMessagePump<Message> msg_thread, msg_main;
86 void gotMessage(const Message &message);
88 int startThread(int what, const char *file, int x, int y, bool async=true);
89 void thread_finished();
92 PSignal1<void, const char*> PictureData;
97 RESULT startDecode(const char *filename, int x=0, int y=0, bool async=true);
98 RESULT getThumbnail(const char *filename, int x=0, int y=0, bool async=true);
99 RESULT setPara(PyObject *val);
100 PyObject *getInfo(const char *filename);
101 SWIG_VOID(int) getData(ePtr<gPixmap> &SWIG_OUTPUT);
105 SWIG_VOID(int) loadPic(ePtr<gPixmap> &SWIG_OUTPUT, std::string filename, int x, int y, int aspect, int resize_mode=0, int rotate=0, int background=0, std::string cachefile="");
107 #endif // __picload_h__