[Hdrflow-svn] SF.net SVN: hdrflow: [390] trunk/lib/extras/src
Status: Pre-Alpha
Brought to you by:
glslang
|
From: <gl...@us...> - 2007-12-30 21:21:51
|
Revision: 390
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=390&view=rev
Author: glslang
Date: 2007-12-30 13:21:49 -0800 (Sun, 30 Dec 2007)
Log Message:
-----------
+ more JPEG XR/HD Photo support
Modified Paths:
--------------
trunk/lib/extras/src/lut/lut.cpp
trunk/lib/extras/src/wic/wic.cpp
Added Paths:
-----------
trunk/lib/extras/src/wic/wic_plugin.opl
Modified: trunk/lib/extras/src/lut/lut.cpp
===================================================================
--- trunk/lib/extras/src/lut/lut.cpp 2007-12-30 16:49:57 UTC (rev 389)
+++ trunk/lib/extras/src/lut/lut.cpp 2007-12-30 21:21:49 UTC (rev 390)
@@ -27,24 +27,22 @@
{
public:
explicit gamma_input( )
- : prop_width_( pcos::key::from_string( "width" ) )
+ : prop_colourspace_( pcos::key::from_string( "colourspace" ) )
+ , prop_width_( pcos::key::from_string( "width" ) )
, prop_height_( pcos::key::from_string( "height" ) )
- , prop_bitdepth_( pcos::key::from_string( "bitdepth" ) )
- , prop_is_float_( pcos::key::from_string( "is_float" ) )
- { }
+ {
+
+ }
virtual ~gamma_input( ) { }
virtual pl::wstring get_uri( ) const { return L"gamma:"; }
virtual pl::wstring get_mime_type( ) const { return L""; }
-
-
private:
+ pcos::property prop_colourspace_;
pcos::property prop_width_;
pcos::property prop_height_;
- pcos::property prop_bitdepth_;
- pcos::property prop_is_float_;
};
class ML_PLUGIN_DECLSPEC lut_plugin : public ml::openmedialib_plugin
Modified: trunk/lib/extras/src/wic/wic.cpp
===================================================================
--- trunk/lib/extras/src/wic/wic.cpp 2007-12-30 16:49:57 UTC (rev 389)
+++ trunk/lib/extras/src/wic/wic.cpp 2007-12-30 21:21:49 UTC (rev 390)
@@ -29,9 +29,17 @@
namespace
{
- il::image_type_ptr GUID_to_pf( WICPixelFormatGUID guid, UINT width, UINT height )
+ il::image_type_ptr GUID_to_pf( WICPixelFormatGUID guid, UINT width, UINT height, UINT& pitch )
{
- return il::image_type_ptr( );
+ il::image_type_ptr im;
+
+ if( guid == GUID_WICPixelFormat128bppRGBAFloat )
+ {
+ im = il::allocate( L"r32g32b32a32f", width, height );
+ pitch = im->pitch( ) * sizeof( float );
+ }
+
+ return im;
}
il::image_type_ptr load_wic( const pl::string& uri )
@@ -64,7 +72,9 @@
source->GetSize( &width, &height );
source->GetPixelFormat( &pixelformat );
- im = GUID_to_pf( pixelformat, width, height );
+ UINT pitch;
+ im = GUID_to_pf( pixelformat, width, height, pitch );
+ hr = source->CopyPixels( NULL, pitch, im->size( ), im->data( ) );
error:
SAFE_RELEASE( decoder );
Added: trunk/lib/extras/src/wic/wic_plugin.opl
===================================================================
--- trunk/lib/extras/src/wic/wic_plugin.opl (rev 0)
+++ trunk/lib/extras/src/wic/wic_plugin.opl 2007-12-30 21:21:49 UTC (rev 390)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openlibraries version="1.0">
+ <openimagelib name="oil" version="0.2.0">
+ <plugin name="HDRFlow wic plugin" type="input" in_filter="*.hdp *.wdp" extension='".*\.hdp", ".*\.wdp"' merit="0" filename='"libhdrflow_extras_wic.so", "libhdrflow_extras_wic.dylib", "hdrflow_extras_wic-vc80-d-0_1_0.dll", "hdrflow_extras_wic-vc80-r-0_1_0.dll"'/>
+ </openimagelib>
+</openlibraries>
Property changes on: trunk/lib/extras/src/wic/wic_plugin.opl
___________________________________________________________________
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|