[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44425] trunk/lib/windows: OpenImageIO 1. 0 for Windows x86 (32 bit)

Thomas Dinges blender at dingto.org
Sat Feb 25 11:59:46 CET 2012


Revision: 44425
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44425
Author:   dingto
Date:     2012-02-25 10:59:42 +0000 (Sat, 25 Feb 2012)
Log Message:
-----------
OpenImageIO 1.0 for Windows x86 (32 bit)
* Built without OCIO support. 

Tested on Windows 7.

Modified Paths:
--------------
    trunk/lib/windows/Readme.txt
    trunk/lib/windows/openimageio/bin/OpenImageIO.dll
    trunk/lib/windows/openimageio/include/OpenImageIO/argparse.h
    trunk/lib/windows/openimageio/include/OpenImageIO/filesystem.h
    trunk/lib/windows/openimageio/include/OpenImageIO/fmath.h
    trunk/lib/windows/openimageio/include/OpenImageIO/imagebuf.h
    trunk/lib/windows/openimageio/include/OpenImageIO/imagebufalgo.h
    trunk/lib/windows/openimageio/include/OpenImageIO/imagecache.h
    trunk/lib/windows/openimageio/include/OpenImageIO/imageio.h
    trunk/lib/windows/openimageio/include/OpenImageIO/paramlist.h
    trunk/lib/windows/openimageio/include/OpenImageIO/refcnt.h
    trunk/lib/windows/openimageio/include/OpenImageIO/strutil.h
    trunk/lib/windows/openimageio/include/OpenImageIO/sysutil.h
    trunk/lib/windows/openimageio/include/OpenImageIO/texture.h
    trunk/lib/windows/openimageio/include/OpenImageIO/thread.h
    trunk/lib/windows/openimageio/include/OpenImageIO/timer.h
    trunk/lib/windows/openimageio/include/OpenImageIO/typedesc.h
    trunk/lib/windows/openimageio/include/OpenImageIO/ustring.h
    trunk/lib/windows/openimageio/include/OpenImageIO/version.h
    trunk/lib/windows/openimageio/lib/OpenImageIO.lib
    trunk/lib/windows/openimageio/readme.txt

Added Paths:
-----------
    trunk/lib/windows/openimageio/include/OpenImageIO/color.h
    trunk/lib/windows/openimageio/include/OpenImageIO/optparser.h
    trunk/lib/windows/openimageio/include/OpenImageIO/plugin.h

Modified: trunk/lib/windows/Readme.txt
===================================================================
--- trunk/lib/windows/Readme.txt	2012-02-25 10:59:32 UTC (rev 44424)
+++ trunk/lib/windows/Readme.txt	2012-02-25 10:59:42 UTC (rev 44425)
@@ -6,5 +6,5 @@
 jpeglib 8b (16.05.2010)
 Python 3.1.2
 Freetype 2.4.4 ("LIB Release Multithreaded and LIB Debug Multithreaded")
-OpenImageIO 0.10.3
+OpenImageIO 1.0 
 Boost 1.47

Modified: trunk/lib/windows/openimageio/bin/OpenImageIO.dll
===================================================================
(Binary files differ)

Modified: trunk/lib/windows/openimageio/include/OpenImageIO/argparse.h
===================================================================
--- trunk/lib/windows/openimageio/include/OpenImageIO/argparse.h	2012-02-25 10:59:32 UTC (rev 44424)
+++ trunk/lib/windows/openimageio/include/OpenImageIO/argparse.h	2012-02-25 10:59:42 UTC (rev 44425)
@@ -37,6 +37,12 @@
 #ifndef OPENIMAGEIO_ARGPARSE_H
 #define OPENIMAGEIO_ARGPARSE_H
 
+#if defined(_MSC_VER)
+// Ignore warnings about DLL exported classes with member variables that are template classes.
+// This happens with the std::string m_errmessage member of ArgParse below.
+#  pragma warning (disable : 4251)
+#endif
+
 #include <vector>
 
 #include "export.h"
