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:
  
I've a question, just to understand if "it's possibile to have...?". Do
u think it could be useful/possible a "Raw library to use..." selector
in the option panel ?
    

With enough time to code, nothing is impossible but I am not sure that
is an optimal solution.
In fact, what a user want is to load a file; if we can use N different
libraries because that way we can cover more formats, that is good but
IMHO it should be done without user intervention.

I don't think I'm going to be impressed by a workflow like:

1. open file -> fail -> change library in menu -> goto 1


  
I think that we'll never have a perfect
raw-library for all possible formats, maybe, in the future, each library
will be optimized and tested only for some formats...
    

I think this is why it is important not to pick a well maintained one.
If it's maintained, a missing format is not a problem...

  

No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.11.4/1976 - Release Date: 02/27/09 13:27:00

_______________________________________________
Rawstudio-dev mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev

Reply via email to