|
Hello, I think this important thing is to define a plug-in interface that can be implemented for each format. I can be someting like that : struct format_plugin_functions { /* return true is the format is recognized */ int (*checkformat)(FILE* input); /* parse TIFF metadata and fill a linked list of tags */ struct tag_list (*parse_metadata) (FILE* input); /* decompress main RAW image and fill raw_data structure */ struct raw_data (*load_raw)(struct tag_list* tags, FILE* input); /* apply WB data on raw data */ int (*apply_wb) (struct raw_data* image, struct tag *wb_tag); ... /* some functions may be optional */ } each plug will implement this interface : checkformatCR2(FILE* input); parseMetadataCR2(FILE* input); /* which can use common tiff parsing functions !*/ load_rawCR2(struct tag_list *tags, FILE* input); apply_wbCR2(struct raw_data* image, struct tag *wb_tag); also a common 'raw representation' in memory. same things for NEF etc... a C++ wrapper can then be written for this C interface... libraw, dcraw and other ones can be used to implement such plugins... this idea is to hide implementation behind a well defined and stable interface (API) Laurent (http://lclevy.free.fr/adflib, http://lclevy.free.fr/cr2, http://lclevy.free.fr/nef, http://lclevy.free.fr/raw) Gianluca Sforna a écrit : On Sat, Feb 28, 2009 at 11:58 AM, Lutz! <[email protected]> wrote: |
_______________________________________________ Rawstudio-dev mailing list [email protected] http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev
