From ab987e10f154f5536bb8fd936ae0966e909fa969 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 15 Jun 2023 15:58:59 -0500 Subject: added all my scripts --- gpr/source/lib/dng_sdk/dng_jpeg_image.h | 92 +++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 gpr/source/lib/dng_sdk/dng_jpeg_image.h (limited to 'gpr/source/lib/dng_sdk/dng_jpeg_image.h') diff --git a/gpr/source/lib/dng_sdk/dng_jpeg_image.h b/gpr/source/lib/dng_sdk/dng_jpeg_image.h new file mode 100644 index 0000000..01748bb --- /dev/null +++ b/gpr/source/lib/dng_sdk/dng_jpeg_image.h @@ -0,0 +1,92 @@ +/*****************************************************************************/ +// Copyright 2011 Adobe Systems Incorporated +// All Rights Reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in +// accordance with the terms of the Adobe license agreement accompanying it. +/*****************************************************************************/ + +/* $Id: //mondo/dng_sdk_1_4/dng_sdk/source/dng_jpeg_image.h#1 $ */ +/* $DateTime: 2012/05/30 13:28:51 $ */ +/* $Change: 832332 $ */ +/* $Author: tknoll $ */ + +/*****************************************************************************/ + +#ifndef __dng_jpeg_image__ +#define __dng_jpeg_image__ + +/*****************************************************************************/ + +#include "dng_auto_ptr.h" +#include "dng_memory.h" +#include "dng_point.h" + +/*****************************************************************************/ + +typedef AutoPtr dng_jpeg_image_tile_ptr; + +/*****************************************************************************/ + +class dng_jpeg_image + { + + public: + + dng_point fImageSize; + + dng_point fTileSize; + + bool fUsesStrips; + + AutoPtr fJPEGTables; + + AutoArray fJPEGData; + + public: + + dng_jpeg_image (); + + uint32 TilesAcross () const + { + if (fTileSize.h) + { + return (fImageSize.h + fTileSize.h - 1) / fTileSize.h; + } + else + { + return 0; + } + } + + uint32 TilesDown () const + { + if (fTileSize.v) + { + return (fImageSize.v + fTileSize.v - 1) / fTileSize.v; + } + else + { + return 0; + } + } + + uint32 TileCount () const + { + return TilesAcross () * TilesDown (); + } + + void Encode (dng_host &host, + const dng_negative &negative, + dng_image_writer &writer, + const dng_image &image); + + dng_fingerprint FindDigest (dng_host &host) const; + + }; + +/*****************************************************************************/ + +#endif + +/*****************************************************************************/ -- cgit v1.2.3-70-g09d2