@@ -69,13 +75,18 @@
 /// for storing option values and return <0 on failure:
 ///
 /// \code
-///    static int
-///    parse_files (int argc, const char *argv[])
+///    static int parse_files (int argc, const char *argv[])
 ///    {
 ///        for (int i = 0;  i < argc;  i++)
 ///            filenames.push_back (argv[i]);
 ///        return 0;
 ///    }
+///
+///    static int blah_callback (int argc, const char *argv[])
+///    {
+///        std::cout << "blah argument was " << argv[1] << "\n";
+///        return 0;
+///    }
 /// 
 ///    ...
 ///
@@ -93,7 +104,9 @@
 ///                   "set aperture, focal distance, focal length",
 ///            "-format %d %d %f", &width, &height, &aspect,
 ///                   "set width, height, aspect ratio",
-///            "-v", &flag, "verbose output",
+///            "-v", &verbose, "verbose output",
+///            "-q %!", &verbose, "quiet mode",
+///            "--blah %@ %s", blahcallback, "Make the callback",
 ///            NULL);
 ///
 ///    if (ap.parse (argc, argv) < 0) {
@@ -105,11 +118,15 @@
 ///
 /// The available argument types are:
 ///    - no \% argument - bool flag
+///    - \%! - a bool flag, but set it to false if the option is set
 ///    - \%d - 32bit integer
 ///    - \%f - 32bit float
 ///    - \%F - 64bit float (double)
 ///    - \%s - std::string
 ///    - \%L - std::vector<std::string>  (takes 1 arg, appends to list)
+///    - \%@ - a function pointer for a callback function will be invoked
+///            immediately.  The prototype for the callback is
+///                  int callback (int argc, char *argv[])
 ///    - \%* - catch all non-options and pass individually as an (argc,argv) 
 ///            sublist to a callback, each immediately after it's found
 ///
@@ -118,11 +135,16 @@
 ///                     in the usage output.
 ///
 /// Notes:
-///   - If an option doesn't have any arguments, a flag argument is assumed.
-///   - Flags are initialized to false.  No other variables are initialized.
+///   - If an option doesn't have any arguments, a bool flag argument is
+///     assumed.
+///   - No argument destinations are initialized.
 ///   - The empty string, "", is used as a global sublist (ie. "%*").
 ///   - Sublist functions are all of the form "int func(int argc, char **argv)".
 ///   - If a sublist function returns -1, parse() will terminate early.
+///   - It is perfectly legal for the user to append ':' and more characters
+///     to the end of an option name, it will match only the portion before
+///     the semicolon (but a callback can detect the full string, this is
+///     useful for making arguments:  myprog --flag:myopt=1 foobar
 ///
 /////////////////////////////////////////////////////////////////////////////
 
@@ -138,7 +160,8 @@
     /// format string to enumerate the arguments of that option
     /// (eg. "-option %d %f %s").  The format string is followed by a
     /// list of pointers to the argument variables, just like scanf.  A
-    /// NULL terminates the list.
+    /// NULL terminates the list.  Multiple calls to options() will
+    /// append additional options.
     int options (const char *intro, ...);
 
     /// With the options already set up, parse the command line.
@@ -150,10 +173,6 @@
     /// last time geterror() was called, it will return an empty string.
     std::string geterror () const;
     
-    /// Deprecated
-    ///
-    std::string error_message () const { return geterror (); }
-
     /// Print the usage message to stdout.  The usage message is
     /// generated and formatted automatically based on the command and
     /// description arguments passed to parse().

