Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ImageSourceFileWic.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2010, The Barbarian Group
3  All rights reserved.
4 
5  Redistribution and use in source and binary forms, with or without modification, are permitted provided that
6  the following conditions are met:
7 
8  * Redistributions of source code must retain the above copyright notice, this list of conditions and
9  the following disclaimer.
10  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
11  the following disclaimer in the documentation and/or other materials provided with the distribution.
12 
13  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
14  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
15  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
16  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
17  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
19  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
20  POSSIBILITY OF SUCH DAMAGE.
21 */
22 
23 #pragma once
24 
25 #include "cinder/Cinder.h"
26 #include "cinder/ImageIO.h"
27 #include "cinder/Exception.h"
28 
29 #ifndef GUID
30 typedef struct _GUID GUID;
31 #endif
32 
33 namespace cinder {
34 
35 typedef std::shared_ptr<class ImageSourceFileWic> ImageSourceFileWicRef;
36 
38  public:
39  static ImageSourceRef createRef( DataSourceRef dataSourceRef, ImageSource::Options options = ImageSource::Options() ) { return createFileWicRef( dataSourceRef, options ); }
41 
42  virtual void load( ImageTargetRef target );
43 
44  static void registerSelf();
45 
46  protected:
47  ImageSourceFileWic( DataSourceRef dataSourceRef, ImageSource::Options options );
48 
49  bool processFormat( const ::GUID &guid, ::GUID *convertGUID );
50 
51  std::shared_ptr<uint8_t> mData;
52  int32_t mRowBytes;
53 };
54 
56 
58 };
59 
60 
61 
62 } // namespace ci
int32_t mRowBytes
Definition: ImageSourceFileWic.h:52
std::shared_ptr< uint8_t > mData
Definition: ImageSourceFileWic.h:51
static ImageSourceFileWicRef createFileWicRef(DataSourceRef dataSourceRef, ImageSource::Options options=ImageSource::Options())
Definition: ImageSourceFileWic.cpp:40
GLenum target
Definition: GLee.h:13607
std::shared_ptr< class ImageTarget > ImageTargetRef
Definition: ImageIo.h:42
bool processFormat(const ::GUID &guid,::GUID *convertGUID)
Definition: ImageSourceFileWic.cpp:140
std::shared_ptr< class ImageSourceFileWic > ImageSourceFileWicRef
Definition: ImageSourceFileWic.h:35
Definition: ImageIo.h:201
struct _GUID GUID
Definition: ImageSourceFileWic.h:30
static ImageSourceRef createRef(DataSourceRef dataSourceRef, ImageSource::Options options=ImageSource::Options())
Definition: ImageSourceFileWic.h:39
Definition: ImageSourceFileWic.h:37
Optional parameters passed when creating an Image.
Definition: ImageIo.h:92
#define REGISTER_IMAGE_IO_FILE_HANDLER(TYPE)
Definition: ImageIo.h:289
Definition: ImageSourceFileWic.h:57
virtual void load(ImageTargetRef target)
Definition: ImageSourceFileWic.cpp:195
static void registerSelf()
Definition: ImageSourceFileWic.cpp:207
std::shared_ptr< class ImageSource > ImageSourceRef
Definition: Channel.h:33
std::shared_ptr< class DataSource > DataSourceRef
Definition: DataSource.h:35
Definition: ImageIo.h:86
ImageSourceFileWic(DataSourceRef dataSourceRef, ImageSource::Options options)
Definition: ImageSourceFileWic.cpp:45