|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85343 - sandbox/gil/boost/gil/extension/io2/backends/wic
From: dsaritz_at_[hidden]
Date: 2013-08-13 18:23:44
Author: psiha
Date: 2013-08-13 18:23:44 EDT (Tue, 13 Aug 2013)
New Revision: 85343
URL: http://svn.boost.org/trac/boost/changeset/85343
Log:
Minor refactoring.
Text files modified:
sandbox/gil/boost/gil/extension/io2/backends/wic/backend.hpp | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
Modified: sandbox/gil/boost/gil/extension/io2/backends/wic/backend.hpp
==============================================================================
--- sandbox/gil/boost/gil/extension/io2/backends/wic/backend.hpp Tue Aug 13 18:22:47 2013 (r85342)
+++ sandbox/gil/boost/gil/extension/io2/backends/wic/backend.hpp 2013-08-13 18:23:44 EDT (Tue, 13 Aug 2013) (r85343)
@@ -88,7 +88,12 @@
template <> struct gil_to_wic_format<bgr16_pixel_t , false> : format_guid<GUID_WICPixelFormat48bppRGB > {};
template <> struct gil_to_wic_format<bgra16_pixel_t , false> : format_guid<GUID_WICPixelFormat64bppBGRA > {};
template <> struct gil_to_wic_format<cmyk8_pixel_t , false> : format_guid<GUID_WICPixelFormat32bppCMYK > {};
-
+#if ( _WIN32_WINNT >= _WIN32_WINNT_VISTA )
+template <> struct gil_to_wic_format<rgba8_pixel_t , false> : format_guid<GUID_WICPixelFormat32bppRGBA > {};
+#endif
+#if ( _WIN32_WINNT >= _WIN32_WINNT_WIN8 ) || defined( _WIN7_PLATFORM_UPDATE )
+template <> struct gil_to_wic_format<rgb16_pixel_t , false> : format_guid<GUID_WICPixelFormat64bppRGB > {};
+#endif
typedef mpl::vector8
<
@@ -118,6 +123,8 @@
typedef point_t offset_t ;
+ static bool const one_dimensional = false;
+
public:
wic_roi( value_type const x, value_type const y, value_type const width, value_type const height )
{
@@ -125,19 +132,19 @@
Width = width; Height = height;
}
- wic_roi( offset_t const top_left, value_type const width, value_type const height )
+ wic_roi( offset_t const & top_left, value_type const width, value_type const height )
{
X = top_left.x; Y = top_left.y;
Width = width; Height = height;
}
- wic_roi( offset_t const top_left, offset_t const bottom_right )
+ wic_roi( offset_t const & top_left, offset_t const bottom_right )
{
X = top_left.x; Y = top_left.y;
Width = bottom_right.x - top_left.x;
Height = bottom_right.y - top_left.y;
}
-};
+}; // class wic_roi
inline void ensure_result( HRESULT const result )
@@ -156,7 +163,7 @@
template <typename View>
wic_view_data_t( View const & view )
:
- p_roi_ ( 0 ),
+ p_roi_ ( NULL ),
format_( gil_to_wic_format<typename View::value_type, is_planar<View>::value>::value )
{
set_bitmapdata_for_view( view );
@@ -165,11 +172,11 @@
template <typename View>
wic_view_data_t( View const & view, wic_roi::offset_t const & offset )
:
- p_roi_ ( static_cast<wic_roi const *>( optional_roi_.address() ) ),
- format_( gil_to_wic_format<typename View::value_type, is_planar<View>::value>::value )
+ p_roi_ ( new ( optional_roi_.address() ) wic_roi( offset, view.width(), view.height() ) ),
+ format_( gil_to_wic_format<typename View::value_type, is_planar<View>::value>::value )
{
+ //BF_ASSUME( p_roi_ );
set_bitmapdata_for_view( view );
- new ( optional_roi_.address() ) wic_roi( offset, width_, height_ );
}
WICRect const * const p_roi_ ;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk