Chris@16
|
1 /*
|
Chris@16
|
2 Copyright 2005-2007 Adobe Systems Incorporated
|
Chris@16
|
3
|
Chris@16
|
4 Use, modification and distribution are subject to the Boost Software License,
|
Chris@16
|
5 Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
6 http://www.boost.org/LICENSE_1_0.txt).
|
Chris@16
|
7
|
Chris@16
|
8 See http://opensource.adobe.com/gil for most recent version including documentation.
|
Chris@16
|
9 */
|
Chris@16
|
10
|
Chris@16
|
11 /*************************************************************************************************/
|
Chris@16
|
12
|
Chris@16
|
13 #ifndef GIL_DEPRECATED_HPP
|
Chris@16
|
14 #define GIL_DEPRECATED_HPP
|
Chris@16
|
15
|
Chris@16
|
16 ////////////////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
17 /// \file
|
Chris@16
|
18 /// \brief Deprecated names
|
Chris@16
|
19 /// This file is provided as a courtesy to ease upgrading GIL client code.
|
Chris@16
|
20 /// Please make sure your code compiles when this file is not included.
|
Chris@16
|
21 ///
|
Chris@16
|
22 /// \author Lubomir Bourdev and Hailin Jin \n
|
Chris@16
|
23 /// Adobe Systems Incorporated
|
Chris@16
|
24 /// \date 2005-2007 \n Last updated on February 12, 2007
|
Chris@16
|
25 ///
|
Chris@16
|
26 ////////////////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
27
|
Chris@16
|
28 #include <cstddef>
|
Chris@16
|
29
|
Chris@16
|
30 #define planar_ptr planar_pixel_iterator
|
Chris@16
|
31 #define planar_ref planar_pixel_reference
|
Chris@16
|
32 #define membased_2d_locator memory_based_2d_locator
|
Chris@16
|
33 #define pixel_step_iterator memory_based_step_iterator
|
Chris@16
|
34 #define pixel_image_iterator iterator_from_2d
|
Chris@16
|
35
|
Chris@16
|
36 #define equal_channels static_equal
|
Chris@16
|
37 #define copy_channels static_copy
|
Chris@16
|
38 #define fill_channels static_fill
|
Chris@16
|
39 #define generate_channels static_generate
|
Chris@16
|
40 #define for_each_channel static_for_each
|
Chris@16
|
41 #define transform_channels static_transform
|
Chris@16
|
42 #define max_channel static_max
|
Chris@16
|
43 #define min_channel static_min
|
Chris@16
|
44
|
Chris@16
|
45 #define semantic_channel semantic_at_c
|
Chris@16
|
46
|
Chris@16
|
47 template <typename Img>
|
Chris@16
|
48 void resize_clobber_image(Img& img, const typename Img::point_t& new_dims) {
|
Chris@16
|
49 img.recreate(new_dims);
|
Chris@16
|
50 }
|
Chris@16
|
51
|
Chris@16
|
52 template <typename Img>
|
Chris@16
|
53 void resize_clobber_image(Img& img, const typename Img::x_coord_t& width, const typename Img::y_coord_t& height) {
|
Chris@16
|
54 img.recreate(width,height);
|
Chris@16
|
55 }
|
Chris@16
|
56
|
Chris@16
|
57 template <typename T> typename T::x_coord_t get_width(const T& a) { return a.width(); }
|
Chris@16
|
58 template <typename T> typename T::y_coord_t get_height(const T& a) { return a.height(); }
|
Chris@16
|
59 template <typename T> typename T::point_t get_dimensions(const T& a) { return a.dimensions(); }
|
Chris@16
|
60 template <typename T> std::size_t get_num_channels(const T& a) { return a.num_channels(); }
|
Chris@16
|
61
|
Chris@16
|
62 #define GIL boost::gil
|
Chris@16
|
63 #define ADOBE_GIL_NAMESPACE_BEGIN namespace boost { namespace gil {
|
Chris@16
|
64 #define ADOBE_GIL_NAMESPACE_END } }
|
Chris@16
|
65
|
Chris@16
|
66 #define ByteAdvancableIteratorConcept MemoryBasedIteratorConcept
|
Chris@16
|
67 #define byte_advance memunit_advance
|
Chris@16
|
68 #define byte_advanced memunit_advanced
|
Chris@16
|
69 #define byte_step memunit_step
|
Chris@16
|
70 #define byte_distance memunit_distance
|
Chris@16
|
71
|
Chris@16
|
72 #define byte_addressable_step_iterator memory_based_step_iterator
|
Chris@16
|
73 #define byte_addressable_2d_locator memory_based_2d_locator
|
Chris@16
|
74
|
Chris@16
|
75 // These are members of memory-based locators
|
Chris@16
|
76 //#define row_bytes row_size // commented out because row_bytes is commonly used
|
Chris@16
|
77 #define pix_bytestep pixel_size
|
Chris@16
|
78
|
Chris@16
|
79 #endif
|