Now I could use open_bayer() to open a raw file(suffix is .bayer), then I want to transfer it to a .tiff file without any process, like unpack, dcraw_process, etc.
Can I directly use dcraw_ppm_tiff_writer() ? It seems to have some problems.
raw image decoder
Now I could use open_bayer() to open a raw file(suffix is .bayer), then I want to transfer it to a .tiff file without any process, like unpack, dcraw_process, etc.
Can I directly use dcraw_ppm_tiff_writer() ? It seems to have some problems.
why don't you want to use
why don't you want to use libtiff?
You already have sensor dump in memory array, unprocessed. Just write it to file, you do not need to use LibRaw::open_bayer() for that.
-- Alex Tutubalin @LibRaw LLC
You ca even use existing
You ca even use existing tools instead of coding w/ libraw or libtiff, see e.g. http://netpbm.sourceforge.net/doc/rawtopgm.html (and then easily convert PGM to TIFF w/ pamtotiff), or you can also use ImageMagick/GraphicsMagick and define the 'gray' input:
convert -size 512x512 -depth 16 -endian LSB gray:original.bayer -type grayscale result.tif (of course change the dimensions and endianness to suit your need)