Recent

Author Topic: Object to display NEF-file  (Read 2563 times)

Hendrikus

  • New Member
  • *
  • Posts: 10
Object to display NEF-file
« on: May 07, 2017, 12:57:29 pm »
Hi all,

I own a harddisk with about 2500 NEF files (pictures in the Nikon NEF-format). I'm trying to write a progam in Lazarus to order/rename those files. It would be nice to display them on the screen. However, the TImage-component doesn't support the NEF format, and I don't want to convert them to another format (jpg/bitmap).

I've read a lot about DCRAW and LIBGFL but can't find any simple example to display my nef-pictures. Does anyone know a simple example/component? Thanks in advance.
Best regards,
Hendrikus.

MacWomble

  • Jr. Member
  • **
  • Posts: 79
Re: Object to display NEF-file
« Reply #1 on: May 07, 2017, 01:28:54 pm »
There is a codec for Windows on the Nikon web for download witch could help eventually.
The NEF-format is something like raw
Mint 19.3 Cinnamon, FPC/ Lazarus Trunk 64Bit

Hendrikus

  • New Member
  • *
  • Posts: 10
Re: Object to display NEF-file
« Reply #2 on: May 07, 2017, 02:10:22 pm »
MacWomble,  thanks for your reply,

I know there is a codec for Windows, I've already installed it on my Windows10 laptop. But I still can't figure out how to display the nef's
in a Lazarus Timage.
Code: Pascal  [Select][+][-]
  1. var s: String;
  2.       oPicture: TPicture;
  3. begin
  4.      s := 'D:\DATA\NEF\_MVZ7116.NEF';
  5.      oPicture := TPicture.Create(Nil);
  6.      Try
  7.            oPicture.LoadFromFile(s);
  8.            ....
  9.      Finally
  10.          FreeThenNil(oPicture);
  11.      end;
  12. end;
  13.  

compiles fine, but I get a runtime error that NEF is an unsupported fileformat.

 

TinyPortal © 2005-2018