Recent

Author Topic: LibRAW external library  (Read 363 times)

grytom

  • New member
  • *
  • Posts: 9
LibRAW external library
« on: April 08, 2019, 09:49:16 pm »
Hello
does anybody have LibRAW headers translated into Pascal? I tried to do it myself and simplest functions like "libraw_version()" and "libraw_cameraList()" are working as expected, other ones doesn't seem to work and to make it worse, they return non error status (0).

Simple example
Code: Pascal  [Select]
  1. program raw;
  2.  
  3. uses
  4.   libraw;
  5.  
  6. var
  7.   Pdata_t: Plibraw_data_t;
  8.   proc_img: Plibraw_processed_image_t;
  9.   err: Integer;
  10.  
  11. begin
  12.   Writeln(libraw_version());
  13.   Pdata_t := libraw_init(0);
  14.   if libraw_open_file(Pdata_t, './raw.orf') = 0 then
  15.     begin
  16.       Writeln(Pdata_t^.sizes.width, ' x ', Pdata_t^.sizes.height);
  17.       Writeln(Pdata_t^.sizes.iwidth, ' x ', Pdata_t^.sizes.iheight);
  18.  
  19.       Writeln(libraw_unpack(Pdata_t));
  20.       Writeln(libraw_raw2image(Pdata_t));
  21.       Writeln(libraw_dcraw_process(Pdata_t));
  22.       proc_img := libraw_dcraw_make_mem_image(Pdata_t, @err);
  23.       if err <> 0 then Writeln('Error #', err:0);
  24.     end;
  25.   libraw_close(Pdata_t);
  26. end.
« Last Edit: April 13, 2019, 02:44:16 pm by grytom »

grytom

  • New member
  • *
  • Posts: 9
Re: LibRAW external library
« Reply #1 on: April 17, 2019, 10:49:40 pm »
The error was between kayboard and a chair :-[ I just little misunderstood the tutorial. ::)