2023.08.09 17:07 "[Tiff] Continuing Problems with Error messages with CFA tags: Unknown tags v 4.5.1", by Darral Freund

2023.08.09 17:07 "[Tiff] Continuing Problems with Error messages with CFA tags: Unknown tags v 4.5.1", by Darral Freund

Hello,

I’m trying to create a simple dng file using the code listed in thread:

2016.06.30 12:17 "Re: [Tiff] Error messages regarding CFA tags: Unknown tags", by Fabian K

I’m using libtiff v 4.5.1 that I downloaded from http://download.osgeo.org/libtiff/ and compiled on a silicon M2 Mac.

Details of what I did follow below, but any suggestions would be greatly appreciated. Also, if perhaps a previous version of the library works, please let me know as all I am doing is creating a simple raw dng from an image (undebayered) that I processed in Matlab.

Thanks,

Darral

I compiled the code with:

g++ -std=c++17 16bit_raw1.cpp -ltiff -L/usr/local/lib -I/usr/local/include -o 16bit_raw

And it compiled successfully, but when executed I get:

./16bit_raw
TIFFSetField: 16bitRaw.dng: Unknown tag 33422.
TIFFSetField: 16bitRaw.dng: Unknown tag 33421.

I tried the compile solution Fabian identified using the static library, as follows:

g++ 16bit_raw1.cpp -Wall  /usr/local/lib/libtiff.a -I/usr/local/include -o 16bit_raw

But that yields a variety of compile errors as follows:

Undefined symbols for architecture arm64:
  "_deflate", referenced from:
      _PixarLogPostEncode in libtiff.a(tif_pixarlog.o)
      _PixarLogEncode in libtiff.a(tif_pixarlog.o)
      _ZIPPostEncode in libtiff.a(tif_zip.o)
      _ZIPEncode in libtiff.a(tif_zip.o)
  "_deflateEnd", referenced from:
      _PixarLogCleanup in libtiff.a(tif_pixarlog.o)
      _ZIPSetupDecode in libtiff.a(tif_zip.o)
      _ZIPCleanup in libtiff.a(tif_zip.o)
  "_deflateInit_", referenced from:
      _PixarLogSetupEncode in libtiff.a(tif_pixarlog.o)
      _ZIPSetupEncode in libtiff.a(tif_zip.o)
  "_deflateParams", referenced from:
      _PixarLogVSetField in libtiff.a(tif_pixarlog.o)
      _ZIPVSetField in libtiff.a(tif_zip.o)
  "_deflateReset", referenced from:
      _PixarLogPreEncode in libtiff.a(tif_pixarlog.o)
      _ZIPPreEncode in libtiff.a(tif_zip.o)
  "_inflate", referenced from:
      _PixarLogDecode in libtiff.a(tif_pixarlog.o)
      _ZIPDecode in libtiff.a(tif_zip.o)
  "_inflateEnd", referenced from:
      _PixarLogCleanup in libtiff.a(tif_pixarlog.o)
      _ZIPSetupEncode in libtiff.a(tif_zip.o)
      _ZIPCleanup in libtiff.a(tif_zip.o)
  "_inflateInit_", referenced from:
      _PixarLogSetupDecode in libtiff.a(tif_pixarlog.o)
      _ZIPSetupDecode in libtiff.a(tif_zip.o)
  "_inflateReset", referenced from:
      _PixarLogPreDecode in libtiff.a(tif_pixarlog.o)
      _ZIPPreDecode in libtiff.a(tif_zip.o)
ld: symbol(s) not found for architecture arm64

Any suggestion would be greatly appreciated.

Thanks,

Darral