Added: trunk/lib/windows/openimageio/include/OpenImageIO/color.h
===================================================================
--- trunk/lib/windows/openimageio/include/OpenImageIO/color.h	                        (rev 0)
+++ trunk/lib/windows/openimageio/include/OpenImageIO/color.h	2012-02-25 10:59:42 UTC (rev 44425)
@@ -0,0 +1,171 @@
+/*
+  Copyright 2010 Larry Gritz and the other authors and contributors.
+  All Rights Reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are
+  met:
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+  * Neither the name of the software's owners nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+  (This is the Modified BSD License)
+*/
+
+#ifndef OPENIMAGEIO_COLOR_H
+#define OPENIMAGEIO_COLOR_H
+
+#include "export.h"
+#include "version.h"
+
+OIIO_NAMESPACE_ENTER
+{
+
+/// The ColorProcessor encapsulates a baked color transformation, suitable for
+/// application to raw pixels, or ImageBuf(s). These are generated using
+/// ColorConfig::createColorProcessor, and referenced in ImageBufAlgo
+/// (amongst other places)
+
+class DLLPUBLIC ColorProcessor;
+
+
+
+/// Represents the set of all color transformations that are allowed.
+/// If OpenColorIO is enabled at build time, this configuration is loaded
+/// at runtime, allowing the user to have complete control of all color
+/// transformation math. ($OCIO)  (See opencolorio.org for details).
+/// If OpenColorIO is not enabled at build time, a generic color configuration
+/// is provided for minimal color support.
+///
+/// NOTE: ColorConfig(s) and ColorProcessor(s) are potentially heavy-weight.
+/// Their construction / destruction should be kept to a minimum.
+
+class DLLPUBLIC ColorConfig
+{
+public:
+    /// If OpenColorIO is enabled at build time, initialize with the current
+    /// color configuration. ($OCIO)
+    /// If OpenColorIO is not enabled, this does nothing.
+    ///
+    /// Multiple calls to this are inexpensive.
+    ColorConfig();
+    
+    /// If OpenColorIO is enabled at build time, initialize with the 
+    /// specified color configuration (.ocio) file
+    /// If OpenColorIO is not enabled, this will result in an error.
+    /// 
+    /// Multiple calls to this are potentially expensive.
+    ColorConfig(const char * filename);
+    
+    ~ColorConfig();
+    
+    /// Has an error string occurred?
+    /// (This will not affect the error state.)
+    bool error () const;
+    
+    /// This routine will return the error string (and clear any error
+    /// flags).  If no error has occurred since the last time geterror()
+    /// was called, it will return an empty string.
+    std::string geterror ();
+    
+    /// Get the number of ColorSpace(s) defined in this configuration
+    int getNumColorSpaces() const;
+    
+    /// Query the name of the specified ColorSpace.
+    const char * getColorSpaceNameByIndex(int index) const;
+
+    /// Get the name of the color space representing the named role,
+    /// or NULL if none could be identified.
+    const char * getColorSpaceNameByRole (const char *role) const;
+    
+    /// Given the specified input and output ColorSpace, construct the
+    /// processor.  It is possible that this will return NULL, if the
+    /// inputColorSpace doesnt exist, the outputColorSpace doesn't exist,
+    /// or if the specified transformation is illegal (for example, it may
+    /// require the inversion of a 3D-LUT, etc).   When the user is finished
+    /// with a ColorProcess, deleteColorProcessor should be called.
+    /// ColorProcessor(s) remain valid even if the ColorConfig that created
+    /// them no longer exists.
+    /// 
+    /// Multiple calls to this are potentially expensive.
+    
+    ColorProcessor* createColorProcessor(const char * inputColorSpace,
+                                         const char * outputColorSpace) const;
+    
+    /// Delete the specified ColorProcessor
+    static void deleteColorProcessor(ColorProcessor * processor);
+    
+    /// Return if OpenImageIO was built with OCIO support
+    static bool supportsOpenColorIO();
+    
+private:
+    ColorConfig(const ColorConfig &);
+    ColorConfig& operator= (const ColorConfig &);
+    
+    class Impl;

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list