Note: This post was split from topic Thumbnail compare when copying or moving .....
Suggestion for future plugin design:
+ add plugin callback function bool InsertMenuItem (UINT where, UINT plugin_id, LPCTSTR title, LPCTSTR tooltip, HICON icon [, accelerator_key]) to insert custom menu items to XnView menus and plugin function void OnMenuItem (UINT plugin_id) when user select item.
+ add plugin callback function bool GetThumbnail (LPCTSTR path, HBITMAP* bitmap_out) to get (or generate) thumnail from XnView thumbnails cache and bool GetInfo (LPCTSTR path, IMAGEINFO* info_out) to get image information.
or may be:
No width, height, dpi, thumbnail etc. of images in fat single struct but properties - well-known: "path", "width", "height", "thumbnail", "last-write-time", etc and custom: "md5", "sh1" (for peer-2-peer networks), "user-comments", "original-url", "published-url", "content-advisor" (Adult, PG-13, ...), etc.
No thumbnail cache but properties cache or database, example SQLite (single file database, SQL, GPL).
No thumbnail extractors but properties extractor/managers plugins.
draft functions:
bool GetProperty ([in] LPCTSTR key, [int] LPCTSR prop_name, [out] BYTE* prop_buf, [in/out] DWORD* prop_size, [in/out] DWORD* prop_type);
bool SetProperty (...);
bool EnumProperties ([in] LPCTSTR key, ...);
enum prop_type { byte, int, string, hbitmap, filetime, array,... } // as hint
key - unique id of image (may be full filepath but how to recognize removable media such as CD?)
Suggestions for Plug-in interface
Moderators: XnTriq, helmut, xnview
- Nikolay Raspopov
- Posts: 89
- Joined: Thu Jun 24, 2004 4:25 pm
- Location: Russia
- Contact: