[Rawstudio-dev] alternative library for decoding raw formats

Klaus Post klauspost at gmail.com
Sat Feb 28 15:32:11 CET 2009


Actually there isn't any official interface yet, since I would like it
to be more feature-complete before that is setteled.

The interface to rawstudio is currently defined in:

https://rawstudio.org/svn/rawspeed/RawSpeed/rawstudio-plugin-api.cpp

The usage is quite simple:

RawDecoder *d = 0;
FileMap* m = 0;

FileReader f((char *) filename);
try {
  m = f.readFile();
  TiffParser t(m);
  t.parseData();
  d = t.getDecompressor();
  d->decodeRaw();
  d->decodeMetaData();

  //image should be loaded at this point
  RawImage r = d->mRaw;
  [...]
} catch (RawDecoderException e) {
  printf("RawDecoderException: %s\n", e.what());
} catch (TiffParserException e) {
  printf("TiffParserException: %s\n", e.what());
}
if (d) delete d;
if (m) delete m;

However, expect it to change.

To add it to SVN version of Rawstudio, you can use:

sudo make -f rawstudio-plugin.makefile install

...in the RawSpeed directory. I'm not a unix guy, so this is off the
top of my head. Futhermore, even though RawSpeed is stable on all the
test files I have, use it with care, and please report any
incompatible files.


Regards, Klaus Post

http://www.klauspost.com



On Sat, Feb 28, 2009 at 2:38 PM, Laurent Clevy <lclevy at free.fr> wrote:
> Yep, sorry,
> it is already done in RS
>
> interface:
> https://rawstudio.org/svn/rawspeed/RawSpeed/RawDecoder.h
>
> implementations:
> https://rawstudio.org/svn/rawspeed/RawSpeed/Cr2Decoder.h
> https://rawstudio.org/svn/rawspeed/RawSpeed/NefDecoder.h
>
> Laurent
>
> Klaus Post a écrit :
>
> On Sat, Feb 28, 2009 at 12:47 PM, Gianluca Sforna <giallu at gmail.com> wrote:
>
>
>
> 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
>
>
> As Anders wrote, RS already HAS already implemented a plugin structure
> for loader plugins, it is already implemented, and will be in the next
> version of RS.
>
> Loaders are internally prioritized, so if plugin A cannot decode the
> image, it silently moves on to the next plugin in the list. It
> actually works very nicely. There is no need for user intervention, as
> fallback is silent. The only issue we are working at, is to avoid the
> filesystem re-loading the image data for each plugin, but other than
> that it, it works very nice.
>
>
>
>
> Gianluca Sforna
>
>
> Regards, Klaus
>
> _______________________________________________
> Rawstudio-dev mailing list
> Rawstudio-dev at rawstudio.org
> http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev
>
>
> ________________________________
>
> 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
> Rawstudio-dev at rawstudio.org
> http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-dev
>
>



More information about the Rawstudio-dev mailing list