[Elphel-support] questions from elphel_dng.c

Venkat Subbiah venkat at magnasinc.com
Sun Oct 14 00:20:24 PDT 2012


In elphel_dng.c file I see a reference to a gamma file, what is the purpose
of this file?
  if ((gam = atof(argv[1])) <= 0) {
    fprintf (stderr, "Gamma must be positive!\n");
    return 1;
  }

----------------------------------------------------------------------------------------------

First want to figure out how I can take this data and write out
 for (row=0; row < cinfo.image_height; row += 16) {
    for (r=0; r < 16; )
      r += jpeg_read_scanlines (&cinfo, buf+r, 16-r);
    for (r=0; r < 16; r++) {
      for (col=0; col < cinfo.image_width; col += 16)
for (c=0; c < 16; c++)
  out[col+c] = buf[ROT(r)][col+ROT(c)];
      TIFFWriteScanline (tif, out, row+r, 0);
    }
  }


I am new to the jpeg API, but In this loop looks like it takes the data
from the JP4 file and writes it out as a tiff file.

I would like to figure out how I could write this out as just sequence of
bytes (or 16-bit words)
corresponding to (width+4)*(height+4), where width and height are
dimensions, rather than converting it to tiff file.
Would this data be be exactly similar to the data from the raw camera file?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20121014/943ac9ea/attachment-0002.html>


More information about the Support-list mailing list