From d0312775790a678efa5006d1868fd82b2233b7a9 Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Fri, 4 Oct 2024 16:36:56 -0700 Subject: [PATCH] docs: Various minor fixes (#4477) Signed-off-by: Larry Gritz --- src/doc/copyr.rst | 3 ++- src/doc/imageioapi.rst | 36 ++++++++++++++-------------- src/doc/oiiointro.rst | 8 +++---- src/include/OpenImageIO/imagecache.h | 8 +++---- src/include/OpenImageIO/typedesc.h | 8 +++---- 5 files changed, 31 insertions(+), 32 deletions(-) diff --git a/src/doc/copyr.rst b/src/doc/copyr.rst index 668f16f256..92015d5ee7 100644 --- a/src/doc/copyr.rst +++ b/src/doc/copyr.rst @@ -13,7 +13,8 @@ The code that implements OpenImageIO is licensed under the Apache 2.0 license for all new code contributed after July 1, 2023, and any code from prior to -that date which has been relicensed under Apache-2.0 by their owners. Code +that date which has been relicensed under Apache-2.0 by their owners. The tiny +amount of code (approximately 0.1%) that remains in OpenImageIO source files dating from prior to July 1, 2023 that has not been relicensed by their owners is licensed under the BSD 3-clause (also sometimes known as "new BSD" or "modified BSD") license. diff --git a/src/doc/imageioapi.rst b/src/doc/imageioapi.rst index 0adcba25ca..ccebfd68f0 100644 --- a/src/doc/imageioapi.rst +++ b/src/doc/imageioapi.rst @@ -51,20 +51,19 @@ in the outer OpenImageIO scope: TypeFloat2 TypeVector2 TypeVector2i TypeVector3i TypeFloat4 TypeString TypeTimeCode TypeKeyCode TypeBox2 TypeBox2i TypeBox3 TypeBox3i - TypeRational TypePointer + TypeRational TypePointer TypeUstringhash The only types commonly used to store *pixel values* in image files -are scalars of ``UINT8``, ``UINT16``, `float`, and ``half`` -(the last only used by OpenEXR, to the best of our knowledge). +are scalars of ``UINT8``, ``UINT16``, `float`, and ``half``. -Note that the `TypeDesc` (which is also used for applications other -than images) can describe many types not used by -OpenImageIO. Please ignore this extra complexity; only the above simple types are understood by -OpenImageIO as pixel storage data types, though a few others, including -`string` and ``MATRIX44`` aggregates, are occasionally used for -*metadata* for certain image file formats (see -Sections :ref:`sec-imageoutput-metadata`, :ref:`sec-imageinput-metadata`, -and the documentation of individual ImageIO plugins for details). +Note that the `TypeDesc` (which is also used for applications other than +images) can describe many types not used by OpenImageIO. Please ignore this +extra complexity; only the above simple types are understood by OpenImageIO as +pixel storage data types, though a few others, including `string` and +``MATRIX44`` aggregates, are occasionally used for *metadata* for certain +image file formats (see Sections :ref:`sec-imageoutput-metadata`, +:ref:`sec-imageinput-metadata`, and the documentation of individual ImageIO +plugins for details). @@ -307,13 +306,13 @@ There are a few special environment variables that can be used to control OpenImageIO at times that it is not convenient to set options individually from inside the source code. -``OPENIMAGEIO_FONTS`` +.. cpp:var:: OPENIMAGEIO_FONTS A searchpath for finding fonts (for example, when using by `ImageBufAlgo::render_text` or `oiiotool --text`). This may contain a list of directories separated by ":" or ";". -``OPENIMAGEIO_OPTIONS`` +.. cpp:var:: OPENIMAGEIO_OPTIONS Allows you to seed the global OpenImageIO-wide options. @@ -326,7 +325,7 @@ inside the source code. OIIO::attribute ("options", value); -``OPENIMAGEIO_IMAGECACHE_OPTIONS`` +.. cpp:var:: OPENIMAGEIO_IMAGECACHE_OPTIONS Allows you to seed the options for any ImageCache created. @@ -340,7 +339,7 @@ inside the source code. imagecache->attribute ("options", value); -``OPENIMAGEIO_PLUGIN_PATH`` +.. cpp:var:: OPENIMAGEIO_PLUGIN_PATH A colon-separated list of directories to search for OpenImageIO plugins (dynamicaly loadable libraries that implement image format readers @@ -350,7 +349,7 @@ inside the source code. ``OIIO_LIBRARY_PATH`` is still supported, but deprecated. -``OPENIMAGEIO_TEXTURE_OPTIONS`` +.. cpp:var:: OPENIMAGEIO_TEXTURE_OPTIONS Allows you to seed the options for any TextureSystem created. @@ -363,14 +362,15 @@ inside the source code. texturesys->attribute ("options", value); -``OPENIMAGEIO_THREADS``, ``CUE_THREADS`` +.. cpp:var:: OPENIMAGEIO_THREADS + CUE_THREADS Either of these sets the default number of threads that OpenImageIO will use for its thread pool. If both are set, ``OPENIMAGEIO_THREADS`` will take precedence. If neither is set, the default will be 0, which means to use as many threads as there are physical cores on the machine. -``OPENIMAGEIO_METADATA_HISTORY`` +.. cpp:var:: OPENIMAGEIO_METADATA_HISTORY If set to a nonzero integer value, `oiiotool` and `maketx` will by default write the command line into the ImageHistory and Software metadata fields of any diff --git a/src/doc/oiiointro.rst b/src/doc/oiiointro.rst index d7730a8ba0..01ba7411f8 100644 --- a/src/doc/oiiointro.rst +++ b/src/doc/oiiointro.rst @@ -220,11 +220,9 @@ Acknowledgments OpenImageIO incorporates, depends upon, or dynamically links against several other open source packages, detailed below. These other packages are all -distributed under licenses that allow them to be used by OpenImageIO. Where not -specifically noted, they are all using the same BSD license that OpenImageIO -uses. Any omissions or inaccuracies in this list are inadvertent and will be -fixed if pointed out. The full original licenses can be found in the -relevant parts of the source code. +distributed under licenses that allow them to be used by OpenImageIO. Any +omissions or inaccuracies in this list are inadvertent and will be fixed if +pointed out. OpenImageIO incorporates, distributes, or contains derived works of: diff --git a/src/include/OpenImageIO/imagecache.h b/src/include/OpenImageIO/imagecache.h index bdf35f9bd6..004e3d7c73 100644 --- a/src/include/OpenImageIO/imagecache.h +++ b/src/include/OpenImageIO/imagecache.h @@ -128,10 +128,10 @@ class OIIO_API ImageCache { /// value), any untiled images will be read and cached as if /// they were constructed in tiles of size: /// - /// - `autotile * autotile` - /// if `autoscanline` is 0 - /// - `width * autotile` - /// if `autoscanline` is nonzero. + /// - `autotile * autotile` + /// if `autoscanline` is 0 + /// - `width * autotile` + /// if `autoscanline` is nonzero. /// /// In both cases, this should lead more efficient caching. /// The `autoscanline` determines whether the "virtual tiles" diff --git a/src/include/OpenImageIO/typedesc.h b/src/include/OpenImageIO/typedesc.h index 6a8150f009..bed591d694 100644 --- a/src/include/OpenImageIO/typedesc.h +++ b/src/include/OpenImageIO/typedesc.h @@ -44,9 +44,9 @@ OIIO_NAMESPACE_BEGIN /// through APIs through blind pointers. These are some simple classes /// that provide a simple type descriptor system. This is not meant to /// be comprehensive -- for example, there is no provision for structs, -/// unions, pointers, const, or 'nested' type definitions. Just simple -/// integer and floating point, *common* aggregates such as 3-points, -/// and reasonably-lengthed arrays thereof. +/// unions, typed pointers, const, or 'nested' type definitions. Just simple +/// integer and floating point, *common* aggregates such as 3-points, and +/// reasonably-lengthed arrays thereof. /// ///////////////////////////////////////////////////////////////////////////// @@ -83,7 +83,7 @@ struct OIIO_UTIL_API TypeDesc { DOUBLE, ///< 64-bit IEEE floating point values, (C/C++ `double`). STRING, ///< Character string. PTR, ///< A pointer value. - USTRINGHASH, ///< The hash of a ustring + USTRINGHASH, ///< A uint64 that is the hash of a ustring. LASTBASE };