void dng_gain_map::PutStream (dng_stream &stream) const { stream.Put_uint32 (fPoints.v); stream.Put_uint32 (fPoints.h); stream.Put_real64 (fSpacing.v); stream.Put_real64 (fSpacing.h); stream.Put_real64 (fOrigin.v); stream.Put_real64 (fOrigin.h); stream.Put_uint32 (fPlanes); for (int32 rowIndex = 0; rowIndex < fPoints.v; rowIndex++) { for (int32 colIndex = 0; colIndex < fPoints.h; colIndex++) { for (uint32 plane = 0; plane < fPlanes; plane++) { stream.Put_real32 (Entry (rowIndex, colIndex, plane)); } } } }
void dng_opcode_DeltaPerRow::PutData (dng_stream &stream) const { uint32 deltas = (fAreaSpec.Area ().H () + fAreaSpec.RowPitch () - 1) / fAreaSpec.RowPitch (); stream.Put_uint32 (dng_area_spec::kDataSize + 4 + deltas * 4); fAreaSpec.PutData (stream); stream.Put_uint32 (deltas); real32 *table = fTable->Buffer_real32 (); for (uint32 j = 0; j < deltas; j++) { stream.Put_real32 (table [j]); } }
void dng_opcode_ScalePerColumn::PutData (dng_stream &stream) const { uint32 scales = (fAreaSpec.Area ().W () + fAreaSpec.ColPitch () - 1) / fAreaSpec.ColPitch (); stream.Put_uint32 (dng_area_spec::kDataSize + 4 + scales * 4); fAreaSpec.PutData (stream); stream.Put_uint32 (scales); real32 *table = fTable->Buffer_real32 (); for (uint32 j = 0; j < scales; j++) { stream.Put_real32 (table [j]); } }