[Kde-imaging] extragear/libs/kipi-plugins/rawconverter[POSSIBLY UNSAFE]

Gilles Caulier caulier.gilles at kdemail.net
Wed Oct 18 08:39:37 CEST 2006


On Saturday 14 October 2006 19:53, Aurelien Gateau wrote:
> Le Mercredi 11 Octobre 2006 11:02, Gilles Caulier a écrit :
> > On Wednesday 11 October 2006 10:53, Aurelien Gateau wrote:
> > > >> and if, as you said, there are a >> lot of people who want to have
> > > >> libdcraw why not to implement it? > > Because it very complicated to
> > > >> do (:=))). Look in dcraw.c for example.
> > >
> > > dcraw.c + dcrawiface.cpp could be considered to be libdcraw :-).Am I
> > > wrong?
> >
> > Not exactly, because dcraw.c is compiled to give and external binary
> > program named "kipidcraw". In fact it's dcraw but fully tested with the
> > plugin.
> >
> > The dcrawiface is a class witch invoque the kipidcraw binary program
> > using the right options. Of course this interface can be used with recent
> > dcraw version, but it's not a real library witch include the dcraw
> > implementation.
>
> Oh I see. Anyway it would be possible to make it act in a more library-like
> way by calling its main function ourself: instead of forking to call
> kipidcraw, call main(...) from your C++ file. But I guess you would have to
> use threads in this case, so it's probably too much work.
>

Aurélien,

I have tried to use this way in digiKam core. This is a nighmare to maintain 
source code. This is a real fork of dcraw. In fact :

1/ dcraw.c need to be converter in a C++ class because C implementation is not 
thread-safe.
2/ disable all printf()
3/ Check main() command line options parsing code and create/adapt/maintain a 
dedicaced interface method. Complex and long. 

I think that this job need to be done by Dave Cofin himself, not me.

But if you have a genius idea to solve this situation, i'm hear (:=)))...

Gilles



More information about the Kde-imaging mailing list