blob: 006337d769b5ad94a5deaf781b94377455cad16c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/*****************************************************************************/
// Copyright 2006-2008 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_simple_image.h#1 $ */
/* $DateTime: 2012/05/30 13:28:51 $ */
/* $Change: 832332 $ */
/* $Author: tknoll $ */
/*****************************************************************************/
#ifndef __dng_simple_image__
#define __dng_simple_image__
/*****************************************************************************/
#include "dng_auto_ptr.h"
#include "dng_image.h"
#include "dng_pixel_buffer.h"
/*****************************************************************************/
/// dng_image derived class with simple Trim and Rotate functionality.
class dng_simple_image : public dng_image
{
protected:
dng_pixel_buffer fBuffer;
AutoPtr<dng_memory_block> fMemory;
dng_memory_allocator &fAllocator;
public:
dng_simple_image (const dng_rect &bounds,
uint32 planes,
uint32 pixelType,
dng_memory_allocator &allocator);
virtual ~dng_simple_image ();
virtual dng_image * Clone () const;
/// Setter for pixel type.
virtual void SetPixelType (uint32 pixelType);
/// Trim image data outside of given bounds. Memory is not reallocated or freed.
virtual void Trim (const dng_rect &r);
/// Rotate image according to orientation.
virtual void Rotate (const dng_orientation &orientation);
/// Get the buffer for direct processing. (Unique to dng_simple_image.)
void GetPixelBuffer (dng_pixel_buffer &buffer)
{
buffer = fBuffer;
}
protected:
virtual void AcquireTileBuffer (dng_tile_buffer &buffer,
const dng_rect &area,
bool dirty) const;
};
/*****************************************************************************/
#endif
/*****************************************************************************/
|