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