open_bayer() and save as .tiff file without any peocess

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

You ca even use existing

You ca even use existing tools instead of coding w/ libraw or libtiff, see e.g. (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)