Compare commits

...
161 Commits
Author SHA1 Message Date
Larry Gritz e181aadac5 build: Test ABI compliance (#3983, #3988)
This patch adds a new test to the CI matrix: verifying that we do not
break the ABI during releases.

Basically, in addition to building the current checkout, it also builds
a checkout of the designated "ABI standard" (generally, the first
non-beta release of a major version), then generates ABI dumps of both
versions and runs the ABI compliance checker using the tools from
https://github.com/lvc

Making two builds sounds expensive, but both builds are rigged to be
minimal, since only the main two libraries are needed for ABI checks (we
can turn off the binary tools, unit tests, python bindings, and support
for many formats), and of course the test suite need not run. So
actually, it's less expensive than most of the test matrix entries, and
it helps ensure that we don't accidentally break ABI when we don't mean
to.

I'm not sure how many false positives we'll have. We might need to
adjust the methodology slightly as we gain experience with this.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-09-16 21:58:34 -07:00
Jesse Yurkovich 082b360122 fix(png): Write out proper tiff header version in png EXIF blobs (#3984)
When writing out EXIF headers in PNG files, the `tiff_version` field
wasn't handling endianness properly.

This lead to some tools like `exiv2` refusing to process the file at
all[1]

[1] https://github.com/Exiv2/exiv2/issues/2745

---------

Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
2023-09-16 16:32:48 -07:00
Larry Gritz 8d37a81f83 feat(python): Implement ImageCache.get_imagespec() (#3982)
This C++ method of ImageCache was never exposed previously.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-09-16 16:31:39 -07:00
Larry Gritz 49459df4b8 docs: Prototype docs examples doubling as tests (#3977)
New theory of code examples in the docs: every one should live in the
testsuite somewhere, and merely be included by reference in the docs.
This ensures that every code example works, stays current with the
evolution of the APIs, and never breaks. It also beefs up our test cases
for more thorough code overage in the testsuite.

I've done this with just two examples here, but hopefully it serves as
an example for others to -- bit by bit -- convert all the other code
examples in the docs into tests in a similar manner.

Doing this for any one example is a perfect "good first issue," since
it's bite sized and can easily be done in a day, it doesn't require any
knowledge of deep OIIO internals, and in the process it also teaches you
something about how both the docs and the testsuite are set up.

A few notes:

* I'm structuring it (for now?) as two testsuite entry for each chapter
of the documentation (one for C++ and one for Python).

* Note how I can have many code snippets in a test source file, and use
the Sphinx `:start-after:` and `:end-before:` modifiers of
`literalinclude` to clip particular subsections of the file, using
special comment markers in the code.

While I was there, I also fixed some typos I noticed in the text of the
chapter, oops.

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-09-16 16:31:24 -07:00
Larry Gritz a0162813fd fix(ustring): fix Cuda warnings (#3978)
To my eyes, these two constructors look like they should be treated as
doing exactly the same thing:

    MyType()
        : mymember(...)
    { }

and

    MyType()
    {
       mymember = ...;
    }

But nvcc in Cuda mode says no, if the constructor is constexpr, the
former is okey dokey, but latter gives a warning. Fine, Cuda, whatver
you say.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-09-08 13:41:02 -07:00
Jesse Yurkovich 7c4634ce64 Remove unnecessary headers from strutil.cpp causing build trouble (#3976)
While testing out the 2.5 beta for use in Blender, I hit an odd build
error[1] apparently related to include order. Apparently `windows.h`
should be included before `shellapi.h`[2]. Swapping the order does fix
things, however, it turns out neither is used in this particular file so
just remove them both. Unsure why we didn't see it until now.

[1]
```
20>[9/146] Building CXX object src\libutil\CMakeFiles\OpenImageIO_Util.dir\strutil.cpp.obj
20>FAILED: src/libutil/CMakeFiles/OpenImageIO_Util.dir/strutil.cpp.obj

20>cl : Command line warning D9002: ignoring unknown option '/arch:sse2'
20>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\shellapi.h(68): error C2146: syntax error: missing ';' before identifier 'DECLSPEC_IMPORT'
20>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\shellapi.h(79): error C2065: 'HDROP': undeclared identifier
20>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\shellapi.h(82): error C2086: 'int EXTERN_C': redefinition
20>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\shellapi.h(68): note: see declaration of 'EXTERN_C'
```
[2] 

https://stackoverflow.com/questions/2953704/vs2010-lots-of-errors-when-including-standard-libraries

https://social.msdn.microsoft.com/forums/vstudio/en-us/ed93ae48-969a-4280-8fd5-ef57a332022b/problems-with-shellexecute-and-shellapih?forum=vcgeneral

## Checklist:

<!-- Put an 'x' in the boxes as you complete the checklist items -->

- [X] I have read the [contribution
guidelines](https://github.com/OpenImageIO/oiio/blob/master/CONTRIBUTING.md).
- [ ] I have updated the documentation, if applicable.
- [ ] I have ensured that the change is tested somewhere in the
testsuite
  (adding new test cases if necessary).
- [ ] If I added or modified a C++ API call, I have also amended the
corresponding Python bindings (and if altering ImageBufAlgo functions,
also
  exposed the new functionality as oiiotool options).
- [X] My code follows the prevailing code style of this project. If I
haven't
already run clang-format before submitting, I definitely will look at
the CI
test that runs clang-format and fix anything that it highlights as being
  nonconforming.

Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
2023-09-08 12:42:31 -07:00
Larry Gritz 1383491c9b Stage for 2.5.3.0-beta1
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-09-04 19:58:10 -07:00
Larry Gritz a4a6113ac5 CHANGES and stage for 2.5 beta 1
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-09-04 17:47:56 -07:00
Larry Gritz 4c36a07d1d build: Bump fmt minimum 7.0, fix fmt+gcc bugs (#3973)
Bump fmt minimum to 7.0 for OIIO 2.5. fmt 7.0 is 3 years old, so let's
stop doing extra work to support 6.x. It's not that we depend on newer
features per se, but I'd like to no longer need separate reference
output for some tests whose formatting behavior changed slightly between
6.x and 7.0.

Rig CI to properly test "latest" and "bleeding edge" fmt. It turns out
we had not yet been testing 10.1 or keeping up with their master.

In the process, I discovered that the combo of fmt >= 10.1 and gcc >= 11
results in a mangled AVX math heisenbug, symptomatic in our simd_test. I
struggled with this on and off for many days, having great difficulty
reproducing (though it does fail every time and deterministically, I
just can't seem to narrow it to a smaller example). It only happens with
gcc, only gcc >= 11, only when we use FMT_EXCEPTIONS=0 to disable true
exceptions in fmt. The change happens specifically at fmt commit 9a034b0
(midway between 10.0 and 10.1), which changes the definition of
FMT_THROW when exceptions are disabled. Why this should affect SIMD math
is a total mystery, and currently I am suspecting either a gcc compiler
error or that it's exposing undefined behavior. I found that redefining
FMT_THROW on our side to something innocuous is a good workaround. If I
no longer disable fmt exceptions, that also makes it work, but I don't
know what that might break for us or downstream.

My report of this to the fmt project is
[here](https://github.com/fmtlib/fmt/issues/3620), maybe they'll uncover
the true cause.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-09-04 17:41:03 -07:00
Larry Gritz 4da1679757 admin: update project intake checklist
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-09-04 16:31:36 -07:00
Larry Gritz 7f6861505b ci: Bump 'latest release' test to OpenEXR/Imath 3.2 and OCIO 2.3 (#3971)
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-31 22:26:35 -07:00
Larry Gritz 8e1c7701d0 feat(ImageBuf): auto print uncaught IB errors (#3949)
Advanced users know to check error returns and retrieve errors.

New users often just try OIIO calls with no error checks when they don't
get behavior they want, ask questions to the dev team. We hypothesize
that if they only saw the text of the error messages that they never
retrieved, they could probably self-diagnose many of their problems.

This patch makes an ImageBuf, when it is destryed, print any pending
error messages that were never retrieved. It happens by default, but can
be disabled by setting the new global attribute
"imagebuf:print_uncaught_errors" to 0 (it defaults to 1).

This doesn't cover everything, but for ImageBuf and ImageBufAlgo, maybe
it will help some users? It could annoy advanced users who intend to not
retrieve error messages (why?) but still don't want this printed. But
that's who the new attribute is for.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-31 17:09:37 -07:00
Larry Gritz 0246a1bc8b build: Fix broken libheif < 1.13 (#3970)
Typo introduced in #3894 broke our ability to build against libheif <
1.13. A conditional compilation that should have kicked in for >=1.16
was mistakenly written as 1.6.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-31 17:09:00 -07:00
Larry Gritz 436ab6eff2 fix: normalize cleanup (#3963)
* Add documentation for oiiotool --normalize

* Add tests for oiiotool --normalize

* Revamp existing normalize tests in testsuite/python-imagebofalgo: Get
rid of old test images and refs, because their values were already
normalized, so was probably not testing the math. Make new tests that
are much smaller, 3x3 images that contain specific (non-normalized)
values to verify they all get normalized corectly. They'll run a lot
faster, too.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-31 09:14:47 -07:00
Larry Gritz fd8e64a660 feat(api): ImageInput::open_check (#3967)
Not unlike the ImageOutput::open_check we added a few months back, this
creates an ImageInput utility function that centralizes a number of
validation checks. Currently, this is primarily a check on allowed
resolution and total size, aimed at making a guess at files that are
corrupted or malicious.

Also adds a new `supports("noimage")` query.

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-30 10:04:39 -07:00
Larry Gritz b008158500 admin: Relicense code under Apache 2.0 (#3966)
This is Update 4, the original PR is ongoing and we will continue to
update as additional people relicense.

Per PR #3905 (https://github.com/OpenImageIO/oiio/pull/3905), update the
RELICENSING document with the names of people and companies who have
signed on to the relicensing thus far, and update the SPDX license
notices on source files whose extant authorship (per 'git blame')
comprises only authors who have relicensed.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-29 21:54:42 -07:00
Larry Gritz 554dd02134 Admin: Add Jesse Yurkovich to the TSC (#3937)
Proposal from Thiago to add Jesse Yurkovich, representing Blender, to
the TSC.

Vote passed by majority of TSC members voting yes on the PR itself.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-27 21:58:55 -07:00
Larry Gritz 83c885309c build(win): Fix windows.h pre-definitions (#3965)
* Avoid possible double define of NOMINMAX in platform.h
* Move other Windows symbol definitions into the cmake file instead of
  repeating them in certain .cpp files.

Fixes #3964

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-27 20:31:32 -07:00
b445bc64a4 feat(IBA): IBA::normalize() - Normalize 3D vectors (i.e., divide by their length) textures. (#3945)
Normalize 3D vectors (i.e., divide by their length) textures.

inCenter and outCenter define 0.0 coordinate in input and output 
3D vectors encodings (e.g. 0.0f for [-1,1] or 0.5f for [0,1] encoding).
 
scale defines the scale factor to apply to the normalized vectors 
(i.e. 1.0f for a full range normalization, 0.5f for 0.0-1.0 range
encoding).

Default values are for [-1,1] encoding and full range normalization.

Functions required 3 or 4 channels. If destination have no alpha
channel,
but source have, alpha channel will be dropped.

## Tests

```
int main(int argc, const char* argv[])
{
    ImageBuf input(argv[1]);
    ImageBuf output;

    bool ok = ImageBufAlgo::normalize(output, input, 0.0f, 0.0f, 1.0f);
    if (ok)
    {
		ok = output.write(argv[2]);
    }
    else {
        std::cerr << "Could not normalize image: " << argv[1] << std::endl;
        return -1;
    }
    return 0;
}
```

---------

Signed-off-by: ssh4net <libalias@gmail.com>
Signed-off-by: Anton Dukhovnikov <antond@wetafx.co.nz>
Signed-off-by: Vlad Erium <libalias@gmail.com>
Signed-off-by: Larry Gritz <lg@larrygritz.com>
Co-authored-by: Anton Dukhovnikov <131838425+antond-weta@users.noreply.github.com>
Co-authored-by: Larry Gritz <lg@larrygritz.com>
2023-08-25 18:35:18 -07:00
Jesse Yurkovich a5c7a0c942 fix(dds): Fix div by 0 during DXT4 DDS load (#3959)
Fixes #3950

Fix the div-by-0 when handling unassociated alpha during a DXT4 DDS
load. The code mirrors what other formats do by first checking to see if
the alpha value is not 0 before continuing.

Added the 218-byte file from the bug to the local test suite.

---------

Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
2023-08-24 20:46:59 -07:00
Mikael Sundell 38aed29bb0 build: Added check for Boost_NO_BOOST_CMAKE, ignore if already set (#3961)
Enable set of Boost_NO_BOOST_CMAKE through make using
MY_CMAKE_FLAGS=-DBoost_NO_BOOST_CMAKE:BOOL=OFF.

Signed-off-by: Mikael Sundell <mikael.sundell@gmail.com>
2023-08-24 13:06:56 -07:00
Jesse Yurkovich afe81598ca Fix(rla): Invalid read from an empty vector during RLA load (#3960)
The incoming length of the RLE data could be 0. In this case we would
attempt to take the address of the 1st element of an empty vector.

Added a new 1004-byte file to the local test suite.

Fixes #3951

---------

Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
2023-08-24 09:30:06 -07:00
Jesse Yurkovich cdc82185f1 cleanup: Fix typo in debug output (#3956)
Fixes a typo in the debug output triggered during the image plugin
search sequence.


Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
2023-08-24 09:25:09 -07:00
Larry Gritz 56c734a675 exr: Re-enable openexr core default when recent enough (#3942)
We had disabled the use of the "openexr core" library by default, even
for OpenEXR versions that nominally support it, when it was discovered
that it stil didn't support the DWA compression types.

That has finally been added to the OpenEXR trunk as well as the OpenEXR
3.1.10 release. When we are building against a sufficiently new OpenEXR
to fully support all the compression types for exr core, then re-enable
it by default.

Bump the "latest" CI tests to OpenEXR 3.1.11.

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-23 13:33:02 -07:00
Larry Gritz 8f423c9975 fix: various protections against corrupted files (#3954)
Fixes #3952

Several interrelated fixes to guard against corrupted files:

* Extend the `limits:imagesize_MB` sanity check to Targa files to
address #3952 specifically, and check in that failing example file into
the testsuite. (N.B.: Only a couple readers use this, TIFF and now
Targa. it should be extended to the others. Mackerel!)

* Improve the error message used for the above, both for Targa and TIFF.

* For low-memory situations, perhaps the default of 32GB is too large.
Make the default be the minimum of 32GB and 1/2 the size of physical
memory on the machine. (An app that legit expects humongous files is
expected to raise the limit appropriately.)

* The generic "Read error: hit end of file" we sometimes issued from
`ImageInput::ioread()` was hard to discern which reader it came from, in
cases where the file extension was absent or misleading and a succession
of files were tried. By changing this error message to say which format
reader triggered the error, it might make these errors easier to track
down in the future. This also changed the reference output of a few test
involving truncated or corrupted files.

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-23 13:32:09 -07:00
Larry Gritz 0fca55569d ci: Make more robust timer_test (#3953)
On overloaded VMs, the timer_test is ureliable and fails spuriously too
often.

Two strategies in this patch, hope some combination does the trick:

1. Increase the absolute error allowed for the timing tests when doing
CI runs.

2. Add just a bit more relative error (via a new unit test macro,
OIIO_CHECK_EQUAL_THRESH_REL).

Hopefully this will cut down on CI failures for unit_timer test case.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-21 14:59:26 -07:00
ShootfastandLarry Gritz 9909b4b109 build: Silence gcc new/delete warnings for texturesys (#3944)
Disable GCC warnings around mismatched new/delete for shared_texturesys
creation


Signed-off-by: Shootfast <markboo99@gmail.com>
Signed-off-by: Larry Gritz <lg@larrygritz.com>
Co-authored-by: Larry Gritz <lg@larrygritz.com>
2023-08-21 11:03:32 -07:00
Larry Gritz 629b205da4 dev(ustring.h): string literal operator for ustring and ustringhash (#3939)
* Add string literal operators for ustring and ustringhash so you can
write: ``` "foo"_us "bar"_ush ``` Note that on Cuda (but not on the
host), this ustringhash construction is constexpr.

* Add a new `ustringhash(const char*, size_t)` constructor, which is
also constexpr on the device side.

* Mark the existing `ustringhash(string_view)` constructor as constexpr
on the device side.

We can mark those things as constexpr on the device side because on the
Cuda side, the implementation only takes the hash (which is constexpr),
and does not actually add a ustring to the table (which cannot be
constexpr). To make such declarations easy, add a new macro to
platform.h, `OIIO_DEVICE_CONSTEXPR` which is constexpr for the device,
merely inline for the host.

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-20 18:03:59 -07:00
xiaoxiaoafeifei 15750af31a fix(bmp): fix signed integer overflow when computing total number of pixels (#3948)
fix #3947: runtime error: signed integer overflow in file
src/bmp.imageio/bmpinput.cpp:302
2023-08-20 10:26:19 -07:00
Larry Gritz c7f8169d73 admin: Update pull request and issue templates (#3946)
The most important fix is to remove links to the old CLAs and update
references to the mail list to the new one.

Also spruced up some language while I was there, hopefully to coax out
improved PRs and Issues.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-20 10:12:08 -07:00
Anton Dukhovnikov e3f666500b build: suppress Xcode warnings (#3940)
When building the code with Xcode ("cmake -G Xcode"), there are 1000+
warnings about implicit 64 to 32 bit conversion.
This change adds a compile option to suppress such warnings when
generating an Xcode project.

Signed-off-by: Anton Dukhovnikov <antond@wetafx.co.nz>
2023-08-11 07:39:55 -07:00
Larry Gritz 81a1c221bb admin: Relicense code under Apache 2.0 (#3938)
This is Update 3, the original PR is ongoing and we will continue to
update as additional people relicense.

Per PR #3905 (https://github.com/OpenImageIO/oiio/pull/3905), update the
RELICENSING document with the names of people and companies who have
signed on to the relicensing thus far, and update the SPDX license
notices on source files whose extant authorship (per 'git blame')
comprises only authors who have relicensed.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-08-03 21:01:32 -07:00
NicolasandLarry Gritz 1bb1ca591a fix: utf-8 text rendering (#3935)
Text rendering doesn't work with utf-8... 

I can't render chinese, arabic... or special chars as éèûîà...

It seems that the string function to convert utf-8 to unicode is quiet
simple.

Fixes #3933 

[Note]: OpenImageIO is used in the [gpx2video
project](https://github.com/progweb/gpx2video).

---------

Signed-off-by: Nicolas VIVIEN <nicolas@vivien.fr>
Signed-off-by: Larry Gritz <lg@larrygritz.com>
Co-authored-by: Larry Gritz <lg@larrygritz.com>
2023-08-03 10:46:16 -07:00
Larry Gritz 9e42bd1228 Docs: Make sure README has links for slack and meetings (#3936)
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-31 22:17:02 -07:00
Larry Gritz 6e603475a8 api: extend TypeDesc and ParamType to represent ustringhash (#3915)
I think it will be handy to be able to have ParamValue contain
ustringhashes and have a TypeDesc that can describe it explicitly.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-30 16:47:01 -07:00
Larry Gritz 353e0222d5 build(deps): Raise OpenEXR minimum from 2.3 to 2.4 (#3928)
This will not be backported to the release branch, it's only for OIIO
2.5 and later.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-29 13:37:41 -07:00
Larry Gritz 81cb1a433c build(deps): Raise minimum libraw to 0.18 (#3921)
Rationale:

* LibRaw 0.18 was released in last 2016, so we are stil supporting all
libraw from up to 6 years back.
* LibRaw 0.18 is necessary for ACES, plus it improves a lot of metadata
handling.
* LibRaw 0.20 is the minimum that can be used when compiling with C++17,
and we will almost certainly move to C++17 as a minimum in OIIO 2.6, so
it seems like LibRaw 0.18 is reasonable minimum for the upcmoming 2.5.

Remove some cruft that's no longer necessary if we drop support for
0.15-0.17.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-29 11:34:36 -07:00
Larry Gritz 004cbb0238 build(deps): Raise minimum CMake dependency from 3.12 to 3.15 (#3924)
This bump brings access to the following interesting features (not a
comprehensive list):

- 3.13  Nov 21, 2018 

    - -B, -S let you specify source and build directories without the "cd" dance
    - target_link_options() 
    - ctest --progress / CTEST_PROGRESS_OUTPUT

- 3.14  Mar 14, 2019 

    - cmake --build now supports -v/--verbose 
    - file(CREATE_LINK ) 
    - FindGIF now has imported targets

- 3.15  Jul 17, 2019 

    - env CMAKE_GENERATOR can be used instead of -G 
    - when using --build, the --target can now list multiple targets (and also can be `-t`)
    - --install can be used separately without running through the whole build
    - message() now supports NOTICE, VERBOSE, DEBUG and TRACE. 
    - CMAKE_FIND_PACKAGE_PREFER_CONFIG variable 
    - Enable C++20 for Apple Clang

Make sure all CI cases have a new enough cmake

Use GIF targets, now enabled with CMake 3.14

Use message(VERBOSE ...) feature to simplify lots of `if` blocks.

Clean up code for older cmake versions

Note that this will NOT be backported to the current release branch,
but it will be part of the upcoming 2.5 family of reseases.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-29 11:00:24 -07:00
Jesse Yurkovich c97826c144 fix(python): Fix arithmetic overflow in oiio_bufinfo (Python interop) (#3931)
When an incoming 1-dimensional, buffer-like, object was used in Python,
the corresponding check inside OIIO would overflow if its length
exceeded a signed 32bit value.

An error similar to `Pixel data array error: Python array shape is
[2304000000] but expecting h=24000, w=24000, ch=4` would be raised.

I modified a few similar calculations and tried to follow the
predominant pattern already used.

Tested using the following snippet which would previously fail:
```
import OpenImageIO as oiio
import numpy as np

filename = "t:/foo.png"
xres = 24000
yres = 24000
channels = 4  # RGB
pixels = np.zeros(xres * yres * channels, dtype=np.uint8)

spec = oiio.ImageSpec(xres, yres, channels, "uint8")
image = oiio.ImageOutput.create(filename)
image.open(filename, spec)
if not image.write_image(pixels):
    print("error = ", image.geterror())
image.close()
```

---------

Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
2023-07-29 09:50:16 -07:00
Larry Gritz 3dd4951fe2 build: bump build_openexr and build_opencolorio defaults to latest versions (#3920)
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-29 09:45:40 -07:00
Larry Gritz d65eb6597b admin: Relicense code under Apache 2.0 (#3926)
Per PR #3905 (https://github.com/OpenImageIO/oiio/pull/3905), update the
RELICENSING document with the names of people and companies who have
signed on to the relicensing thus far, and update the SPDX license
notices on source files whose extant authorship (per 'git blame')
comprises only authors who have relicensed.

This is part 2, the original PR is ongoing and we will continue to
update as additional people relicense.

Signed-off-by: Larry Gritz <lg@larrygritz.com>

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-28 22:49:34 -07:00
Larry Gritz 88c10a91cb docs: Put logo on the main readme (#3927)
Add some logo images in ASWF/logos for handy use.

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-27 17:00:17 -07:00
Larry Gritz 712a73818f ci: Lock down icx version (#3929)
Intel's servers have again updated the default icx that you get when you
install from their yum repository, and the new one seems incompatible
with our libstdc++ toolchain. So lock down on 2023.1.0 for now so that
our CI can pass.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-27 09:15:05 -07:00
Larry Gritz b205899131 refactor: Convert iconvert.cpp stream io and sprintf to modern (#3925)
Also fix a typo

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-24 19:04:56 -07:00
Curtis BlackandLarry Gritz d757bffca5 perf(TS): Remove redundant instructions from tile hash (#3898)
Optimises the code in the tile hash function. During a render this
function is called billions of times so this small improvement adds up,
in some test scenes it reduces total render time by an average of about
2%.

See https://godbolt.org/z/jMzz4PTce for the exact details. A summary
would be:

- Reduced instruction count from 75 to 61, this is due to the redundant
  add and shift operations that can be implicitely handled by taking
  advantage of the member layout in the class.
- Halves the number of memory fetch instructions because all accesses
  are now 64-bit.
- Removes branching instructions and extra memory indirection inside
  `ustring::hash()`.

There is a slight change in behaviour, which is that the hash is now
computed from the `m_file` pointer rather than from
`m_file->filename().hash()`, so runtime reproducibility is lost. However
the performance gain seems worth it.

Signed-off-by: Curtis Black <curtis.w.black@gmail.com>
Signed-off-by: Larry Gritz <lg@larrygritz.com>
Co-authored-by: Larry Gritz <lg@larrygritz.com>
2023-07-24 18:06:45 -07:00
jasonbaumeister 9fd9fbfdc2 feat(ico): Add IOProxy support to ICOInput (#3919)
This updates ICOInput to use the IOProxy model so it can read from files
or the IOMemReader

Signed-off-by: Jason Baumeister <jason@jasonbaumeister.com>
2023-07-22 19:16:27 -07:00
jasonbaumeister 88d354e068 fix(psd): CMYK PSD files should copy alpha (#3918)
During the CMYK to RGB conversion in PSDInput, the alpha channel was
never copied to the RGBA output. Converting a PSD to JPEG worked because
it ignored all the 0 alpha values, but converting to WebP would result
in a fully transparent image.

I added a cmyk-with-alpha.psd test to the psd-colormodes test to check
this

Signed-off-by: Jason Baumeister <jason@jasonbaumeister.com>
2023-07-22 12:21:56 -07:00
Larry Gritz e297a3ba0d ci: Test against pybind11 v2.11 (#3912)
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-22 11:52:30 -07:00
D-Spirits e203bd6d27 Admin: Add DevilishSpirits to RELICENSING.md (#3922)
For the relicensing request in #3905 and signed with my personal PGP
key.
2023-07-22 10:43:54 -07:00
Larry Gritz 780fe682c9 build: Fix broken OIIO_NO_NEON definition (#3911)
Clean up the `#if` tests that disable Intel SIMD when not on Intel
architectures, which incorrectly disabled ARM NEON when on ARM.

Fixes #3909

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-16 21:44:28 -07:00
Jesse Y b1f5265642 docs: Update ImageInput docs to not use deprecated APIs (#3907)
Update the ImageInput documentation to not use the deprecated
`read_image` APIs.

Based on the discussion in #3902

---------

Signed-off-by: Jesse Yurkovich <jesse.y@gmail.com>
2023-07-15 12:30:32 -07:00
Larry Gritz b257b8e6a0 admin: Relicense code under Apache 2.0 (#3914)
Per PR #3905 (https://github.com/OpenImageIO/oiio/pull/3905), update the
RELICENSING document with the names of people and companies who have
signed on to the relicensing thus far, and update the SPDX license
notices on source files whose extant authorship (per 'git blame')
comprises only authors who have relicensed.

This is part 1, the original PR is ongoing and we will continue to
update as additional people relicense.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-15 12:28:45 -07:00
Benjamin Buch 3c86a882cd build: Find OpenEXR equally well with our FindOpenEXR and exr's exported config file (#3862)
If OpenEXR is found by cmake config file, OpenEXR_VERSION is set instead of OPENEXR_VERSION

Signed-off-by: Benjamin Buch <benjamin.buch@technoteam.de>
2023-07-13 17:59:12 -07:00
Benjamin Buch a27b55a867 build: Fix WebP linking if CMAKE_FIND_PACKAGE_PREFER_CONFIG is ON (#3863)
Our own FindWebP.cmake was setting up targets that didn't
match the capitalization of the cmake configs that come with WebP itself.

Signed-off-by: Benjamin Buch <benjamin.buch@technoteam.de>
2023-07-13 16:59:50 -07:00
Larry Gritz 0aee3bb863 admin: Mark more files that LG has contributed to as 'and Apache-2.0' (#3906)
This batch is for files that LG (relicensed!) has contributed, in
addition to >2 other authors. Also add appropriate license notices to
some that had no posted license before due to oversight.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-10 15:06:46 -07:00
Larry Gritz 944c2034c8 docs: Document CVE
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-08 20:33:01 -04:00
Larry Gritz 3e1a6d5540 admin: Copyright and license notice updates (#3904)
* Add copyright/license notices to some mixed-authorship files that
lacked them before (all related to tests)
* Get rid of the pointless year in many copyright notices (change to the
current LF recommended wording)

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-06 06:44:42 -04:00
Larry Gritz eda748ef0e admin: update licensing (#3903)
Since LG has re-licensed all his old code under Apache-2.0, we can
change the license notice from BSD to Apache-2.0 for all files in which
LG is the only extant author. Also change all files that LG co-authored
with other people to specify "BSD-3-Clause and Apache-2.0".

Some files (mostly test scripts) had no license notice, so in those
cases, we added one.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-05 21:32:04 -04:00
Larry Gritz 42c629ffef admin: Change open source license to Apache 2.0 (#3899)
By majority vote of the TSC, we are changing OpenImageIO's main
incoming/outgoing open source license from BSD-3-Clause to Apache-2.0.
New code submitted from July 1, 2023 will be contributed under the
Apache 2.0 license.

Old code submitted prior to July 1 2023 is under the original BSD
3-clause license, unless relicensed per the process described in the new
RELICENSING.md file. We hope to get the vast majority of the code base
relicensed quickly and we will document which set of files contain a
mixture of licenses.

Instructions to everybody reading this:

* If you are contributing code under the authorization of an employer,
please let them know we are changing to Apache 2.0 and make sure that
you are authorized to make all future contributions to under that
license.

* If you made prior contributions to OpenImageIO over the years and are
willing to relicense your code under the Apache 2.0 license, please
submit a PR adding your name to the list in RELICENSING.md. If you were
working for a company that might own your IP output at the time you made
those contributions, please also ask somebody there (who has the
authority to do so) to submit a PR adding the company name as well,
indicating that they are re-submitting all of the old contributions
under the new license.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-01 11:59:56 -07:00
Larry Gritz 692b7899d7 admin: Remove old CLAs that are no longer in effect
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-01 11:58:42 -07:00
Larry Gritz f3eaebc8b8 admin: Add charter and other ASWF documents to the repo (#3850)
By unanimous vote of the OpenImageIO TSC, as of July 1, 2023, we
adopt the technical charter, Code of Conduct, new CLAs, and GOVERNANCE
document.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-07-01 11:55:22 -07:00
Larry Gritz 3fd70cfd35 fix(strutil.h): ensure proper constexpr of string hashing (#3901)
The underlying farmhash algorithm (which is the basis for
Strutil::strhash, and thus ustring's hash representation) turned out to
not be properly constexpr under certain circumstances and needed to be
expressed a different way to be fully constexpr on all platforms and for
all strings.

New implementation suggested by Alex Wells.

Also, make sure string_view ctr from char* can be constexpr, even for
C++14. This is related for the sake of the strhash calls that, when
taking string literals, actually choose the variety that accepts a
string_view.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-30 22:01:18 -07:00
Larry Gritz d18c7e27f2 ci: Get rid of long-unused install_test_images.bash (#3895)
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-29 22:56:00 -07:00
Larry Gritz 77975c6ae2 testing: Fix missing simd test due to copy paste typo (#3896)
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-29 22:55:38 -07:00
Larry Gritz a8291872c7 docs: Document use of the DCO which is now required for all PRs (#3897)
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-25 21:25:57 -07:00
Larry Gritz 87a1e49b2d docs: Add repology badge to README and package versions to INSTALL (#3893)
repology has a handy tool that will show all the package distros
and which version of openimageio they supply.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-24 21:11:21 -07:00
Larry Gritz 20d2927224 ci: Simplify build_llvm.bash script (#3892)
* Remove leftover logic from when we used TravisCI.
* Pick a default for LLVM_DISTRO_NAME so it works when the script is run
standalone when not on GitHub Actions CI. (But it's still really only
meant to run on x86 Ubuntu, and not designed for anything useful outside
of our CI.)
* Eliminate all the complexity with old LLVM versions -- in practice,
our CI only uses this to download fairly modern clang versions.

Fixes #3891

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-24 21:10:36 -07:00
Larry Gritz 150af5a36e ci: Fix broken heif dependency and test (#3894)
The strukturag repo for libheif recently upgraded the version it was
serving from 1.14 to 1.16, and that caused our tests to fail because (a)
some of the codec support has been moved to plugins that are loaded at
runtime and those are now distributed in packages we need to install
separately; (b) you must call heif_init() or it won't know about the
optional plugins.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-24 21:07:34 -07:00
Larry Gritz ca4a245aec docs(raw): Fix explanation of raw:Exposure config hint (#3889)
Fixes #3888

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-17 13:05:55 -07:00
Larry Gritz 612bbbd0d0 fix(IBA): Improve error message for IBA::ocio functions (#3887)
If colorconvert, ociolook, ociodisplay, ociofiletransform fail
because OCIO support is not enabled, make sure the error message
makes that clear.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-16 18:52:34 -07:00
Fabien Servant @ TCS bdf31de0c3 fix(exif): Convert paramvalue string to integer when needed (#3886)
Make sure we can input exif tags as strings containing numbers when
number are required.

E.G. if my input is "Orientation"=>"8", i would like the jpeg output to
contains the value 8 for the exif tag orientation.
2023-06-16 13:41:13 -07:00
Larry Gritz a3d9900bab fix(exr): correction to dwa vs zip logic when outputting OpenEXR (#3884)
PR #2147, addressing issue #1844, is related to an apparent OpenEXR bug
wherein single channel tiled images where the tile dimensions were not a
power of 2 and >= 16 would not work properly with dwa compression. We
work around the problem by automatically substituting zip compression in
those cases. But it was implemented with a subtle bug, forgetting that
tile_size == 0 for untiled images, and thus we were silently switching
from dwa to zip compression for all *untiled* single channel images of
any size (which presumably were never problematic). This patch fixes the
test so we are not changing the compression for the untiled files.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-14 11:39:14 -07:00
Larry Gritz fd33ab67c1 fix(jpeg2000): better pixel type promotion logic (#3878)
J2K output was defaulting to UINT8 when asked to output an unsupported
type. It should have been UINT16 to try to minimize the amount of
precision loss.

Fixes #3876

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-14 10:59:24 -07:00
Larry Gritz 7d9a19b5d9 admin: Update mail list URL (#3880)
Everybody please go to https://lists.aswf.io/g/oiio-dev and sign up for
the new mail list as soon as possible. The old list is on its last legs
and having trouble, let's get this done.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-13 14:58:32 -07:00
Ray Molenkamp 577f10858a fix(api): Add shutdown method (#3882)
This change adds a `shutdown()` method to the API that can be used to
perform shutdown of the thread-pool(s) (or other clean-up activities).
Applications that utilize OpenImageIO are advised to call it before exiting their
main function to prevent possible deadlocks during application shutdown
(see #3851)

This change also updates the documentation and all oiio-tools to call
the new `shutdown` method.

This is the final change for fixing #3851
2023-06-13 14:14:19 -07:00
Ray Molenkamp 2abd946ea5 fix: Wait for terminated threads to join in thread_pool::Impl::resize (#3879)
Part of solving #3851.

When decreasing the number of threads in `thread_pool::Impl::resize` it
was possible for the threads marked for termination to still be fully
alive at process exit time if the call to `resize` and the exit of the
main function were close enough to each other.

This change makes `resize` wait for the threads to actually join
guaranteeing the threads have been shut down in a orderly manner when
the `resize` function exits.
2023-06-12 16:39:19 -07:00
Larry Gritz c9f0c93f73 New function: default_thread_pool_shutdown() (#2382)
This cleanly terminates all worker threads of the default thread pool
by resizing the pool to 0 threads... but only if the pool has been
created in the first place. Note that the alternate idiom

    default_thread_pool()->resize(0);

seems like it should accomplish the same thing, but in fact will start
by creating a pool and its threads, if it has not done so before, only
to immediately terminate them.

---------

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-12 16:37:07 -07:00
Larry Gritz 407e14ec3f ci: Add test with new aswf containers for VFX Platform 2023 (#3875)
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-12 09:47:58 -07:00
Larry Gritz f95ff86e43 build: Fix fmt vs gcc warning that had version typo (#3874)
The comment was right, but the test seems to have had a typo we didn't
catch in review.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-12 09:47:40 -07:00
Larry Gritz 8da473e254 fix(psd): Prevent simultaneous psd thumbnail reads from clashing (#3877)
When reading a PSD file, if it contains a thumbnail, we read it from the
in-memory blob with a combination of an IOMemReader and an ImageBuf.
But... we always named it "thumbnail.jpg" without considering that
multiple simultaneous PSD files reading identically named images (but
which are in fact different) could cause a weird kind of clashing in any
underlying use of ImageCache!

The simple fix is to use ordinary ImageInput approach to reading the
thumbnail from the IOMemReader, but just store it in the ImageBuf.

Fixes #3824

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-12 09:47:04 -07:00
xiaoxiaoafeifei aad99bad9a fix(ico): heap-buffer-overflow (#3872)
heap-buffer-overflow in function ICOInput::readimg 

fixes #3871
2023-06-08 21:48:12 -07:00
Larry Gritz 1cd0d0a9df build: Fix use of OIIO_LOCAL_DEPS_PATH (#3865)
We set it, but we didn't use it where it was intended.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-08 19:05:42 -07:00
Larry Gritz e56eab4b36 fix(simd.h): Fix sense of hiding deprecated type names (#3870)
I got the test backwards, and it was incorrectly hiding the definition
for the default case of OIIO_DISABLE_DEPRECATED == 0.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-08 17:42:29 -07:00
Jesse Y 109f0bdba0 docs: Many fixes to python code examples (#3869)
A variety of minor documentation fixups:
- Use Python 3 style 'print' statements consistently everywhere (some
snippets had a mix of both)
- Correct the usage of `ImageSpec::channels` that should be
`ImageSpec::nchannels`
- Template syntax errors in two C++ snippets
- Document the new default for `max_memory_MB`
2023-06-07 23:25:57 -07:00
Ziggy Cross 116a1f1a25 ImageInput and ImageOutput docs updated to Python 3. (#3866)
## Description

Fixes #3846 by updating Python examples.

Current code examples for
[ImageInput](https://openimageio.readthedocs.io/en/latest/imageinput.html)
and
[ImageOutput](https://openimageio.readthedocs.io/en/latest/imageoutput.html)
raise a SyntaxError in Python 3:
```python
File "<cwd>\main.py", line 13
    return
    ^^^^^^
SyntaxError: 'return' outside function
```

It seems these code examples might be for Python 2.7. Perhaps it would
be worth creating an extra tab instead of replacing the old code?

## Tests

Tested on Python 3.11, no issues.

## Checklist:

- [x] I have read the [contribution
guidelines](https://github.com/OpenImageIO/oiio/blob/master/CONTRIBUTING.md).
- [ ] If this is more extensive than a small change to existing code, I
  have previously submitted a Contributor License Agreement

([individual](https://github.com/OpenImageIO/oiio/blob/master/src/doc/CLA-INDIVIDUAL),
and if there is any way my
  employers might think my programming belongs to them, then also

[corporate](https://github.com/OpenImageIO/oiio/blob/master/src/doc/CLA-CORPORATE)).
- [x] I have updated the documentation, if applicable.
- [ ] I have ensured that the change is tested somewhere in the
testsuite
  (adding new test cases if necessary).
- [x] My code follows the prevailing code style of this project.
2023-06-07 23:02:25 +00:00
Larry Gritz cfaccc1609 CHANGES and stage for 2.5.2.0 developer preview
Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-06 12:27:28 -07:00
Larry Gritz f40f9800c8 feat(oiiotool): oiiotool --parallel-frames (#3849)
Background info: oiiotool multithreads *within* any individual image
operation (such as `--over`), but a series of operations comprising the
oiiotool command are done serially -- each command finishes before the
next starts. And similarly, for multi-frame operations using frame
ranges, frame number wildcards, or view wildcards, the set of commands
for each frame runs to completion before the next begins. For complex
oiiotool commands, especially when running over frame ranges, this is
not a particularly efficient way of parallelizing, since any serialized
operation (which often includes the expensive writing of the result
image from each frame to disk) can substantially serialize the entire
run.

This PR adds a new oiiotool --parallel-frames option that assumes all
frames in the range can be computed independently and in any order, and
can therefore be run in parallel. As long as there are a similar number
(or more) of frames versus cores, and you have enough RAM to handle that
many image pipelines at once, this is a more efficient way of
parallelizing the operations than multithreading individual image
processing operations.

Benchmarking: On my 32-core workstation, I tried the following oiiotool
command, contrived but representative of a reasonable oiiotool command
complexity that might be a production task:

oiiotool --runstats -v --frames 1-100 tmp/noise.exr -cut
2880x1620+960+540 -resize 1920x1080 -colorconvert lin_srgb srgb -d uint8
-o "tmp/test.#.tif"

The noise.exr file was a previously created 4k x 3channel 'half' exr
image. The command loads the file, cuts out a 3k section of it, resizes
that to HD res, does a color space transformation, then outputs as an 8
bit TIFF file, for each of 100 sequential frames.

    threads   real time    user  sys      peak memory
    1         4:44         4:23  0:21     122 MB
    2         2:58         4:24  0:29     122 MB
    4         1:40         4:36  0:29     122 MB
    8         1:10         5:00  0:30     127 MB
    16        0:56         5:28  0:37     131 MB
    all(32)   0:55         8:12  0:54     127 MB

    parallel  0:25         8:13  1:04     3.4 GB

Here we can see the diminishing returns of using multiple threads within
each frame, where for low thread counts we are improving steadily, but
we pretty much peak at 16 threads, seeing virtually no further gain at
32, and maxing out at about 5x the single threaded performance. This is
due to serialization of the I/O and increasingly bumping into various
locking at higher thread levels.

However, using `--parallel-frames` gives us another doubling of total
throughput (giving us a total of 11.3x speedup versus single threaded),
though at the expense of 28x the memory use! That memory explosion is
acceptable in this case, even 3.4 GB is really nothing on a modern
machine, but we can imagine that other possible oiiotool command lines
might be more memory intensive and having dozens of frame pipelines
computing simultaneously would have problematic memory use. So use this
feature carefully and with purpose, always checking that your own
workflows experience sufficient speedup and don't use more memory than
you have available.
2023-06-06 09:30:15 -07:00
Larry Gritz ee3dc556b8 fix(exr): try to improve exr thread pool weirdness (#3864)
There's some code I put in not long ago to automatically call exr's
thread pool setNumThreads(0) upon exit, as an attempt to work around
some exr thread pool deadlock conditions. But... we've seen some
weirdness from this workaround as well, so try to limit its application
by not bothering when using OpenEXR >= 3.1.8 (at which point we believe
the exr side bug was fixed) and also to do so only on Windows.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-06 09:25:59 -07:00
Larry Gritz 13e1e802c0 feat(OpenCV): Improve OpenCV support -- errors, version, half (#3853)
Various improvements to OpenCV support:

* IBA::from_OpenCV and to_OpenCV now set error messages for every type
of failure they encounter, instead of returning false with no
explanation. For from_OpenCV, the error message can be retrieved from
the ImageBuf returned; for to_OpenCV, the error message can be retrieved
from the global OIIO::geterror(). Several assertions were removed,
instead relying on error return codes and messages.

* Add global OIIO attribute "opencv_version" which allows you to find
out what version of OpenCV OIIO was built against, which was previously
impossible to know without seeing the build-time status messages. This
can be retrieved via

      OIIO::get_int_attribute("opencv_version")

  and also you can find out from the command line with

      oiiotool --echo "{getattribute(opencv_version)}"

The return value is an integer encoded as `10000*major + 100*minor +
patch`, and it will return 0 if no OpenCV support was enabled when
OpenImageIO was built.

* For OpenCV >= 4.0, to_OpenCV can now correctly construct a 'half'
matrix. For OpenCV 3.x, we turn it into a float matrix as before, since
CV_16F was only supported starting in 4.0.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-02 10:20:51 -07:00
Larry Gritz cb6475c0dd docs: Update CONTRIBUTING and SECURITY (#3852)
Just a routine update of these files as I proofread them in light of the
move to ASWF. This patch is addressing the "old" project, there will be
further ASWF-specific edits for changes that will take effect after the
project is fully moved.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-01 23:58:53 -07:00
Loïc Vital eaa2c2ae37 fix(jpeg): fix density calculation for jpeg output (#3861)
In `jpegoutput.cpp` when computing the density fields the relationship
between `XRes`, `YRes` and `aspect` is `aspect = XRes / YRes`.

However this relationship was not respected in one specific case, when
`aspect >= 1.0` and `XRes` and `YRes` are not set.

This PR solves this problem by enforcing the correct relationship.

Related to: https://github.com/OpenImageIO/oiio/issues/2822
2023-06-01 22:03:23 -07:00
Larry Gritz e47e501eb0 ci: Fix package name for icc (#3860)
The Intel yum repo renamed this package a couple weeks ago, and it broke
our CI. Update to the new name.

Adjust fmt use to solve icc warning.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-06-01 07:31:29 -07:00
Loïc Vital cf2b7d7995 fix(raw): raw input fix user_flip usage (#3858)
When reading a raw image, setting the `user_flip` to 1 meant ignoring
the `flip` value (to avoid buffer rotation from LibRaw).

However the value 1 for the `user_flip` is **not neutral**: values lie
between 0 and 7 (see
https://www.libraw.org/docs/API-datastruct-eng.html#libraw_image_sizes_t),
and 1 corresponds to a horizontal mirror (in my understanding of the
source code).

The proposed fix is to use 0 as `user_flip` value for ignoring the
`flip` value.

This modification invalidates the changes made in this PR:
https://github.com/OpenImageIO/oiio/pull/3847.
Therefore, flip to orientation conversion has been adapted to match
exactly LibRaw's documentation, which handles only rotations (+90, +180,
-90 degrees).

The previous PR was only tested on images of landscape and human faces,
hence the mirroring issue remained unnoticed.
When reading images containing text however the problem is clearly
visible.
This PR fixes this mirroring issue on the following 4 orientations: 0,
+90, +180 and -90 degrees rotation.
Other orientations could not be tested as they don't seem to ever appear
on raw images datasets.
2023-05-31 09:01:37 -07:00
Larry Gritz b3d9c8c4ed build(Mac): Fixes for latest xcode on MacOS 13.3 Ventura (#3854)
I found that this was needed after weekend OS update of my laptop.

Also added MacOS-13 CI test.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
2023-05-29 08:44:46 -07:00
Larry Gritz 6f7db0775e refactor(oiiotool): Get rid of the global Oiiotool singleton. (#3848)
Make all oiiotool actions take ot as a parameter.

This is a necessary first step to being able to parallelize over frame
ranges.

Also finally convert the last of the `int argc, const char**argv` idioms
to `cspan<const char*>`.
2023-05-23 23:08:34 -07:00
Loïc Vital 5ca9ffea7a fix(raw): fix LibRaw flip to Exif orientation conversion (#3847)
When reading a raw image while having a `user_flip` set to 1, we set the
orientation Exif tag to LibRaw's flip value (so that LibRaw doesn't
rotate and/or mirror the buffer but the image still gets displayed
correctly).

However LibRaw's convention for flip values differ from Exif orientation
values: https://www.libraw.org/comment/5176#comment-5176.

In this PR we fix this issue by converting LibRaw flip values to Exif
orientation values. This conversion is based on:
- https://www.libraw.org/comment/5178#comment-5178 (conversion proposed
by LibRaw's maintainer)
-
https://github.com/LibRaw/LibRaw/blob/6fffd414bfda63dfef2276ae07f7ca36660b8888/src/write/file_write.cpp#L22
(LibRaw's function for applying the flip).

Tested on:
- CR2 images with flip values 1, 5 and 6
- ARW images with flip values 1 and 5
(unfortunately I could not find any image covering other flip values).

Since the conversion is `[1, 2, 3, 4, 5, 6, 7, 8] -> [1, 2, 4, 3, 5, 8,
6, 7]`, the only test that came out with different results before and
after the change is the one with flip value 6:
in that case, the image orientation got corrected by the fix.
2023-05-19 18:43:56 -07:00
Jesse Y 1f6d137434 feat(ImageInput): Implement valid_file(IOProxy) overloads for DDS, PSD, and WEBP (#3831)
Following up #3826, this implements efficient `valid_file` support for
DDS, DPX, PSD, HDR, and WEBP.

The quick magic/signature checks were abstracted into small helper
functions where necessary to eliminate duplicate code.

For WEBP, some redundant checks were also removed and there's also a fix
for a `uint64_t` vs `size_t` check which would have caused issues on
32-bit builds.

The PSD changes exposed an issue with array attributes. During a normal
ImageInput create+open sequence, an ImageInput may be opened then closed
and then opened again.

Array attributes are not cleared as part of close and so their contents
will be doubled up next time they are read into the existing `m_spec`.
This PR does not fix that general problem but now that PSD has a proper
valid_file which doesn't do an open, the array attributes are now
correct:

```
This PR
2023-05-06T02:32:05.8774584Z -    photoshop:ColorMode: 3
2023-05-06T02:32:05.8774888Z -    photoshop:ICCProfile: "sRGB IEC61966-2.1"
2023-05-06T02:32:05.8775194Z -    photoshop:LayerName: 1, 2, 3
2023-05-06T02:32:05.8775436Z -    photoshop:LayerText: 1, 2, 3

vs. the current
2023-05-06T02:32:05.8775725Z +    photoshop:ColorMode: 3, 3
2023-05-06T02:32:05.8776023Z +    photoshop:ICCProfile: "sRGB IEC61966-2.1"
2023-05-06T02:32:05.8776494Z +    photoshop:LayerName: 1, 2, 3, 1, 2, 3
2023-05-06T02:32:05.8776746Z +    photoshop:LayerText: 1, 2, 3, 1, 2, 3
```
2023-05-17 14:23:51 -07:00
xiaoxiaoafeifei e5733a0607 fix: prevent heap-buffer-overflow in file src/gif.imageio/gifinput.cpp, line 368 (#3841)
Fixes #3840
2023-05-17 14:20:52 -07:00
Larry Gritz 23b0e2beae fix(int): prevent possible deadlock when reaading files with wrong extensions (#3845)
Make pvt::imageio_mutex be a recursive_mutex

Fixes #3842
2023-05-17 09:14:06 -07:00
Larry Gritz c8c8ea5cac docs(internal): Add links for dds format documentation 2023-05-16 12:15:54 -07:00
Larry Gritz dce61b3c5b fix(oiiotool): don't propagate unsupported channels (#3838)
Fixes #3837

oiiotool already attempted to trim extra channels when outputting to a
format that can't support it. It correctly handled the two common cases:

* More than 4 channels for formats that don't have
`supports("nchannels")` will drop after the first 4 channels.
* More than 3 channels for formats that don't have `supports("alpha")`
will drop after the first 3 channels.

But this omits an interesting (but rare) corner case: a 4 channel file
where the last channel is NOT alpha, and the output file supports an
alpha channel but not arbitrary channels. A concrete example might be an
input file that is exr with channels R, G, B, Z, writing to a PNG file
(which can support RGB or RGBA). We wouldn't want to write what appears
to be an RGBA file if that last channel isn't really alpha.

Also, noticed that oiiotool --chnames didn't properly clear the
alpha_channel and z_channel flags, which is important if the new channel
lists drop one of those channels.
2023-05-14 15:00:29 -07:00
Larry Gritz f27a974c34 build(deps): fmt 10.0 support (#3836)
fmt 10.0 was recently released, and it breaks a lot for us because they
have fully removed legacy support for automatically being able to format
anything that has an iostream `<<` operator. This facility was deprecatd
in 8.1 but could be re-enabled with FMT_DEPRECATED_OSTREAM, but even
that was removed in 10.0.

So this means that we had to write several explicit format handlers for
some types for use with format() and print().

Also, they are even more strict with sprintf/printf which don't honor
the custom formatters as far as I can tell, so in several cases I also
switched those to the std::format/print style.

Fixes #3835
2023-05-14 00:50:06 -07:00
Larry Gritz 81e4bd2fa7 build(cmake): Fix incorrect variable name to control symbol visibility (#3834)
As Fabrice Macagno points out on the mail list, we weren't setting the
correct variable name CMAKE_CXX_VISIBILITY_PRESET.

Fixing this -- and finally hiding all the symbols correctly -- uncovered
an instance where testtex was relying on some classes that should have
been hidden in libOpenImageIO. For symbol visibility reasons, move the
functionality of testtex's test_hash() function to be in TextureSystem
itself. This is a much cleaner separation.
2023-05-14 00:49:42 -07:00
Larry Gritz 4250d71093 cleanup: root out deprecated simd type names; OIIO_DISABLE_DEPRECATED (#3830)
We have some OIIO 1.x era type aliases float4, int4, etc., for the
simd types that have long since been renamed vfloat4, vint4, etc.
Hide those aliases when buiding OIIO itself, to be sure we aren't
inadvertently using them. And indeed, in one spot, we were! (Fix it.)

Introuce a new preprocessor symbol, `OIIO_DISABLE_DEPRECATED`, which
if set to an encoded version number (such as 20100 for version 2.1) by
a downstream package, indicates that we are permitted to hide
declarations that were considered deprecated from that version
on. This is an aid to downstream projects who wish to enforce that
they are not inadvertently using any deprecated OIIO calls which may
disappear in a future release.

So back to the deprecated simd names: Also hide them if
`OIIO_DISABLE_DEPRECATED` is defined to exclude things that were
deprecated as of OIIO 1.9+, which apparently is when we changed this
definition.
2023-05-14 00:49:02 -07:00
Larry Gritz 5152be9a57 ci: Fix warnings (#3833)
I'm honestly not sure why some GHA CI jobs suddenly started warning
about this in the past day or so. Something must have updated on their
end. But switching to the safer Strutil equivalents fixes it.
2023-05-09 14:29:53 -07:00
Ray Molenkamp 0a39c2c993 Fix: Build error with MSVC (#3832)
`ssize_t` is a posix type, msvc seemingly doesn't know about leading to
a build error with MSVC 2019

usage elsewhere in this files used the `py::ssize_t` type, which seems
to fix this
2023-05-08 11:54:26 -07:00
Ray Molenkamp a02327df53 Fix: Build error with MSVC (#3832)
`ssize_t` is a posix type, msvc seemingly doesn't know about leading to
a build error with MSVC 2019

usage elsewhere in this files used the `py::ssize_t` type, which seems
to fix this
2023-05-08 11:53:15 -07:00
Larry Gritz e1dcef1453 Add a helpful link to the comments 2023-05-08 10:57:46 -07:00
Larry Gritz 617eeed554 Improve make_texture for very large images (#3829)
`make_texture()` already took a configuration option "maketx:forcefloat"
(defaults to 1), which if set to 0 disables the conversion to a float
buffer for intermediate computation.

For `oiiotool -otex`, there was no way to specify this. This patch
allows it to be disabled with the new optional modifier
`-otex:forcefloat=0`.

Also, in make_texture, this option only controlled the initial
conversion of the whole buffer to float, but the downsized levels all
were float either way. This patch now uses the forcefloat config option
to also control the buffers used for downsizing.

Disabling forcefloat like this has a speed penalty (the downsizing math
on float buffers is faster than going in and out of float for every
indvidual value) and loses some precision in the process of repeatedly
downsizing to generate the MIP levels. But it can sure save a lot of
memory if you have a ginormous uint8 image and want to avod the 4x
balooning of memory. I don't recommend disabling forcefloat except for
images that can't fit into memory for the texture creation without it.
But when this is the right hammer to use, it can be the difference
between being able to create the texture, or not.

Some other improvements:

* `oiiotool -otex` wasn't outputting ANY status output during texture
output as maketx does, and for that matter, -v and -debug were not being
influencing the behavior of make_texture at all despite it having such
support. So fix to pass down the right flags. Now there are proper
verbose status and debug messages when requested.

* Eliminate useless call to is_monochrome by calling it only when the
previously-computed pixel stats indicate that the average value of all
the channels is the same (if they don't have the same average, there's
no way the pixel-by-pixel values will be the same in all channels for
all pixels). This saves an extra traversal of all the pixel memory
during texture creation.

* Use synchronized/flushed status messages so users can see them as they
are issued for very long maketx tasks. This also included some
conversion from old iostream stuff to fmt-based print.

* For verbose/debug, more fine-grained timing for make_texture, in
particular, print the time spent downsizing and writing each MIP level.
2023-05-08 10:06:36 -07:00
Larry Gritz 32a361ab3e build: Disable new warning for fmt headers in gcc13 (#3827)
Working toward clean build with the new gcc 13.1. This isn't the whole
story, but it is one thing necessary.
2023-05-04 21:28:42 -07:00
Larry Gritz 4917cd2fc8 One more revision to synchronized Strutil::print (#3828)
This is a continuation/fix for #3825
2023-05-04 21:27:13 -07:00
Jesse Y a1d8dbcecd api(ImageInput)!: Add an ImageInput::valid_file(IOProxy) overload (#3826)
ABI-BREAKING CHANGE!

Every format that has an existing `valid_file(std::string)`
implementation, and which supports an
ioproxy, now also has a `valid_file(IOProxy)` implementation for
completeness.

The existing std::string overloads have been implemented in terms of the
IOProxy overload where
possible to cut down on the boilerplate. This is done at the base of the
hierarchy in ImageInput.

The remaining formats that support ioproxy, but do not currently have a
`valid_file` method, will be
submitted in a follow-up PR as the additional logic required for those
will require closer review.
2023-05-03 16:22:58 -07:00
Larry Gritz 23819a86d8 cleanup(strutil): use forward properly for sync::print(). (#3825) 2023-05-01 19:12:33 -07:00
Larry Gritz 9e7e040a37 fix(psd): Improve memory efficiency of PSD read (#3807)
The PSD reader was written 12 years ago by a GSOC student and has
changed little since. The following is not a knock on that student, who
clearly did a good job if his code has survived mostly unomdified for
over a decade. In chasing down problems with handling extremely large
psd files, I've noticed some oddities and inefficiencies that need
fixing. It's not an emergency, so I'll handle it in pieces.

The item addressed by this patch is memory usage and thread concurrency.
It turns out that the reader allocates memory for the scanline reads as
it goes... and basically keeps it in the ImageInput until it's
destroyed, even though it will never actually be used again. I guess
it's just trying to save the next allocation if it reads the same
scanline again or on the next subimage? But this means that if you read
a really big psd image, it's basically doubling the memory use -- it
reads one copy into the user's buffer, but also holds on to this extra
copy for no reason. Also, a bunch of the decoding helper functions
implicitly use this memory, which means we lock a mutex for the duration
of read_native_scanline (which in theory should not be necessary since
all I/O is happening through thread-safe IOProxy calls).

So this patch does the following:

1. Remove both this retained scanline memory as well as some other
scratch memory from the ImageInput, and make it allocated and freed
local to read_native_scanline.

2. Change all the helper methods that used it implicitly so that they
are passed buffers to use. In many cases these have been changed to
`const` methods and in a few cases to `static`, making it much easier to
assure ourselves that they don't modify (or sometimes use at all)
anything in the PSDInput to do their task.

3. The result of these changes means that read_native_scanline doen't
need to modify any of the data methods of the class (though it does use,
without modifcation, some things set up in the course of open). Because
it's now non-mutable, we can also remove the mutex, now allowing
multiple threads to read scanlines from the same file simultaneously
without blocking each other.

4. Some other miscellaneous cleanup, including that some scratch memory
was allocated as std::string (!), whereas it should really be a
`vector<unsigned char>` or `unique_ptr<unsigned char>`, and also
changing some computations from double to float.

There is still some more work to do after this is merged. In particular,
I think now that scanline read is stateless / non-mutable with respect
to the PSDInput object, this is a candidate for adding a multi-scanline
read_native_scanlines method (replacing the default implementation of
looping and calling read_native_scanline serially for each scanline),
which should also be able to read multiple scanlines with some overhead
and allocations done once per block, and with blocks of scanlines
running in parallel using the thread pool. This should be a huge
efficiency gain when reading psd files. But it will wait until the next
patch.
2023-04-30 22:57:04 -07:00
Larry Gritz b64356b3af feat(oiiotool): expression eval NIMAGES gives current stack depth (#3822)
Based on a suggestion Matt Chaput on the oiio-dev mail list.
2023-04-30 10:41:49 -07:00
Edoardo DominiciandEdoardo Dominici c231dfb70a Fix float128 compilation of NVPTX backend for LLVM (#3823)
The latest version of libfmt began using the `__float128` type but this
is [not supported in the NVPTX backend for
LLVM](https://discourse.llvm.org/t/compiling-cuda-code-fails/61240/13).
A way to detect this particular platform seems to be to check both
`__CUDA_ARCH__` and `__clang__`.
I am not disabling it entirely on any CUDA target because NVCC 10+
understands `_float128` and generates instructions for it when tested on
godbolt.

Following up from https://github.com/OpenImageIO/oiio/issues/3809.

Co-authored-by: Edoardo Dominici <edoardod@sy1wse0003.al.com.au>
2023-04-27 19:24:01 -07:00
Larry Gritz 571a16717f test: Change the few symbolic links to copies to help Windows (#3818)
Windows isn't smart about symbolic links. There were a few places in the
testsuite where we used symlinks to essentially de-duplicate test
reference images that were expected to be identical. But then the
resulting archive you get when you ask GitHub for a zip file of the
whole repo (which some people download to get OIIO source rather than
git clone) can't be unzipped correctly on Windows (at least not by
cmake's unzip command).

OK, so just change those links to full copies.

Fixes #3811
2023-04-25 17:04:06 -07:00
Larry Gritz 4b6f54dc16 test: Don't run exr core version of openexr-compression testsuite (#3819)
Because it's broken in exr core!
2023-04-25 13:45:23 -07:00
Jesse Y e88e4e4b93 build: Fix incorrect branch name when cloning openexr-images for the tests (#3814)
The `openexr-images` repo was never updated after the default branch was
renamed to `main`. This will fix the following silent errors in CI:
```
Cloning into '/__w/oiio/oiio/build/testsuite/openexr-images'...
warning: Could not find remote branch master to clone.
fatal: Remote branch master not found in upstream origin
```

Additionally, the cmake attempted to symbolically link local repos like
`oiio-images` if they were found. Unfortunately this type of link will
fail unless running as admin on Windows (which is rare) and the
COPY_ON_ERROR directive did _not_ work here (cmake 3.24; weird;
sigh...). The output will now look something like the following:
```
-- Linking oiio-images from C:/Users/jesse/source/oiio-images
-- Link result failed to create symbolic link 'C:/Users/jesse/source/oiio/build/testsuite/oiio-images': A required privilege is not held by the client.
-- Copying oiio-images from C:/Users/jesse/source/oiio-images
```
2023-04-24 22:10:09 -07:00
AdamMainsTL bd4bbaf9cc Support HIF extension (#3813)
I've come across some unsupported files from Canon cameras that have a
.hif extension. These are HEIC/HEIF files with a slightly changed
extension. I have no idea why Canon decided to do this. Without any
changes I am able to open the images, probably because it checks the
header, but I am unable to write to paths with a hif extension.

Some random articles/forum posts mentioning the HIF format in relation
to Canon cameras:
https://www.cameralabs.com/jpeg-vs-heif-canon-hif-comparison/
https://www.dpreview.com/forums/thread/4558661

https://www.reddit.com/r/canon/comments/kjc6xl/new_eos_r6_owner_here_photo_files_show_up_as_hif/
2023-04-24 07:57:03 -07:00
Larry Gritz 54badeeb7c build: ffmpeg 6.0 support (#3812)
It seems to work fine with the new 6.0 with no code modifications, other
than our cmake build misidentifying the version.
2023-04-22 08:30:56 -07:00
Larry Gritz eb2ceba5ed fix: Controlled shutdown of IlmThread pool in all apps in which we use it. (#3805)
We know that there are some corner cases on Windows when it can be
unsafe to exit because the Ilm thread pool (which is used implicitly by
OpenEXR) hangs. The exact conditions that cause this are not well
understood.

Some time back, in PR 3582, we added an explicit shutdown in oiiotool
right before we exit, to alleviate the problem. But this doesn't help
for other apps like idiff, nor for apps that use libOpenImageIO and
aren't aware of the problem, so wouldn't know to do this.

This patch changes to a different strategy: In set_exr_threads(), which
will always be called any time we use openexr files, use `std::atexit()`
to ensure that when the program terminates -- any program using
OpenImageIO in cases when openexr was used -- we set the IlmThread
global thread pool size to 0 to shut it down cleanly. Hopefully, that
will cover even more cases where this OpenEXR bug might be tickled.
2023-04-22 08:30:24 -07:00
Larry Gritz 21ee2d225e CHANGES 2023-04-20 10:51:33 -07:00
Larry Gritz 22a8196c8f Refactor simd.h to disable Intel inrinsics when not on Intel (#3810)
Especially when compiling for Cuda.

Fixes #3809
2023-04-19 09:39:50 -07:00
Brad Smith efe2fe07c9 Fix building on OpenBSD (#3808) 2023-04-19 00:21:28 +00:00
Larry Gritz b2c11c33a4 fix(psd): Handle very wide images (#3806)
When decoding RLE data, some arguments to decompress_packbits() were
inexplicably declared uint16_t (they were passed uint32_t arguments, and
I honestly don't know why we didn't get a warning all along). This
prevented us from correctly reading PSD images whose width was more than
64k, which I suppose are rare enough that it's not hard to understand
why this went unreported for so long.

But anyway, just changing those parameters to uint32_t does the trick.
2023-04-17 08:53:24 -07:00
Eric Mehl f5f6d692cf Fix fast_exp2 with MSVC and sse4.2 (#3804)
I ran into the problem described in #2929 and did a little digging to
see if I could find the source of the bad color conversions. I tracked
it down to `fast_exp2()`
https://github.com/OpenImageIO/oiio/blob/a77e36250fadfb4c391688eb1df4b3dd88d5e367/src/include/OpenImageIO/fmath.h#L2050-L2080

and in particular the return statement on L2071. In the process of
trying to figure out what part of that return statement was going awry,
I found that separating the bitcasts to separate variables as in this
PR, the problem went away. All testing was done with the `color_test`
added in #3023.

It also succeeded when adding various `std::cout` lines to check what
the values of each computation were, so it does sound like a compiler
optimization that does or does not get triggered is the problem.

Unfortunately I don't know why it's not failing on the CI builds, I
double checked to make sure I'm using the same settings and flags. I
also tested on two different machines and get the same failures, and
success with this patch, on both.

One strange wrinkle is that even without this patch, color conversions
worked fine when using AVX2 for the SIMD mode.

Summary :
Previous results (without this patch)

- USE_SIMD=0 - PASS
- USE_SIMD=SSE4.2 - FAIL
- USE_SIMD=AVX - FAIL
- USE_SIMD=AVX2 - PASS

With this patch
- USE_SIMD=0 - PASS
- USE_SIMD=SSE4.2 - PASS
- USE_SIMD=AVX - PASS
- USE_SIMD=AVX2 - PASS

Visual Studio 2019 versions 16.11.32228.343, 16.11.33328.57 and
16.11.33423.256(same as current Github build runners) in RelWithDebInfo
mode.
2023-04-15 08:35:12 -07:00
Larry Gritz 3332c78f5e refactor: refactor font search (#3803)
Chris Gloor points out that after my latest change, the "font_dir_list"
got loaded with every directory underneath that it discovered through
that one level of recursion. Not harmful, but very cluttered. My
original intention was for font_dir_list to only have the search path
directories.

So this prompted me to do a bigger refactor to fix that up and clean up
some other things. Now all the searching is done once when it builds up
the initial inventory the first time a font is needed, no more potential
directory searching or touching non-essential files for each font-using
operation.
2023-04-14 09:33:51 -07:00
Larry Gritz a77e36250f test: Add another ref output for tiff-misc, for differing libitff error message 2023-04-13 11:27:18 -07:00
Larry Gritz 1db505e28e fix: Add one level of recursion to font search (#3802)
Not long ago, we removed recursion from the font searching, for
performance reasons. But now I see at there are some systems where none
of the font directories likely in the searchpath have any of the font
files directly there, but instead they are in subdirectories one level
further down.

To compromise, then, I'm adding ONE level of recurson to our font
search. If you need to search deeper than that, you should directly add
the paths to the OPENIMAGEIO_FONTS searchpath.
2023-04-13 07:49:10 -07:00
Larry Gritz 0a9f055edb fix(python): improve error messages of bad python array sizes (#3801)
For cases of calls like `ImageOutput.write_image(array)`, this improves
the error messages when the array dimensions don't match the size of the
image we're writing, in two ways:

1. For the case of 2D images where the dims don't match, print what the
array shape actually is and what was expected. That's more helpful than
just saying "can't figure out array shape" and printing the number of
dimensions (but not the shape).

2. A mistake caused a number of error messages to be substituted by a
cryptic "can't handle numpy array with noncontiguous channels", but that
was only supposed to be for one particular case; fix that.
2023-04-13 04:31:39 +00:00
Larry Gritz 1a6bfd0716 fix(raw): handle raw 1-channel raw images (#3798)
Fixes #3797
2023-04-11 16:27:40 -07:00
Larry Gritz 72bdba80b1 Revert PR 3788 -- switch "openexr:core" attrib back to 0 default (#3799)
We are not ready to throw the switch quite yet, because the exr core
library still cannot read dwaa/dwab compressed images. It's only safe
to use if you are sure you will not encounter those files.

I feel really stupid for not catching this earlier. Inadequate testing!

Add a new "openexr-compression" test that writes one of every compression
methods available to openexr and ensures it can be read back. We have to
disable it for openexr:core=1 because it will fail on the dwa cases.
2023-04-09 18:39:49 +00:00
Larry Gritz 78eff533c6 CHANGES update 2023-04-02 17:22:47 -07:00
Larry Gritz 3287b8e46a Document that OIIO builds fine with clang 16 2023-03-31 19:07:08 -07:00
Tom Knowles 541f87b249 fix(maketx): Add support for CDFs of bumpslopes channels (#3793)
Currently, if you run oiiotool with --bumpslopes and --cdf at the same time (or -obump:cdf=1), the CDF is only produced for the first four (of six) channels. The techniques described in Burley (2019) actually do apply reasonably to the squared derivative channels, so it's useful to allow all six channels to have CDFs here.

maketx and oiiotool-maketx tests updated with new relevant tests.
2023-03-31 13:59:16 -07:00
Larry Gritz e3929659dc CI: bump 'latest versions' test to the newest openexr release (#3796) 2023-03-30 23:04:18 -07:00
johnfeaandTuomas Tonteri d1a11a9316 Make project compile with clang 11.0.1-2 in Mac (#3795)
Co-authored-by: Tuomas Tonteri <e90@tuomastonteri.fi>
2023-03-30 23:03:23 -07:00
Massimo Paladin cb0db7c276 Remove SonarCloud cache setup as it is now offered by default (#3792)
No need to configure the cache anymore,
SonarCloud now has automatic analysis caching. See:
https://docs.sonarcloud.io/advanced-setup/languages/c-c-objective-c/#analysis-cache.

Also, the filesystem cache was not persisted.
2023-03-27 15:21:51 -07:00
Larry Gritz 67065cbcef perf(exr): change to using exr-core for reading by default (#3788)
When we build against OpenEXR >= 3.1, default to using the new
"exrcore" APIs unless disabled at build time with
`-DOIIO_USE_EXR_C_API=OFF` or at runtime through the global openexr:core
attribute.
2023-03-17 00:18:30 -07:00
Larry Gritz f25ff39537 Disable writing TIFF with jpeg compression (#3791)
TIFF output using JPEG compression seems unreliable, and after several
hours trying to chase it down, I'm not making much progress.  As far
as I can tell, this has always (or at least for a long time) been
broken, and nobody noticed, which is strong circumstantial evidence
that it's not something people need or is trying to use, and therefore
it doesn't seem like a good use of more time to fix a feature that
no one uses.

So I'm hiding all the TIFF output with jpeg compression support behind
`#if` guards and disabling them for now. This will cause requests to
use jpeg compression for TIFF output to just revert to the default zip
compression.

Reading TIFF files that are jpeg-compressed seems fine, this doesn't
disable our ability to read the files, just to produce them.

It is also worth noting: It's one thing to write an actual .jpg file
as *final* output for web display, viewing, or other "terminal" uses.
But JPEG-compressed image data should never ever be used as input to
further image computation operations, since each read/write/read cycle
with jpeg compression can lead to further data loss.  So I think for
this reason also, this patch should help avoid the temptation or
inadvertent ability to use this lossy compression method when writing
TIFFs.
2023-03-17 00:18:07 -07:00
Larry Gritz 34f01aa793 Add benchmarking of ways to concatenate strings. (#3787)
Upshot: when you are doing a straight-up concatenation, `concat(a, b)`
is about 2x faster than `format("{}{}", a, b)`.
2023-03-12 11:09:25 -07:00
Larry Gritz 412a1e16db fix: unique_ptr type mismatch caught by sanitizer (#3790) 2023-03-12 00:51:43 -08:00
Larry Gritz 4ce7365212 fix(gif): gif.h array overrun (#3789) 2023-03-12 02:56:03 +00:00
Larry Gritz 14995e39dd docs: edit INSTALL to correctly reflect changed dependencies lately
There were still some bolded (indicating newly changed) dependency
minimums that actually were bumped in 2.4 or even 2.3 and should have
already been unbolded.
2023-03-11 15:48:41 -08:00
Larry Gritz f1fa0537fb ci: updates to runners, dependencies (#3786)
* Don't use deprecated ubuntu-18.04 runner. Switch to running on
  ubuntu-20.04, but use docker containers that supply ubundu-18.04.

* Bump 'latest' version of openexr, webp, pugixml.
2023-03-11 12:04:12 -08:00
Larry Gritz 44a17dcdfa fix(IC/TS): Avoid deadlock situations with file handle cache (#3784)
There turns out to be a way to get wedged into a mutual deadlock on
the file handle cache, with how get_texture_info on a udim pattern
checks to see if the attribute requested is present and equally valued
in all constituent files of the udim set. This hits the handle set
pretty hard, and if multiple threads are hammering the same sets and
rapidly cycling textures out of the cache, there can be trouble, it
seems.

Remedies in this patch:

* When it's trying to close files because the number of handles is too
  high, we already had it so that if we only exceeded the max_files
  limit by a little bit, we would simply try to get the lock, and
  abandon the attempt if somebody else is holding it, but if we are
  quite a bit over, then stay and wait for the lock to be released.

  In this patch, we make the that default behavior -- if we are over
  the limit and need to free some handles, simply try to get the lock,
  and if somebody else is holding it, leave it all up to them and
  return immediately. The pros of this are (a) snappier response by
  never waiting at this point, and (b) removing the possibility of a
  deadlock, because if you can't acquire the lock, you just move
  on. But the con is that lots of threads adding new files may run
  faster than the one thread who has the file and is trying to release
  files, so it's possible that the number of handles will exceed the
  limit by a wider margin now, but hopefully only momentarily.  (But
  note that this can be overridden with a new ImageCache attribute
  "max_open_files_strict", which if set to nonzero revert to the old
  behavior. At least for now, in case I am neglecting to understand
  some bad consequence of this change.)

* The recursive_mutex controlling access to the ImageInput in each
  tile cache record is changed to a recursive_timed_mutex, and when
  closing a handle by calling release(), instead of an unconditional
  lock, try acquiring a lock for 100ms. If it fails to do so, it may
  be in a possible deadlock, so just give up and move on. The only
  consequence is that maybe that handle isn't freed after all. It will
  then move on to the next one, not the end of the world, but at least
  it can't get stuck there.

* In find_file, eliminate the call to check_max_files -- it's not
  needed here, since it's also called by open(), which is the only
  time that new file handles might be opened. We just don't also need
  it again simply because we're adding a file to the cache.
2023-03-10 23:01:10 -08:00
Fabien Castan 8e9b334a25 rawinput: fix typo on CameraElevationAngle (#3783) 2023-03-07 13:20:26 -08:00
Larry Gritz 15965ad8ad Update INSTALL.md to document the latest dependency support 2023-03-01 09:51:37 -08:00
Larry Gritz 1c5b4f40d7 api(ustringhash): make a public explicit ustringhash ctr from hash value (#3778) 2023-02-28 00:38:15 +00:00
Larry Gritz 0e2374e0bd Qt6 compatibility (#3779) 2023-02-27 16:37:30 -08:00
jreichel-nvidia 2ac5797422 Add cmake option to disable the stacktrace functionality. (#3777)
Setting the cmake option OIIO_DISABLE_BOOST_STACKTRACE to ON disables the use of
Boost stacktrace at compile time. This avoids dependencies on helper libraries
like dbgeng.dll.
2023-02-21 08:49:02 -08:00
Russell Greene a58e145e09 use check_cxx_source_compiles instead (#3774) 2023-02-13 21:50:09 +00:00
Larry Gritz f8db9f38d1 fix: race condition in TIFF reader (#3772)
* test: Add a corrupted test file

* fix(IC): upon tile read error, mark the file as broken

The idea is to keep fruitlessly reading from a corrupted file.

* fix: race condition in TIFF reader

TIFFInput::read_native_tiles had a very subtle race condition.  There
is a section where it has a task_set of decompression tasks that are
sent to the thread queue.  When the method ends, the task_set goes out
of scope, and its destructor will wait for all the remaining tasks to
finish. All fine, right? Except that other variables in the function
include unique_ptr's with allocated memory that the tasks need.  So
what can happen is that if the compiler generates the code such that
the destructor of the unique_ptr happens before the destructor of the
task_set, the memory that the unique_ptr held may be deallocated
before some of the tasks still running in threads have finished.

In practice, we seem only to hit this race condition for particular
cases involving corrupted files, because the early `return` seems
quite likely to run those destructors before all the threads are done,
but it was possible to encounter it for valid files as well, if the
timing is just right. Shocking that we never had it reported.

The solution is just to have an explitit tasks.wait(), which will
block until all the tasks have finished before hitting the actual end
of the method and letting the other destructors to run. And for the
"early return" case, change it to a break so that we go through the
wait call at the end.

I believe that this fix addresses TALOS-2023-1709 / CVE-2023-24472.
2023-02-13 05:30:36 +00:00
Larry Gritz fa9dadea72 fix(fits): Make sure to close if open fails to find right magic number (#3771)
There are two ways to fail the FITS magic number check: fail to read
the bytes, or the bytes don't match the magic number. It seemed
suspicious that we call close() for the latter but not the
former. Combine them into a single error response (they had the same
message, anyway).

Also, make sure FitsInput::init() fully clears some other data
structures.  Oversight?

I don't know if any of these things are real bugs, but they look
sloppy and potentially problematic, so fixing them up.
2023-02-12 22:04:23 +00:00
angusdavisadobeandLarry Gritz 9cb000f178 improve thread safety for concurrent tiff loads (#3767)
* Make lookups of const unordered_maps thread-safe

* added back deleted end brace

* clang-format

---------

Co-authored-by: Larry Gritz <lg@larrygritz.com>
2023-02-10 20:31:24 +00:00
Larry Gritz 86aea43007 fix: ImageOutput::check_open error conditions (#3769)
For non-0-origin images, we were checking the resolution range
incorrectly (`>=` vs `>`).

Also were printing the error message with the wrong notation, should
have shown a half-open range as `[beg,end)` and not `(beg,end]`.
2023-02-09 18:15:59 -08:00
Larry Gritz 759fcd392d fix(targa): guard against corrupted tga files (#3768)
* Be more careful constructing strings from what we read in the header;
  corrupted files may make them not be zero-terminated.
  Fixes TALOS-2023-1707 / CVE-2023-24473

* Watch out for pixels with palette indices that exceed the size we
  allocated for the palette.
  Fixes TALOS-2023-1708 / CVE-2023-22845

* Check alpha_type for valid range.
2023-02-09 13:32:31 -08:00
Larry Gritz 2a6f2c84b3 test: Better testing of python IBA functions (#3766)
Add a shim that can run both the "returns an IB" and "modifies an IB"
version of each IBA function for better test coverage.
2023-02-06 10:35:08 -08:00
Larry Gritz 9325069dd4 Fix formatting from PR 3764 2023-02-04 21:55:04 -08:00
Larry Gritz 271f911984 feat(TS): Add color management to texture lookups (#3761)
This isn't 100% final -- I'm sure there are some corner cases I
missed, maybe things that will eventually need some performance work,
but enough works and passes tests that I'm confident in the API and so
I want to get this merged and we can iterate on internals later.

The use case is as follows: User or shader knows that a particular
texture is in something other than the default working color space,
this is not necessarily apparent from the file itself and so cannot be
fully automatic, but it is presumed that it can be communicated in the
texture call. We aim to be efficient, fully converting each tile upon
input. Note that we are sweeping under the rug the fact that a
non-default color space lookup is not mathematically correct with
respect to the MIP-map downsizing math if that was not considered at
texture creation time. But by converting texels as they are read,
rather than the shader itself trying to do a color transformation on
the final texture result, at least we are doing the right math for the
filtering within and among MIP levels.

The new interface consists of communicating the presumed working color
space, finding the colortransform ID of a given from/to (with the "to"
defaulting to the working space, if not specified), and then on each
texture call, supplying that colortransform ID as one of the settings
in TextureOpt (or TextureOptBatch).

The outline of changes are as follows:

* BREAKING CHANGE: TextureOpt and TextureOptBatch now contain an
  additional int `colortransformid`. The default, 0, is the old (and,
  frankly, preferred) behavior. Nonzero values indicate that we want
  the texels to go through a color transformation as the tiles are
  read into the cache.

* BREAKING CHANGE: New public methods have been added to TextureSystem
  `get_colortransform_id(fromspace, tospace)` that return a transform
  ID given the from and to color spaces (ustring or ustringhash). This
  is the value that goes in the TextureOpt to request a color
  transformation on the pixels as they are read.

* BREAKING CHANGE: IC::get_image_handle / TS::get_texture_handle now
  take an additional optinal parameter that is a TextureOpt*. This is
  currently unused, but is reserved for possible future use and/or for
  alternate TextureSystem implementations that choose a different
  implementation strategy wherein an entirely different TextureHandle
  may correspond to each color transformation. That's not how I've
  done it here, but it's a valid approach (and maybe one we'll switch
  to in the future). We presume that it's ill-defined to ask for a
  handle with one explicit color transformation, then use that handle
  with a TextureOpt that implies a different color
  transformation. Using those consistently ensure that either TS
  strategy will work equally well.

* New TextureSystem attribute "colorspace" gives the working color
  space name (defaulting to "scene_linear"), and "colorconfig" can
  optionally point to a color config file (though this is not yet
  functional -- it just uses the default color config).

* Internally, the tile cache hash has been adjusted so that the same
  tile in the disk file will appear as a separate tile in the cache
  for each color transform that is applied to it. Thus, there is no
  conflict if some different texture calls ask for different color
  space interpretations of the same texture file. (That said, it's not
  recommended to be throwing color spaces around willy nilly -- it
  still takes multiple cache entries, plus extra color conversion math
  as the tiles are read in.)

* A new preprocessor symbol OIIO_TEXTURESYSTEM_SUPPORTS_COLORSPACE in
  texture.h allows client software can easily tell if this is a
  version new enough to support color management and has the additional
  fields in the texture option structures.

Because there are breaking changes here to ABI, this is destined only
for master (future 2.5) and will not be backported to OIIO 2.4.
2023-02-04 14:53:30 -08:00
632 changed files with 8794 additions and 4186 deletions
+2 -2
View File
@@ -7,10 +7,10 @@ assignees: ''
---
**PLEASE DO NOT REPORT BUILD TROUBLES AS ISSUES**
**PLEASE DO NOT REPORT BUILD TROUBLES AS GITHUB "ISSUES" UNLESS YOU ARE RALLY SURE IT'S A BUG**
The best way to get help with your build problems is to ask a question on the
[oiio-dev developer mail list](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org).
[oiio-dev developer mail list](https://lists.aswf.io/g/oiio-dev).
When you email about this, please attach one or both of the following:
1. The full verbose build log, which you can create like this:
+1 -1
View File
@@ -19,7 +19,7 @@ But if you are just asking a question:
* I can't build OpenImageIO
For anything of this nature, the best way to get help using OpenImageIO is
to ask a question on the [oiio-dev developer mail list](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org).
to ask a question on the [oiio-dev developer mail list](https://lists.aswf.io/g/oiio-dev).
The [documentation](https://openimageio.readthedocs.org)
is pretty comprehensive, so please check there first; you may find the answer
+12 -7
View File
@@ -1,3 +1,8 @@
<!-- This is just a guideline and set of reminders about what constitutes -->
<!-- a good PR. Feel free to delete all this matter and replace it with -->
<!-- your own detailed message about the PR, assuming you hit all the -->
<!-- important points made below. -->
## Description
@@ -15,13 +20,13 @@
<!-- Put an 'x' in the boxes as you complete the checklist items -->
- [ ] I have read the [contribution guidelines](https://github.com/OpenImageIO/oiio/blob/master/CONTRIBUTING.md).
- [ ] If this is more extensive than a small change to existing code, I
have previously submitted a Contributor License Agreement
([individual](https://github.com/OpenImageIO/oiio/blob/master/src/doc/CLA-INDIVIDUAL), and if there is any way my
employers might think my programming belongs to them, then also
[corporate](https://github.com/OpenImageIO/oiio/blob/master/src/doc/CLA-CORPORATE)).
- [ ] I have updated the documentation, if applicable.
- [ ] I have ensured that the change is tested somewhere in the testsuite
(adding new test cases if necessary).
- [ ] My code follows the prevailing code style of this project.
- [ ] If I added or modified a C++ API call, I have also amended the
corresponding Python bindings (and if altering ImageBufAlgo functions, also
exposed the new functionality as oiiotool options).
- [ ] My code follows the prevailing code style of this project. If I haven't
already run clang-format before submitting, I definitely will look at the CI
test that runs clang-format and fix anything that it highlights as being
nonconforming.
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# https://github.com/OpenImageIO/oiio
+104 -36
View File
@@ -1,4 +1,4 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# https://github.com/OpenImageIO/oiio
@@ -30,19 +30,22 @@ jobs:
fail-fast: false
matrix:
include:
- desc: gcc6/C++14 py2.7 boost1.66 exr2.3 ocio1.1
- desc: gcc6/C++14 py2.7 boost1.66 exr2.4 ocio1.1
nametag: linux-vfx2019
os: ubuntu-latest
container: aswf/ci-osl:2019
vfxyear: 2019
cxx_std: 14
openexr_ver: v2.4.3
python_ver: 2.7
simd: sse4.2
fmt_ver: 6.1.2
fmt_ver: 7.0.1
pybind11_ver: v2.4.2
setenvs: export PUGIXML_VERSION=v1.9
setenvs: export PUGIXML_VERSION=v1.9 CMAKE_VERSION=3.15.5
- desc: gcc6/C++14 py3.7 boost1.70 exr2.4 ocio1.1
nametag: linux-vfx2020
os: ubuntu-latest
container: aswf/ci-osl:2020
vfxyear: 2020
cxx_std: 14
python_ver: 3.7
@@ -53,6 +56,7 @@ jobs:
- desc: gcc9/C++17 py3.7 boost1.73 exr2.5 ocio2.0
nametag: linux-vfx2021
os: ubuntu-latest
container: aswf/ci-osl:2021
vfxyear: 2021
cxx_std: 17
python_ver: 3.7
@@ -63,8 +67,8 @@ jobs:
- desc: clang10/C++14 avx2 exr2.5 ocio2.0
nametag: linux-clang10-cpp14
os: ubuntu-latest
container: aswf/ci-osl:2021-clang10
vfxyear: 2021
vfxsuffix: -clang10
cc_compiler: clang
cxx_compiler: clang++
cxx_std: 14
@@ -75,28 +79,29 @@ jobs:
- desc: gcc9/C++17 py39 boost1.76 exr3.1 ocio2.1
nametag: linux-vfx2022
os: ubuntu-latest
container: aswf/ci-osl:2022-clang11
vfxyear: 2022
vfxsuffix: -clang11
cxx_std: 17
python_ver: 3.9
simd: "avx2,f16c"
fmt_ver: 8.1.1
pybind11_ver: v2.9.0
- desc: clang13/C++17 py39 avx2 exr3.1 ocio2.1
nametag: linux-clang13-cpp17
nametag: linux-vfx2022-clang13
os: ubuntu-latest
container: aswf/ci-osl:2022-clang13
vfxyear: 2022
vfxsuffix: -clang13
cc_compiler: clang
cxx_compiler: clang++
cxx_std: 17
python_ver: 3.9
simd: "avx2,f16c"
fmt_ver: 8.1.1
fmt_ver: 9.1.0
pybind11_ver: v2.8.1
- desc: icc/C++17 py3.9 boost1.76 exr3.1 ocio2.1 qt5.15
nametag: linux-vfx2022-icc
os: ubuntu-latest
container: aswf/ci-osl:2022
vfxyear: 2022
cxx_std: 17
python_ver: 3.9
@@ -111,6 +116,7 @@ jobs:
- desc: icx/C++17 py3.9 boost1.76 exr3.1 ocio2.1 qt5.15
nametag: linux-vfx2022-icx
os: ubuntu-latest
container: aswf/ci-osl:2022
vfxyear: 2022
cc_compiler: icx
cxx_compiler: icpx
@@ -122,8 +128,8 @@ jobs:
- desc: sanitizers
nametag: sanitizer
os: ubuntu-latest
container: aswf/ci-osl:2022-clang13
vfxyear: 2022
vfxsuffix: -clang13
cc_compiler: clang
cxx_compiler: clang++
cxx_std: 17
@@ -132,25 +138,37 @@ jobs:
OIIO_CMAKE_FLAGS="-DSANITIZE=address,undefined -DUSE_PYTHON=0"
CMAKE_BUILD_TYPE=Debug
CTEST_TEST_TIMEOUT=1200
CTEST_EXCLUSIONS="broken|cmake-consumer|png-damaged"
- desc: oldest/hobbled gcc6.3/C++14 py2.7 boost-1.66 exr-2.3 no-sse no-ocio
CTEST_EXCLUSIONS="broken|png-damaged"
- desc: gcc11/C++17 py3.10 boost1.80 exr3.1 ocio2.2
nametag: linux-vfx2023
os: ubuntu-latest
container: aswftesting/ci-osl:2023-clang15
vfxyear: 2023
cxx_std: 17
python_ver: "3.10"
simd: "avx2,f16c"
fmt_ver: 10.1.1
pybind11_ver: v2.10.0
- desc: oldest/hobbled gcc6.3/C++14 py2.7 boost-1.66 exr-2.4 no-sse no-ocio
# Oldest versions of the dependencies that we can muster, and various
# things disabled (no SSE, OCIO, or OpenCV, don't embed plugins).
nametag: linux-oldest
os: ubuntu-latest
container: aswf/ci-osl:2019
vfxyear: 2019
cxx_std: 14
fmt_ver: 6.1.2
openexr_ver: v2.3.0
fmt_ver: 7.0.1
openexr_ver: v2.4.0
pybind11_ver: v2.4.2
python_ver: 2.7
simd: 0
setenvs: export EMBEDPLUGINS=0
PTEX_VERSION=v2.3.1
CMAKE_VERSION=3.15.5
PTEX_VERSION=v2.3.2
WEBP_VERSION=v1.0.0
USE_JPEGTURBO=0
USE_OPENCOLORIO=0
USE_OPENCV=0
WEBP_VERSION=v1.0.0
depcmds: sudo rm -rf /usr/local/include/OpenEXR
# Test formatting. This test entry doesn't do a full build, it
@@ -161,16 +179,36 @@ jobs:
- desc: "clang-format"
nametag: clang-format
os: ubuntu-latest
container: aswf/ci-osl:2022-clang12
vfxyear: 2022
vfxsuffix: -clang12
cxx_std: 17
skip_tests: 1
setenvs: export BUILDTARGET=clang-format
OIIO_CMAKE_FLAGS=-DUSE_PYTHON=0
# Test ABI stability. `abi_check` is the version or commit that we
# believe is the current standard against which we don't want to
# break the ABI. Basically, we will build that version as well as
# the current one, and compare the resulting libraries.
- desc: abi check
nametag: linux-vfx2023
os: ubuntu-latest
container: aswftesting/ci-osl:2023-clang15
vfxyear: 2023
cxx_std: 17
python_ver: "3.10"
simd: "avx2,f16c"
fmt_ver: 10.1.1
pybind11_ver: v2.10.0
skip_tests: 1
abi_check: v2.5.3.0-beta1
setenvs: export OIIO_CMAKE_FLAGS="-DOIIO_BUILD_TOOLS=0 -DOIIO_BUILD_TESTS=0 -DUSE_PYTHON=0"
USE_OPENCV=0 USE_FFMPEG=0 USE_PYTHON=0
CMAKE_BUILD_TYPE=RelWithDebInfo
runs-on: ${{ matrix.os }}
container:
image: aswf/ci-osl:${{matrix.vfxyear}}${{matrix.vfxsuffix}}
image: ${{ matrix.container }}
env:
CXX: ${{matrix.cxx_compiler}}
CC: ${{matrix.cc_compiler}}
@@ -180,6 +218,7 @@ jobs:
OPENEXR_VERSION: ${{matrix.openexr_ver}}
PYBIND11_VERSION: ${{matrix.pybind11_ver}}
PYTHON_VERSION: ${{matrix.python_ver}}
ABI_CHECK: ${{matrix.abi_check}}
steps:
# We would like to use harden-runner, but it flags too many false
# positives, every time we download a dependency. We should use it only
@@ -212,12 +251,30 @@ jobs:
- name: Testsuite
if: matrix.skip_tests != '1'
run: src/build-scripts/ci-test.bash
- name: Check out ABI standard
if: matrix.abi_check != ''
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
ref: ${{matrix.abi_check}}
path: abi_standard
- name: Build ABI standard
if: matrix.abi_check != ''
run: |
mkdir -p abi_standard/build
pushd abi_standard
src/build-scripts/ci-build.bash
popd
- name: Check ABI
if: matrix.abi_check != ''
run: |
src/build-scripts/ci-abicheck.bash ./build abi_standard/build libOpenImageIO libOpenImageIO_Util
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
if: failure()
with:
name: oiio-${{github.job}}-${{matrix.nametag}}
path: |
build/cmake-save
build/compat_reports
build/testsuite/*/*.*
!build/testsuite/oiio-images
!build/testsuite/openexr-images
@@ -231,26 +288,25 @@ jobs:
fail-fast: false
matrix:
include:
- desc: latest releases gcc11 C++17 avx2 exr3.1 ocio2.2
- desc: latest releases gcc11 C++17 avx2 exr3.2 ocio2.3
nametag: linux-latest-releases
os: ubuntu-20.04
os: ubuntu-22.04
cc_compiler: gcc-11
cxx_compiler: g++-11
cxx_std: 17
fmt_ver: 9.1.0
openexr_ver: v3.1.5
pybind11_ver: v2.10.0
python_ver: 3.8
fmt_ver: 10.1.1
openexr_ver: v3.2.0
pybind11_ver: v2.11.1
python_ver: "3.10"
simd: avx2,f16c
setenvs: export LIBRAW_VERSION=0.20.2
LIBTIFF_VERSION=v4.5.0
OPENCOLORIO_VERSION=v2.2.0
OPENIMAGEIO_OPTIONS="openexr:core=1"
OPENCOLORIO_VERSION=v2.3.0
OPENJPEG_VERSION=v2.4.0
PTEX_VERSION=v2.4.0
PUGIXML_VERSION=v1.12.1
PUGIXML_VERSION=v1.13
USE_OPENVDB=0
WEBP_VERSION=v1.2.4
WEBP_VERSION=v1.3.0
# The installed OpenVDB has a TLS conflict with Python 3.8
- desc: bleeding edge gcc12 C++20 py3.10 OCIO/libtiff/exr-master boost1.74 avx2
nametag: linux-bleeding-edge
@@ -258,7 +314,7 @@ jobs:
cc_compiler: gcc-12
cxx_compiler: g++-12
cxx_std: 20
fmt_ver: 9.1.0
fmt_ver: master
openexr_ver: main
pybind11_ver: master
python_ver: "3.10"
@@ -266,7 +322,6 @@ jobs:
setenvs: export LIBRAW_VERSION=master
LIBTIFF_VERSION=master
OPENCOLORIO_VERSION=main
OPENIMAGEIO_OPTIONS="openexr:core=1"
OPENJPEG_VERSION=master
PTEX_VERSION=main
PUGIXML_VERSION=master
@@ -280,19 +335,20 @@ jobs:
cxx_compiler: clang++
cc_compiler: clang
cxx_std: 20
fmt_ver: 9.0.0
openexr_ver: v3.1.5
fmt_ver: 10.1.1
openexr_ver: v3.1.11
pybind11_ver: v2.9.2
python_ver: 3.8
simd: avx2,f16c
setenvs: export LLVM_VERSION=14.0.0
OPENCOLORIO_VERSION=v2.1.2
OPENIMAGEIO_OPTIONS="openexr:core=1"
USE_OPENVDB=0
# The installed OpenVDB has a TLS conflict with Python 3.8
- desc: debug gcc7/C++14, sse4.2, exr2.4
nametag: linux-gcc7-cpp14-debug
os: ubuntu-18.04
os: ubuntu-20.04
container:
image: ubuntu-18.04
cxx_compiler: g++-7
cxx_std: 14
python_ver: 2.7
@@ -305,7 +361,9 @@ jobs:
- desc: gcc8 C++17 avx exr2.5
nametag: linux-gcc8
os: ubuntu-18.04
os: ubuntu-20.04
container:
image: ubuntu-18.04
cc_compiler: gcc-8
cxx_compiler: g++-8
cxx_std: 17
@@ -314,7 +372,9 @@ jobs:
simd: avx
- desc: static libs gcc7 C++14 exr2.4
nametag: linux-static
os: ubuntu-18.04
os: ubuntu-20.04
container:
image: ubuntu-18.04
cxx_compiler: g++-7
cxx_std: 14
openexr_ver: v2.4.3
@@ -391,6 +451,7 @@ jobs:
cxx_std: 17
python_ver: "3.9"
aclang: 13
setenvs: export QT_VERSION=@5
- desc: MacOS-12
os: macos-12
nametag: macos12-py310
@@ -398,6 +459,13 @@ jobs:
python_ver: "3.10"
aclang: 13
setenvs: export CTEST_TEST_TIMEOUT=600
- desc: MacOS-13
os: macos-13
nametag: macos13-py311
cxx_std: 20
python_ver: "3.11"
aclang: 14
setenvs: export CTEST_TEST_TIMEOUT=600
runs-on: ${{ matrix.os }}
env:
CC: clang
+1
View File
@@ -0,0 +1 @@
Claire Foster <aka.c42f@gmail.com> <chris42f@gmail.com>
+149
View File
@@ -0,0 +1,149 @@
Project Name: OpenImageIO
Project Entity: OpenImageIO Project a Series of LF Projects, LLC
If emailing signed PDF, send to: manager@lfprojects.org
**Software Grant and Corporate Contributor License Agreement ("Agreement") v2.1**
Thank you for your interest in the project specified above (the “Project”). In
order to clarify the intellectual property license granted with Contributions
from any person or entity, the Project must have a Contributor License Agreement
(CLA) on file that has been signed by each Contributor, indicating agreement to
the license terms below. This license is for your protection as a Contributor as
well as the protection of the Project and its users; it does not change your
rights to use your own Contributions for any other purpose.
This version of the Agreement allows an entity (the “Corporation”) to submit
Contributions to the Project, to authorize Contributions submitted by its
designated employees to the Project, and to grant copyright and patent licenses
thereto.
If you have not already done so, please complete and sign this Agreement using
the electronic signature portal made available to you by the Project or its
third-party service providers, or email a PDF of the signed agreement to the
email address specified above. Please read this document carefully before
signing and keep a copy for your records.
You accept and agree to the following terms and conditions for Your present and
future Contributions submitted to the Project. In return, the Project shall not
use Your Contributions in a way that is contrary to the public benefit or
inconsistent with its charter at the time of the Contribution. Except for the
license granted herein to the Project and recipients of software distributed by
the Project, You reserve all right, title, and interest in and to Your
Contributions.
1. Definitions.
“You” (or “Your”) shall mean the copyright owner or legal entity authorized by
the copyright owner that is making this Agreement with the Project. For legal
entities, the entity making a Contribution and all other entities that
control, are controlled by, or are under common control with that entity are
considered to be a single Contributor. For the purposes of this definition,
“control” means (i) the power, direct or indirect, to cause the direction or
management of such entity, whether by contract or otherwise, or (ii) ownership
of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
ownership of such entity.
“Contribution” shall mean the code, documentation or other original works of
authorship, including any modifications or additions to an existing work, that
is intentionally submitted by You to the Project for inclusion in, or
documentation of, any of the products owned or managed by the Project (the
“Work”). For the purposes of this definition, “submitted” means any form
of electronic, verbal, or written communication sent to the Project or its
representatives, including but not limited to communication on electronic
mailing lists, source code control systems, and issue tracking systems that
are managed by, or on behalf of, the Project for the purpose of discussing and
improving the Work, but excluding communication that is conspicuously marked
or otherwise designated in writing by You as “Not a Contribution.”
2. Grant of Copyright License. Subject to the terms and conditions of this
Agreement, You hereby grant to the Project and to recipients of software
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable copyright license to reproduce, prepare
derivative works of, publicly display, publicly perform, sublicense,
and distribute Your Contributions and such derivative works.
3. Grant of Patent License. Subject to the terms and conditions of this
Agreement, You hereby grant to the Project and to recipients of software
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, offer to sell, sell, import, and
otherwise transfer the Work, where such license applies only to
those patent claims licensable by You that are necessarily infringed
by Your Contribution(s) alone or by combination of Your
Contribution(s) with the Work to which such Contribution(s) were
submitted. If any entity institutes patent litigation against You or
any other entity (including a cross-claim or counterclaim in a
lawsuit) alleging that your Contribution, or the Work to which
you have contributed, constitutes direct or contributory patent
infringement, then any patent licenses granted to that entity under
this Agreement for that Contribution or Work shall terminate as of
the date such litigation is filed.
4. You represent that You are legally entitled to grant the above license. You
represent further that the employee of the Corporation designated as the Initial
CLA Manager below (and each who is designated in a subsequent written
modification to the list of CLA Managers) (each, a “CLA Manager”) is
authorized to maintain with the Project (1) the list of employees of the
Corporation who are authorized to submit Contributions on behalf of the
Corporation, and (2) the list of CLA Managers.
5. You represent that each of Your Contributions is Your original creation (see
section 7 for submissions on behalf of others).
6. You are not expected to provide support for Your Contributions, except to the
extent You desire to provide support. You may provide support for free, for a
fee, or not at all. Unless required by applicable law or agreed to in writing,
You provide Your Contributions on an “AS IS” BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied, including, without
limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
7. Should You wish to submit work that is not Your original creation, You may
submit it to the Project separately from any Contribution, identifying the
complete details of its source and of any license or other restriction
(including, but not limited to, related patents, trademarks, and license
agreements) of which you are personally aware, and conspicuously marking the
work as “Submitted on behalf of a third-party: [named here]”.
8. It is your responsibility to notify the Project when any change is required
to the list of designated employees authorized to submit Contributions on behalf
of the Corporation, or to the list of the CLA Managers.
\[Please complete and sign on the next page.\]
::: {style="page-break-after: always; visibility: hidden"}
```{=tex}
\pagebreak
```
:::
Please sign:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Date:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Signatory Name:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Signatory E-mail:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Signatory Title:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Corporation Name:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Corporation Address:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Initial CLA Manager Name:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Initial CLA Manager E-Mail:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
+137
View File
@@ -0,0 +1,137 @@
Project Name: OpenImageIO
Project Entity: OpenImageIO Project a Series of LF Projects, LLC
If emailing signed PDF, send to: manager@lfprojects.org
**Individual Contributor License Agreement ("Agreement") v2.1**
Thank you for your interest in the project specified above (the “Project”). In
order to clarify the intellectual property license granted with Contributions
from any person or entity, the Project must have a Contributor License Agreement
(CLA) on file that has been signed by each Contributor, indicating agreement to
the license terms below. This license is for your protection as a Contributor as
well as the protection of the Project and its users; it does not change your
rights to use your own Contributions for any other purpose.
If you have not already done so, please complete and sign this Agreement using
the electronic signature portal made available to you by the Project or its
third-party service providers, or email a PDF of the signed agreement to the
email address specified above. Please read this document carefully before
signing and keep a copy for your records.
You accept and agree to the following terms and conditions for Your present and
future Contributions submitted to the Project. In return, the Project shall not
use Your Contributions in a way that is contrary to the public benefit or
inconsistent with its charter at the time of the Contribution. Except for the
license granted herein to the Project and recipients of software distributed by
the Project, You reserve all right, title, and interest in and to Your
Contributions.
1. Definitions.
“You” (or “Your”) shall mean the copyright owner or legal entity authorized by
the copyright owner that is making this Agreement with the Project. For legal
entities, the entity making a Contribution and all other entities that control,
are controlled by, or are under common control with that entity are considered
to be a single Contributor. For the purposes of this definition, “control”
means (i) the power, direct or indirect, to cause the direction or management
of such entity, whether by contract or otherwise, or (ii) ownership of fifty
percent (50%) or more of the outstanding shares, or (iii) beneficial ownership
of such entity.
“Contribution” shall mean the code, documentation or other original works of
authorship, including any modifications or additions to an existing work, that
is intentionally submitted by You to the Project for inclusion in, or
documentation of, any of the products owned or managed by the Project (the
“Work”). For the purposes of this definition, “submitted” means any form of
electronic, verbal, or written communication sent to the Project or its
representatives, including but not limited to communication on electronic
mailing lists, source code control systems, and issue tracking systems that are
managed by, or on behalf of, the Project for the purpose of discussing and
improving the Work, but excluding communication that is conspicuously marked or
otherwise designated in writing by You as “Not a Contribution.”
2. Grant of Copyright License. Subject to the terms and conditions of this
Agreement, You hereby grant to the Project and to recipients of software
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable copyright license to reproduce, prepare
derivative works of, publicly display, publicly perform, sublicense,
and distribute Your Contributions and such derivative works.
3. Grant of Patent License. Subject to the terms and conditions of this
Agreement, You hereby grant to the Project and to recipients of software
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this section) patent
license to make, have made, use, offer to sell, sell, import, and
otherwise transfer the Work, where such license applies only to
those patent claims licensable by You that are necessarily infringed
by Your Contribution(s) alone or by combination of Your
Contribution(s) with the Work to which such Contribution(s) were
submitted. If any entity institutes patent litigation against You or
any other entity (including a cross-claim or counterclaim in a
lawsuit) alleging that your Contribution, or the Work to which
you have contributed, constitutes direct or contributory patent
infringement, then any patent licenses granted to that entity under
this Agreement for that Contribution or Work shall terminate as of
the date such litigation is filed.
4. You represent that you are legally entitled to grant the above license. If
your employer(s) has rights to intellectual property that you create that
includes your Contributions, you represent that you have received permission to
make Contributions on behalf of that employer, that your employer has waived
such rights for your Contributions to the Project, or that your employer has
executed a separate Corporate CLA with the Project.
5. You represent that each of Your Contributions is Your original creation (see
section 7 for submissions on behalf of others). You represent that Your
Contribution submissions include complete details of any third-party license or
other restriction (including, but not limited to, related patents and
trademarks) of which you are personally aware and which are associated with
any part of Your Contributions.
6. You are not expected to provide support for Your Contributions, except to the
extent You desire to provide support. You may provide support for free, for a
fee, or not at all. Unless required by applicable law or agreed to in writing,
You provide Your Contributions on an “AS IS” BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied, including, without
limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
7. Should You wish to submit work that is not Your original creation, You may
submit it to the Project separately from any Contribution, identifying the
complete details of its source and of any license or other restriction
(including, but not limited to, related patents, trademarks, and license
agreements) of which you are personally aware, and conspicuously marking the
work as “Submitted on behalf of a third-party: [named here]”.
8. You agree to notify the Project of any facts or circumstances of which you
become aware that would make these representations inaccurate in any respect.
\[Please complete and sign on the next page.\]
::: {style="page-break-after: always; visibility: hidden"}
```{=tex}
\pagebreak
```
:::
Please sign:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Date: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Full name:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Mailing Address:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
------------------------------------------------------------------------
------------------------------------------------------------------------
Country:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
E-Mail:
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
+21
View File
@@ -0,0 +1,21 @@
OpenImageIO has been accepted to be an ASWF-administered project, by vote of
the ASWF Technical Advisory Council (TAC) on May 3, 2023.
At this time, the ASWF subdirectory contains *proposed* (and sometimes TBD/WIP
placeholders) project organization and policy documents that will be formally
adopted as the OpenImageIO project is formally turned over to ASWF and moved
to the AcademySoftwareFoundation GitHub account. Please file issues or PRs
or review comments against these documents to make any suggested changes while
we are revising the drafts.
Summary of the current state of documents:
| File | Status | Notes |
| ---- | ------ | ----- |
| CLA-corporate.md | Final | Standard ASWF corporate CLA, approved by the TSC. Will take effect when the repo moves. |
| CLA-individual.md | Final | Standard ASWF individual CLA, approved by the TSC. Will take effect when the repo moves. |
| CODE_OF_CONDUCT.md | Final | Links to the standard LF CoC, approved by the TSC and now in effect. |
| CONTRIBUTING.md | Preliminary | Modified version of our existing CONTRIBUTING guidelines, lightly amended to reflect the changes that will come along with moving the repo, the new CLA/DCO rules, etc.
| GOVERNANCE.md | Final | Approved by the TSC and now in effect. |
| project_intake.md | Ongoing | This is the latest ASWF project intake checklist. We will check off items as we get them done. |
| Technical-Charter.md | Final | Approved by the TSC. |
+242
View File
@@ -0,0 +1,242 @@
# Technical Charter (the "Charter") for OpenImageIO a Series of LF Projects, LLC
Adopted July 1, 2023 by unanimous vote of the TSC.
This Charter sets forth the responsibilities and procedures for technical
contribution to, and oversight of, the OpenImageIO open source project, which
has been established as OpenImageIO a Series of LF Projects, LLC (the
“Project”). LF Projects, LLC (“LF Projects”) is a Delaware series limited
liability company. All contributors (including committers, maintainers, and
other technical positions) and other participants in the Project
(collectively, “Collaborators”) must comply with the terms of this Charter.
### 1. Mission and Scope of the Project
* **a.** The mission of the Project is to develop software to read, write,
and manipulate image files of any image file format relevant to vfx /
animation via a format-agnostic API, with a feature set, scalability, and
robustness needed for production.
* **b.** The scope of the Project includes collaborative development under
the Project License (as defined herein) supporting the mission, including
documentation, testing, integration and the creation of other artifacts
that aid the development, deployment, operation or adoption of the open
source project.
### 2. Technical Steering Committee
* **a.** The Technical Steering Committee (the “TSC”) will be responsible
for all technical oversight of the open source Project.
* **b.** The TSC voting members are initially the Project’s Committers. At
the inception of the project, the Committers of the Project will be as set
forth within the “GOVERNANCE” file within the Project’s code repository.
The TSC may choose an alternative approach for determining the voting
members of the TSC, and any such alternative approach will be documented
in the GOVERNANCE file. Any meetings of the Technical Steering Committee
are intended to be open to the public, and can be conducted
electronically, via teleconference, or in person.
* **c.** TSC projects generally will involve Contributors and Committers.
The TSC may adopt or modify roles so long as the roles are documented in
the GOVERNANCE file. Unless otherwise documented:
- **i.** Contributors include anyone in the technical community that
contributes code, documentation, or other technical artifacts to the
Project;
- **ii.** Committers are Contributors who have earned the ability to
modify (“commit”) source code, documentation or other technical
artifacts in a project’s repository; and
- **iii.** A Contributor may become a Committer by a majority approval of
the existing Committers. A Committer may be removed by a majority
approval of the other existing Committers.
* **d.** Participation in the Project through becoming a Contributor and
Committer is open to anyone so long as they abide by the terms of this
Charter.
* **e.** The TSC may (1) establish work flow procedures for the submission,
approval, and closure/archiving of projects, (2) set requirements for the
promotion of Contributors to Committer status, as applicable, and (3)
amend, adjust, refine and/or eliminate the roles of Contributors, and
Committers, and create new roles, and publicly document any TSC roles, as
it sees fit.
* **f.** The TSC may elect a TSC Chair, who will preside over meetings of
the TSC and will serve until their resignation or replacement by the TSC.
The TSC Chair, or any other TSC member so designated by the TSC, will
serve as the primary communication contact between the Project and the
Academy Software Foundation, a directed fund of The Linux Foundation.
* **g.** Responsibilities: The TSC will be responsible for all aspects of
oversight relating to the Project, which may include:
- **i.** coordinating the technical direction of the Project;
- **ii.** approving project or system proposals (including, but not
limited to, incubation, deprecation, and changes to a sub-project’s
scope);
- **iii.** organizing sub-projects and removing sub-projects;
- **iv.** creating sub-committees or working groups to focus on
cross-project technical issues and requirements;
- **v.** appointing representatives to work with other open source or open
standards communities;
- **vi.** establishing community norms, workflows, issuing releases, and
security issue reporting policies;
- **vii.** approving and implementing policies and processes for
contributing (to be published in the CONTRIBUTING file) and coordinating
with the series manager of the Project (as provided for in the Series
Agreement, the “Series Manager”) to resolve matters or concerns that may
arise as set forth in Section 7 of this Charter;
- **viii.** discussions, seeking consensus, and where necessary, voting on
technical matters relating to the code base that affect multiple
projects; and
- **ix.** coordinating any marketing, events, or communications regarding
the Project.
### 3. TSC Voting
* **a.** While the Project aims to operate as a consensus-based community,
if any TSC decision requires a vote to move the Project forward, the
voting members of the TSC will vote on a one vote per voting member basis.
* **b.** Quorum for TSC meetings requires at least fifty percent of all
voting members of the TSC to be present. The TSC may continue to meet if
quorum is not met but will be prevented from making any decisions at the
meeting.
* **c.** Except as provided in Section 7.c. and 8.a, decisions by vote at a
meeting require a majority vote of those in attendance, provided quorum is
met. Decisions made by electronic vote without a meeting require a
majority vote of all voting members of the TSC.
* **d.** In the event a vote cannot be resolved by the TSC, any voting
member of the TSC may refer the matter to the Series Manager for
assistance in reaching a resolution.
### 4. Compliance with Policies
* **a.** This Charter is subject to the Series Agreement for the Project and
the Operating Agreement of LF Projects. Contributors will comply with the
policies of LF Projects as may be adopted and amended by LF Projects,
including, without limitation the policies listed at
https://lfprojects.org/policies/.
* **b.** The TSC may adopt a code of conduct (“CoC”) for the Project, which
is subject to approval by the Series Manager. In the event that a
Project-specific CoC has not been approved, the LF Projects Code of
Conduct listed at https://lfprojects.org/policies will apply for all
Collaborators in the Project.
* **c.** When amending or adopting any policy applicable to the Project, LF
Projects will publish such policy, as to be amended or adopted, on its web
site at least 30 days prior to such policy taking effect; provided,
however, that in the case of any amendment of the Trademark Policy or
Terms of Use of LF Projects, any such amendment is effective upon
publication on LF Project’s web site.
* **d.** All Collaborators must allow open participation from any individual
or organization meeting the requirements for contributing under this
Charter and any policies adopted for all Collaborators by the TSC,
regardless of competitive interests. Put another way, the Project
community must not seek to exclude any participant based on any criteria,
requirement, or reason other than those that are reasonable and applied on
a non-discriminatory basis to all Collaborators in the Project community.
* **e.** The Project will operate in a transparent, open, collaborative, and
ethical manner at all times. The output of all Project discussions,
proposals, timelines, decisions, and status should be made open and easily
visible to all. Any potential violations of this requirement should be
reported immediately to the Series Manager.
### 5. Community Assets
* **a.** LF Projects will hold title to all trade or service marks used by
the Project (“Project Trademarks”), whether based on common law or
registered rights. Project Trademarks will be transferred and assigned to
LF Projects to hold on behalf of the Project. Any use of any Project
Trademarks by Collaborators in the Project will be in accordance with the
license from LF Projects and inure to the benefit of LF Projects.
* **b.** The Project will, as permitted and in accordance with such license
from LF Projects, develop and own all Project GitHub and social media
accounts, and domain name registrations created by the Project community.
* **c.** Under no circumstances will LF Projects be expected or required to
undertake any action on behalf of the Project that is inconsistent with
the tax-exempt status or purpose, as applicable, of the Joint Development
Foundation or LF Projects, LLC.
### 6. General Rules and Operations.
* **a.**. The Project will:
- **i.** engage in the work of the Project in a professional manner
consistent with maintaining a cohesive community, while also maintaining
the goodwill and esteem of LF Projects, Joint Development Foundation and
other partner organizations in the open source community; and
- **ii.** respect the rights of all trademark owners, including any
branding and trademark usage guidelines.
### 7. Intellectual Property Policy
* **a.** Collaborators acknowledge that the copyright in all new
contributions will be retained by the copyright holder as independent
works of authorship and that no contributor or copyright holder will be
required to assign copyrights to the Project.
* **a.** Except as described in Section 7.c., all contributions to the
Project are subject to the following:
- **i.** All new inbound code contributions to the Project must be made
using the Apache License, Version 2.0 available at
http://www.apache.org/licenses/LICENSE-2.0 (the “Project License”).
- **ii.** All new inbound code contributions must also be accompanied by
(i) a Developer Certificate of Origin (http://developercertificate.org)
sign-off in the source code system that is submitted through a
TSC-approved contribution process which will bind the authorized
contributor and, if not self-employed, their employer to the applicable
license and (ii) a duly executed contribution license agreement in the
form approved by the TSC;
- **iii.** All outbound code will be made available under the Project
License.
- **iv.** Documentation will be received and made available by the Project
under the Creative Commons Attribution 4.0 International License
(available at http://creativecommons.org/licenses/by/4.0/).
- **v.** The Project may seek to integrate and contribute back to other
open source projects (“Upstream Projects”). In such cases, the Project
will conform to all license requirements of the Upstream Projects,
including dependencies, leveraged by the Project. Upstream Project code
contributions not stored within the Project’s main code repository will
comply with the contribution process and license terms for the
applicable Upstream Project.
* **c.** The TSC may approve the use of an alternative license or licenses
for inbound or outbound contributions on an exception basis. To request an
exception, please describe the contribution, the alternative open source
license(s), and the justification for using an alternative open source
license for the Project. License exceptions must be approved by a
two-thirds vote of the entire TSC.
* **d.** Contributed files should contain license information, such as SPDX
short form identifiers, indicating the open source license or licenses
pertaining to the file.
### 8. Amendments
* **a.** This charter may be amended by a two-thirds vote of the entire TSC
and is subject to approval by LF Projects.
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 KiB

+66
View File
@@ -0,0 +1,66 @@
# Project Intake checklist
This is a checklist for TSC's to review as part of the intake process. The TSC should review this entire list during the kickoff meeting. For anything outstanding, create an [issue](../issues) to track and link to it in the list
- Existing Project Governance
- [X] A [LICENSE.md](../LICENSE.md) file in every code repository, with the license chosen an OSI-approved license.
- [X] Any third-party components/dependencies included are listed along with thier licenses ( [THIRD-PARTY.md](../THIRD-PARTY.md) )
- [X] A [README.md](../README.md) file welcoming new community members to the project and explaining why the project is useful and how to get started.
- [X] A [CONTRIBUTING.md](../CONTRIBUTING.md) file explaining to other developers and your community of users how to contribute to the project. The file should explain what types of contributions are needed and how the process works, along with how to disclose security issues responsibly ( may also point to a [SECURITY.md](../SECURITY.md) file ).
- [ ] A [CODEOWNERS](../CODEOWNERS) or [COMMITTERS](../COMMITERS.csv) file to define individuals or teams that are responsible for code in a repository; document current project owners and current and emeritus committers.
- [X] A [CODE_OF_CONDUCT.md](../CODE_OF_CONDUCT.md) file that sets the ground rules for participants’ behavior associated and helps to facilitate a friendly, welcoming environment. By default, projects should leverage the Linux Foundation Code of Conduct unless an alternate Code of Conduct was previously approved.
- [X] A [RELEASING.md](../RELEASING.md) file that provides documentation on the release methodology, cadence, criteria, etc.
- [X] A [GOVERNANCE.md](../GOVERNANCE.md) file that documents the project’s technical governance.
- [ ] A [SUPPORT.md](../SUPPORT.md) file to let users and developers know about ways to get help with your project.
- Infrastructure/Assets
- [X] Technical Charter Approved
- [X] License scan completed and no issues found
- [ ] Code repository imported to ASWF GitHub organization or ownership of current GitHub organization given to `thelinuxfoundation` user
- [X] Developer Certificate of Origin past commit signoff done and DCO Probot enabled.
- [X] Issue/feature tracker established (JIRA, GitHub issues)
- [X] Mailing lists ( one of )
- [X] Setup new lists ( -dev@ and -tsc@ ) on [ASWF groups.io](https://lists.aswf.io) ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to setup )
- [X] (In progress) Move to [ASWF groups.io](https://lists.aswf.io) ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to transfer )
- [X] Slack ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to setup project channel on [ASWF Slack](https://slack.aswf.io) )
- [ ] Website
- [X] CI/build environment
- [X] Trademarks/mark ownership rights ( complete 'LF Projects - Form of Trademark and Account Assignment' - create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) - only needed if project using existing name )
- [ ] Domain name ( create [issue with the LF IT staff](https://jira.linuxfoundation.org/plugins/servlet/theme/portal/2/group/19) to setup/transfer )
- [ ] Zoom account access ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to get access to credentials )
- [X] (N/A) Social media accounts or other project accounts ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to transfer )
- [X] Logo(s) ( create [issue on artwork repo](https://github.com/AcademySoftwareFoundation/artwork/issues/new) to add in SVG and PNG format and color/black/white )
- New Project Governance
- [X] TSC members identified
- [X] First TSC meeting held
- [X] TSC meeting cadence set and added to project calendar
- [X] CLA Approved ( if used ) ( [CCLA](CLA-corporate.md) and [ICLA](CLA-individual.md) )
- Project charter ( [Technical-Charter.md](Technical-Charter.md) )
- [X] Approved by TSC
- [X] Filed ( create pull request against [foundation repo](https://github.com/AcademySoftwareFoundation/foundation) )
- [X] [Core Infrastructure Initiative Best Practices Badge](https://bestpractices.coreinfrastructure.org/) achieved as the 'Passing' level.
- Outreach
- [ ] New project announcement done ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to trigger )
- [X] Project added to ASWF website and ASWF landscape
- Incubation Stage requirements
- [X] Have achieved and maintained a [OpenSSF Best Practices Badge at the passing level](https://bestpractices.coreinfrastructure.org/en/criteria).
- [ ] Have had a successful license scan with any critical issues remedied.
- [ ] Have a defined project mission and scope
- [ ] An overview of the project’s architecture and features defined.
- [ ] A project roadmap defined, which should address the following questions.
- What use cases are possible now?
- What does the next year look like in terms of additional features and use cases covered?
- [ ] Community and contributor growth assessment
- The current number of contributors and committers, and the number of different organizations contributing to the project.
- Demonstrate a sustained flow of commits / merged contributions
- A credible plan for developing a thriving user community, in particular expanding the number of committers and contributors?
- Outline of the plan for the project to complete the requirements for Adopted Stage
- [ ] Obtain an affirmative vote of the TAC.
- Adopted Stage graduation requirements
- [ ] Demonstrate a substantial ongoing flow of commits and merged contributions, authored by a healthy number of diverse contributors.
- [ ] Demonstrable roadmap progress.
- [ ] A healthy number of public adopters that are identified within the project ( using an ADOPTERS file or showcased on the project’s website ).
- [ ] Have achieved and maintained an [OpenSSF Best Practices Badge at the gold level](https://bestpractices.coreinfrastructure.org/en/criteria/2).
- [ ] Have a technical lead appointed for voting representation of the project to the TAC.
- [ ] Be deemed by the TAC to add value to the mission of ASWF.
- [ ] 2/3 supermajority vote of the TAC
- [ ] Affirmative majority vote of the Governing Board
+599 -104
View File
@@ -1,37 +1,42 @@
Release 2.5 (summer 2023?) -- compared to 2.4
Release 2.5 (Fall 2023) -- compared to 2.4
-------------------------------------------------
New minimum dependencies and compatibility changes:
New major features and public API changes:
* ImageBufAlgo additions:
- A new flavor of `ociodisplay()` now contains an inverse parameter.
#3650 (2.5.0.0)
* oiiotool new commands and features:
- New `--iccread` and `--iccwrite` add an ICC profile from an external
file to the metadata of an image, or extract the ICC profile metadata
and save it as a separate file. #3550 (2.5.0.0)
- New expression syntax for retrieving metadata `{TOP[foo]}` is similar to
the existing `{TOP.foo}`, if there is no `foo` metadata found, the
former evaluates to an empty string, whereas the latter is an error.
#3619 (2.4.5/2.5.0.0)
- New `--no-error-exit` causes an error to not exit immediately, but
rather to try to execute the remaining command line operations. This is
intended primarily for unit tests and debugging. #3643 (2.5.0.0)
- New `--colorconfiginfo` prints the full inventory of color management
information, including color space aliases, roles, and with improved
readability of output for larger configs. #3707 (2.5.0.0)
* OIIO::getattribute() new queries:
- `font_list`, `font_file_list`, `font_dir_list` return, respectively, the
list of fonts that OIIO found, the list of full paths to font files, and
the list of directories searched for fonts. All return a single string
that is a semicolon-separated list of the items. #3633 (2.5.0.0)
- `opencolorio_version` returns the human-readable (e.g. "2.2.0") version
of OpenColorIO that is being used. #3662 (2.5.0.0)
* IOProxy support for additional file formats: SGI #3641, RLA #3642, IFF #3647
(2.5.0.0)
* New `OIIO::print()` exposes `Strutil::print()` in the main OIIO namespace.
#3667 (2.4.6/2.5.0.0)
* Extensive support for OpenColorIO 2.2 functionality:
Beta 1: 2023-09-04
### New minimum dependencies and compatibility changes:
* CMake: minimum needed to build OpenImageIO has been raised from 3.12 to
3.15. [#3924](https://github.com/OpenImageIO/oiio/pull/3924) (2.5.2.1)
* LibRaw: minimum has ben raised from 0.15 to 0.18.
[#3921](https://github.com/OpenImageIO/oiio/pull/3921) (2.5.2.1)
* The new OpenEXR minimum is 2.4 (raised from 2.3).
[#3928](https://github.com/OpenImageIO/oiio/pull/3928) (2.5.2.1)
* The new `fmt` library minimum is 7.0 (raised from 6.1)
[#3973](https://github.com/OpenImageIO/oiio/pull/3973) (2.5.3.0)
### ⛰️ New features and public API changes:
* TextureSystem color management: [#3761](https://github.com/OpenImageIO/oiio/pull/3761) (2.5.1.0)
- TextureOpt and TextureOptBatch have a new field, `colortransformid`,
which supplies an integer ID for a requested color space transformation
to be applied as texture tiles are read. The default value 0 means no
transformation because the texture is presumed to be in the working
color space (this is the old behavior, and most performant). Tiles from
the same texture file but using different color transformations are
allowed and will not interfere with each other in the cache.
- New `TextureSystem::get_colortransform_id(from, to)` maps from/to named
color spaces to a color transform ID that can be passed to texture
lookup calls.
- `ImageCache::get_image_handle` and `TextureSystem::get_texture_handle`
now take an optional `TextureOpt*` parameter that can supply additional
constraints (such as color transformation) that TS/IC implementations
may wish to split into separate handles. This is currently not used, but
is reserved so that the API doesn't need to be changed if we use it in
the future.
- texture.h defines symbol `OIIO_TEXTURESYSTEM_SUPPORTS_COLORSPACE` that
can be tested for existence to know if the new fields are in the
TextureOpt structure.
* Extensive support for OpenColorIO 2.2 functionality and improved color
management:
- When building against OCIO 2.2, you can specify/use the new "built-in"
configs, including using `ocio://default`, which will automatically be
usd if no config is specified and the `$OCIO` variable is not set #3662
@@ -48,28 +53,153 @@ New major features and public API changes:
name (like "sRGB") into a canonical color space name;
`equivalent(n1,n2)` returns true if it can tell that the two names
refer, ultimately, to equivalent color spaces #3707 (2.5.0.0)
- New `ImageSpec::set_colorspace()` method is a more thorough way to set
the color space data than simply setting the "oiio:ColorSpace" metadata
(though it also does that). #3734 (2.5.0.1)
- Improve OIIO's ability to guess which of the config's color space names
are aliases for common spaces such as srgb, lin_srgb, and acescg (quite
robustly if using OCIO >= 2.2, even for totally nonstandard names in the
config). #3755 (2.5.0.1)
- New `ColorConfig::getColorSpaceIndex()` looks up a color space index by
its name, alias, or role. #3758 (2.5.0.1)
* oiiotool new commands and features:
- New `--iccread` and `--iccwrite` add an ICC profile from an external
file to the metadata of an image, or extract the ICC profile metadata
and save it as a separate file. #3550 (2.5.0.0)
- New `--parallel-frames` parallelizes execution over a frame range rather
than over regions within each image operation. This should be used with
caution, as it will give incorrect results for an oiiotool command line
involving a frame range where the iterations have a data dependency on
each other and must be executed in order. But in cases where the order
of frame processing doesn't matter and there are many more frames in the
sequence than cores, you can get a substantial performance improvement
using this flag. [#3849](https://github.com/OpenImageIO/oiio/pull/3849) (2.5.2.0)
- New `--no-error-exit` causes an error to not exit immediately, but
rather to try to execute the remaining command line operations. This is
intended primarily for unit tests and debugging. #3643 (2.5.0.0)
- New `--colorconfiginfo` prints the full inventory of color management
information, including color space aliases, roles, and with improved
readability of output for larger configs. #3707 (2.5.0.0)
- The `--resize` command takes new optional `:from=`, `:to=`, and
`:edgeclamp=` modifiers to give more general and fine control over the
specific correspondence between display windows in the input image and
resized destination image (including allowing partial pixel offsets).
#3751 #3752 (2.5.0.1)
- New expression substitution additions:
- New syntax for retrieving metadata `{TOP[foo]}` is similar to the
existing `{TOP.foo}`, if there is no `foo` metadata found, the
former evaluates to an empty string, whereas the latter is an error.
#3619 (2.4.5/2.5.0.0)
- `{NIMAGES}` gives current stack depth
[#3822](https://github.com/OpenImageIO/oiio/pull/3822) (2.5.2.0)
- `{nativeformat}` is the pixel data format of the file, whereas the
existing `format` has always returned the data type used in memory.
Also, `METANATIVE` and `METANATIVEBRIEF` are the full metadata
keywords for native file metadata, comapred to the previously
existing `META` and `METABRIEF` which we now clarify reflect the
in-memory representation. #3639 (2.5.0.0)
- `--ociodisplay` now takes an optional `:inverse=1` modifier. #3650
(2.5.0.0)
- New `-otex` optional modifier `forcefloat=0` can improve memory use for
enormous texture conversion.
[#3829](https://github.com/OpenImageIO/oiio/pull/3829) (2.5.2.0)
- `--printinfo` now takes new optional modifiers: `:native=1` ensures
that the metadata printed is of the file, not changed by the way the
image is stored in memory (for example, it may have been converted to
a more convenient in-memory data type); `:verbose=1` prints verbose
stats even if `-v` is not used; `:stats=1` prints full pixel stats,
even if `--stats` is not used. #3639 (2.5.0.0)
- New `--normalize` mormalizes image that represent 3D vectors (i.e.,
divide by their length) textures. This is helpful for normal maps.
[#3945](https://github.com/OpenImageIO/oiio/pull/3945) (by Vlad (Kuzmin) Erium) (2.5.3.0)
* ImageBufAlgo additions:
- A new flavor of `ociodisplay()` now contains an inverse parameter.
#3650 (2.5.0.0)
- New `normalize()` normalizes image that represent 3D vectors (i.e.,
divide by their length) textures. This is helpful for normal maps.
[#3945](https://github.com/OpenImageIO/oiio/pull/3945) (by Vlad (Kuzmin)
Erium) [#3963](https://github.com/OpenImageIO/oiio/pull/3963) (2.5.3.0)
* ImageInput / ImageOutput
- New `ImageOutput::check_open()` method can be used by format writers
authors to centralize certain validity tests so they don't need to be
implemented separately for each file type. This is not meant to be
called by client application code, only by format writer authors. #3686
(2.5.0.0)
- Add an `ImageInput::valid_file(IOProxy)` overload
[#3826](https://github.com/OpenImageIO/oiio/pull/3826) (by Jesse Y)
(2.5.2.0) and implement its overloads for DDS, PSD, and WEBP
[#3831](https://github.com/OpenImageIO/oiio/pull/3831) (by Jesse Y)
(2.5.2.0)
- New `ImageOutput::check_open()` and `ImageInput::open_check()` can be
used by format reader/writer authors to centralize certain validity
tests so they don't need to be implemented separately for each file
type. This is not meant to be called by client application code, only by
format reader/writer authors.
[#3686](https://github.com/OpenImageIO/oiio/pull/3686) (2.5.0.0)
[#3967](https://github.com/OpenImageIO/oiio/pull/3967) (2.5.3.0)
- *ImageInput*: Add an ImageInput::valid_file(IOProxy) overload
[#3826](https://github.com/OpenImageIO/oiio/pull/3826) (by Jesse Y) (2.5.2.0)
- *ImageInput*: Implement valid_file(IOProxy) overloads for DDS, PSD, and
WEBP [#3831](https://github.com/OpenImageIO/oiio/pull/3831) (by Jesse
Y) (2.5.2.0)
* New top-level `namespace OIIO` functions:
- `OIIO::shutdown()` method [#3882](https://github.com/OpenImageIO/oiio/pull/3882) (by Ray Molenkamp)
- `OIIO::default_thread_pool_shutdown()` [#2382](https://github.com/OpenImageIO/oiio/pull/2382)
- `OIIO::print()` exposes `Strutil::print()` in the main OIIO namespace.
#3667 (2.4.6/2.5.0.0)
* OIIO::getattribute() new queries:
- `font_list`, `font_file_list`, `font_dir_list` return, respectively, the
list of fonts that OIIO found, the list of full paths to font files, and
the list of directories searched for fonts. All return a single string
that is a semicolon-separated list of the items. #3633 (2.5.0.0)
- `opencolorio_version` returns the human-readable (e.g. "2.2.0") version
of OpenColorIO that is being used. #3662 (2.5.0.0)
* IOProxy support for additional file formats: SGI #3641, RLA #3642, IFF #3647
(2.5.0.0), ICO input [#3919](https://github.com/OpenImageIO/oiio/pull/3919)
(by jasonbaumeister) (2.5.2.0)
* Remove long deprecated/nonfunctional C API headers [#3567](https://github.com/OpenImageIO/oiio/pull/3567)
* New `ImageOutput::check_open()` can be used by format writers authors to
centralize certain validity tests so they don't need to be implemented
separately for each file type. This is not meant to be called by client
application code, only by format writer authors. #3686 (2.5.0.0)
### 🚀 Performance improvements:
Performance improvements:
- Fixed some ImageBuf and IBA internals to avoid unnecessary/redundant zeroing
out of newly allocated buffer memory. #3754 (2.5.0.1)
- *oiiotool*: `--parallel-frames` parallelizes execution over a frame
range rather than over regions within each image operation.
[#3849](https://github.com/OpenImageIO/oiio/pull/3849) (2.5.2.0)
- *psd*: Improve memory efficiency of PSD read
[#3807](https://github.com/OpenImageIO/oiio/pull/3807) (2.5.2.0)
- Improvements to performance and memory when making very large textures
[#3829](https://github.com/OpenImageIO/oiio/pull/3829) (2.5.2.0)
- OpenEXR: Change to using exr-core for reading by default [#3788](https://github.com/OpenImageIO/oiio/pull/3788)
- TextureSystem: Improve texture lookup performance by remove redundant
instructions from tile hash [#3898](https://github.com/OpenImageIO/oiio/pull/3898) (by Curtis Black) (2.5.2.0)
Fixes and feature enhancements:
### 🐛 Fixes and feature enhancements:
* ImageInput: fix typo in debug output [#3956](https://github.com/OpenImageIO/oiio/pull/3956) (by Jesse Yurkovich)
* Python bindings:
- Now has the ability to getattribute() of int64 and uint64 metadata.
#3555 (2.5.0.0)
- Add ability to `getattribute()` of int64 and uint64 data [#3555](https://github.com/OpenImageIO/oiio/pull/3555) (2.5.0.0)
- Fixed ability to add and retrieve `uint8[]` metadata, which on the
python side will be numpy arrays of type uint8 (dtype='B'). This is
important for being able to set and retrieve "ICCProfile" metadata.
#3556 (2.5.0.0)
- Eliminate redundant code in Python IBA bindings [#3615](https://github.com/OpenImageIO/oiio/pull/3615)
- Improve error messages for when passing incorrect python array sizes.
#3801 (2.5.1.0)
- Fix arithmetic overflow in oiio_bufinfo (Python interop) [#3931](https://github.com/OpenImageIO/oiio/pull/3931) (by Jesse Yurkovich) (2.5.2.0)
* ImageBuf improvements:
- Fixes to subtle bugs when ImageBuf is used with IOProxy. #3666
(2.4.6/2.5.0.0)
- Auto print uncaught ImageBuf errors. When an IB is destroyed, any errors
that were never retrieved via `geterror()` will be printed, to aid users
who would not notice the errors otherwise.
[#3949](https://github.com/OpenImageIO/oiio/pull/3949) (2.5.3.0)
* ImageBufAlgo improvements:
- IBAPrep should not zero out deep images when creating a new destination
image. #3724 (2.5.0.0/2.4.8.0)
- Improve error message for IBA::ocio functions [#3887](https://github.com/OpenImageIO/oiio/pull/3887)
- UTF-8 text rendering fixes [#3935](https://github.com/OpenImageIO/oiio/pull/3935)
(by Nicolas) (2.5.3.0)
* make_texture() / maketx / TextureSystem / ImageCache:
- Ensure proper setting of certain metadata when using a texture as a
source to build another texture. #3634 (2.4.5/2.5.0.0)
@@ -80,113 +210,200 @@ Fixes and feature enhancements:
a lookup. #3694 (2.5.0.0)
- Fixed `maketx --lightprobe`, which never worked properly for images
that weren't `float` pixel data type. #3732 (2.5.0.0/2.4.7.0)
- Fix bad handling of `maketx --cdf`, which was trying to take an extra
command line argument that it didn't need. #3748 (2.5.0.1)
- Improve IC statistics appearance by omitting certain meaningless stats
when no files were read by the IC/TS. #3765 (2.4.9.0/2.5.0.1)
- Fixes that avoid deadlock situations on the file handle cache in certain
scenarios with very high thread contention. #3784 (2.4.10.0/2.5.0.3)
- maketx and oiiotool --otex: Add support for CDFs of bumpslopes channels.
Previously, if you used both --bumpslopes and --cdf at the same time,
the CDFs were not produced for all channels. #3793 (by Tom Knowles) (2.4.10.0/2.5.1.0)
* oiiotool improvements:
- `--printinfo` now takes new optional modifiers: `:native=1` ensures
that the metadata printed is of the file, not changed by the way the
image is stored in memory (for example, it may have been converted to
a more convenient in-memory data type); `:verbose=1` prints verbose
stats even if `-v` is not used; `:stats=1` prints full pixel stats,
even if `--stats` is not used. #3639 (2.5.0.0)
- Expression substitution recognizes new metadata names: `nativeformat` is
the pixel data format of the file, whereas the existing `format` has
always returned the data type used in memory. Also, `METANATIVE` and
`METANATIVEBRIEF` are the full metadata keywords for native file
metadata, comapred to the previously existing `META` and `METABRIEF`
which we now clarify reflect the in-memory representation. #3639
(2.5.0.0)
- When `-q` (quiet mode) is used, and when an error occurs, only print the
error message and not the full help message. #3649 (2.5.0.0)
- `--ociodisplay` now takes an optional `:inverse=1` modifier. #3650
- Fix problems with `--point` when there is no alpha channel. #3684
(2.4.6/2.5.0.0)
- `--dumpdata` fix channel name output. #3687 (2.4.6/2.5.0.0)
- `--help` now prints a much abbreviated color management section (just the
OCIO version and config file). Use the new `--colorconfiginfo` argument
to print the full color management information, which is both more
readable and more detailed than what `--help` used to print. #3707
(2.5.0.0)
- Fix problems with `--point` when there is no alpha channel. #3684
(2.4.6/2.5.0.0)
- `--dumpdata` fix channel name output. #3687 (2.4.6/2.5.0.0)
- `--help` now prints a much abbreviated color management section (just the
OCIO version and config file). Use the new `--colorconfiginfo` argument
to print the full color management information, which is both more
readable and more detailed than what `--help` used to print. #3707
(2.5.0.0)
- Don't propagate unsupported channels
[#3838](https://github.com/OpenImageIO/oiio/pull/3838) (2.5.2.0)
- *refactor*: Get rid of the global Oiiotool singleton.
[#3848](https://github.com/OpenImageIO/oiio/pull/3848) (2.5.2.0)
- *oiiotool*: Work around static destruction order issue #3295 [#3591](https://github.com/OpenImageIO/oiio/pull/3591) (by Aras Pranckevičius)
* ICC Profiles found in JPEG, JPEG-2000, PSN, PSD, and TIFF files are now
examined and several key fields are extracted as separate metadata. #3554
(2.5.0.0)
* Various protections against corrupted files [#3954](https://github.com/OpenImageIO/oiio/pull/3954) (2.5.3.0)
* BMP:
- Fix reading 16bpp images. #3592 (2.4.5/2.5.0.0)
- Fix reading 16bpp images. [#3592](https://github.com/OpenImageIO/oiio/pull/3592) (by Aras Pranckevičius) (2.4.5/2.5.0.0)
- Protect against corrupt pixel coordinates. (TALOS-2022-1630,
CVE-2022-38143) #3620 (2.4.5/2.5.0.0)
CVE-2022-38143) [#3620](https://github.com/OpenImageIO/oiio/pull/3620) (2.4.5/2.5.0.0)
- Fix possible write errors, fixes TALOS-2022-1653 / CVE-2022-43594,
CVE-2022-43595. #3673 (2.4.6/2.5.0.0)
- Mark color space as sRGB, which seems likely to be true of any BMP
files anybody encounters. #3701 (2.5.0.0)
- Fix signed integer overflow when computing total number of pixels
[#3948](https://github.com/OpenImageIO/oiio/pull/3948) (by xiaoxiaoafeifei) (2.5.3.0)
* DDS:
- Fix heap overflow in DDS input. #3542 (2.5.0.0)
- Improved support for DTX5, ATI2/BC5 normal maps, R10G10B10A2
format, RXGB, BC4U, BC5U, A8, improved low bit expansion to 8 bits.
#3573 (2.4.4.2/2.5.0.0)
- Fix alpha/luminance files, better testing. #3581 (2.4.5/2.5.0.0)
- Optimize loading of compressed images, improves 3-5x. #3583 #3584
[#3573](https://github.com/OpenImageIO/oiio/pull/3573)
(by Aras Pranckevičius)(2.4.4.2/2.5.0.0)
- Fix alpha/luminance files, better testing. [#3581](https://github.com/OpenImageIO/oiio/pull/3581) (by Aras Pranckevičius) (2.4.5/2.5.0.0)
- Optimize loading of compressed images, improves 3-5x. [#3583](https://github.com/OpenImageIO/oiio/pull/3583) (by Aras Pranckevičius) #3584
(2.4.5/2.5.0.0)
- Honor ImageInput thread policy [#3584](https://github.com/OpenImageIO/oiio/pull/3584)
- Fix crashes for cubemap files when a cube face was not present, and
check for invalid bits per pixel. (TALOS-2022-1634, CVE-2022-41838)
(TALOS-2022-1635, CVE-2022-41999) [#3625](https://github.com/OpenImageIO/oiio/pull/3625) (2.4.5/2.5.0.0)
(TALOS-2022-1635, CVE-2022-41999) #3625 (2.4.5/2.5.0.0)
- Fix divide-by-0 during DXT4 DDS load [#3959](https://github.com/OpenImageIO/oiio/pull/3959) (by Jesse Yurkovich) (2.5.3.0)
* DPX:
- Fix possible write errors, fixes TALOS-2022-1651 / CVE-2022-43592 and
TALOS-2022-1652 / CVE-2022-43593. #3672 (2.4.6/2.5.0.0)
* FITS:
- Ensure that the file is closed if open fails to find the right magic
number. #3771 (2.5.1.0)
* GIF:
- Fix potential array overrun when writing GIF files. #3789
(2.4.10.0/2.5.1.0)
- Prevent heap-buffer-overflow
[#3841](https://github.com/OpenImageIO/oiio/pull/3841) (2.5.2.0) (by
xiaoxiaoafeifei)
* HEIC:
- Support the ".hif" extension, which seems to be used by some Canon
cameras instead of .heif.
[#3813](https://github.com/OpenImageIO/oiio/pull/3813)(by AdamMainsTL)
* HDR:
- Fix a 8x (!) read performance regression for HDR files that was
introduced in OIIO in 2.4. On top of that, speed up by another 4x beyond
what we ever did before by speeding up the RGBE->float conversion. #3588
#3590 (2.4.5/2.5.0.0)
what we ever did before by speeding up the RGBE->float conversion.
[#3588](https://github.com/OpenImageIO/oiio/pull/3588) [#3590](https://github.com/OpenImageIO/oiio/pull/3590)
(by Aras Pranckevičius) (2.4.5/2.5.0.0)
* ICO:
- Heap-buffer-overflow [#3872](https://github.com/OpenImageIO/oiio/pull/3872) (by xiaoxiaoafeifei) Fixes CVE-2023-36183.
* IFF:
- Protect against 0-sized allocations. #3603 (2.5.0.0)
- IOProxy support. #3647 (2.4.6/2.5.0.0)
FIXME Temporarily disable IOProxy support to avoid bugs in #3760
(2.5.0.1)
- Fix possible write errors, fixes TALOS-2022-1654 / CVE-2022-43596,
TALOS-2022-1655 / CVE-2022-43597 CVE-2022-43598, TALOS-2022-1656 /
CVE-2022-43599 CVE-2022-43600 CVE-2022-43601 CVE-2022-43602 #3676
(2.4.6/2.5.0.0)
- Catch possible exception, identified by static analysis [#3681](https://github.com/OpenImageIO/oiio/pull/3681)
* JPEG
- *jpeg*: Fix density calculation for jpeg output
[#3861](https://github.com/OpenImageIO/oiio/pull/3861) (2.5.2.0) (by
Loïc Vital)
* JPEG2000:
- Better pixel type promotion logic [#3878](https://github.com/OpenImageIO/oiio/pull/3878) (2.5.2.0)
* OpenEXR:
- Fix potential use of uninitialized value when closing. #3764 (2.5.0.1)
- Try to improve exr thread pool weirdness
[#3864](https://github.com/OpenImageIO/oiio/pull/3864) (2.5.2.0)
- Controlled shutdown of IlmThread pool in all apps in which we use it.
[#3805](https://github.com/OpenImageIO/oiio/pull/3805) (2.5.2.0)
- Correction to dwa vs zip logic when outputting OpenEXR [#3884](https://github.com/OpenImageIO/oiio/pull/3884) (2.5.2.0)
- Enable openexr core library by default when recent enough
[#3942](https://github.com/OpenImageIO/oiio/pull/3942) (2.5.3.0)
* PBM:
- Fix accidental inversion for 1-bit bipmap pbm files. #3731
- Fix accidental inversion for 1-bit bitmap pbm files. [#3731](https://github.com/OpenImageIO/oiio/pull/3731)
(2.5.0.0/2.4.8.0)
* PNG:
- Fix memory leaks for error conditions. #3543 #3544 (2.5.0.0)
- Add EXIF write support to PNG output. [#3736](https://github.com/OpenImageIO/oiio/pull/3736) (by Joris Nijs) (2.5.0.1)
* PSD:
- Fix a PSD read error on ARM architecture. #3589 (2.4.5/2.5.0.0)
- Protect against corrupted embedded thumbnails. (TALOS-2022-1626,
CVE-2022-41794) #3629 (2.4.5/2.5.0.0)
- Fix thumbnail extraction. #3668 (2.4.6/2.5.0.0)
- When reading, don't reject padded thumbnails. #3677 (2.4.6/2.5.0.0)
- Fix wrong "oiio:UnassociatedAlpha" metadata. #3750 (2.5.0.1)
- Handle very wide images with more than 64k resolution in either
direction. #3806 (2.5.1.0/2.4.11)
- Improve memory efficiency of PSD read [#3807](https://github.com/OpenImageIO/oiio/pull/3807) (2.5.2.0)
- Prevent simultaneous psd thumbnail reads from clashing [#3877](https://github.com/OpenImageIO/oiio/pull/3877)
- CMYK PSD files now copy alpha correctly [#3918](https://github.com/OpenImageIO/oiio/pull/3918) (by jasonbaumeister) (2.5.2.0)
* RAW:
- Add color metadata: pre_mul, cam_mul, cam_xyz, rgb_cam. #3561 #3569
#3572 (2.5.0.0)
- Update Exif orientation if user flip is set. #3669 (2.4.6/2.5.0.0)
- Correctly handle 1-channel raw images. #3798 (2.5.1.0/2.4.11.0)
- Fix LibRaw flip to Exif orientation conversion
[#3847](https://github.com/OpenImageIO/oiio/pull/3847)
[#3858](https://github.com/OpenImageIO/oiio/pull/3858) (2.5.2.0) (by
Loïc Vital)
* RLA:
- Fix potential buffer overrun. (TALOS-2022-1629, CVE-2022-36354) #3624
(2.4.5/2.5.0.0)
- IOProxy support. #3642 (2.5.0.0)
- Fix possible invalid read from an empty vector during RLA load
[#3960](https://github.com/OpenImageIO/oiio/pull/3960) (by Jesse Yurkovich) (2.5.3.0)
* SGI:
- IOProxy support. #3641 (2.5.0.0)
* Targa:
- Fix incorrect unique_ptr allocation. #3541 (2.5.0.0)
- Fix string overflow safety. (TALOS-2022-1628, CVE-2022-41981) #3622
(2.4.5/2.5.0.0)
- Fix string overflow safety. (TALOS-2022-1628, CVE-2022-41981)
[#3622](https://github.com/OpenImageIO/oiio/pull/3622) (2.4.5/2.5.0.0)
- Guard against corrupted tga files Fixes TALOS-2023-1707 /
CVE-2023-24473, TALOS-2023-1708 / CVE-2023-22845. #3768 (2.5.1.0/2.4.8.1)
* TIFF:
- Guard against corrupt files with buffer overflows. (TALOS-2022-1627,
CVE-2022-41977) #3628 (2.4.5/2.5.0.0)
CVE-2022-41977) [#3628](https://github.com/OpenImageIO/oiio/pull/3628) (2.4.5/2.5.0.0)
- Guard against buffer overflow for certain CMYK files. (TALOS-2022-1633,
CVE-2022-41639) (TALOS-2022-1643, CVE-2022-41988) #3632 (2.4.5/2.5.0.0)
CVE-2022-41639) (TALOS-2022-1643, CVE-2022-41988)
[#3632](https://github.com/OpenImageIO/oiio/pull/3632) (2.4.5/2.5.0.0)
- While building against the new libtiff 4.5, use its new per-tiff error
handlers to ensure better thread safety. #3719 (2.5.0.0/2.4.8.0)
- Better logic for making TIFF PhotometricInterpretation tag and
oiio:ColorSpace metadata correspond to each other correctly for TIFF
files. [#3746](https://github.com/OpenImageIO/oiio/pull/3746) (2.5.0.1)
- Fix: race condition in TIFF reader, fixes TALOS-2023-1709 /
CVE-2023-24472. #3772 (2.5.1.0/2.4.8.1)
- Disable writing TIFF files with JPEG compression -- it never worked
properly and we can't seem to fix it. The fact that nobody noticed that
it never worked is taken as evidence that nobody needs it. If asked for,
it just uses the default ZIP compression instead. The TIFF reader can
still read JPEG-compressed TIFF files just fine, it's only writing that
appears problematic. #3791 (2.5.0.4)
* Zfile:
- Zfile write safety, fixes TALOS-2022-1657 / CVE-2022-43603. #3670
(2.4.6/2.5.0.0)
* Exif / TIFF/JPEG/PSD: Fix EXIF bugs where corrupted exif blocks could
overrun memory. (TALOS-2022-1626, CVE-2022-41794) (TALOS-2022-1632,
CVE-2022-41684) (TALOS-2022-1636 CVE-2022-41837) #3627 (2.4.5/2.5.0.0)
* Exif (all formats that support it, TIFF/JPEG/PSD):
- Fix EXIF bugs where corrupted exif blocks could overrun memory.
(TALOS-2022-1626, CVE-2022-41794) (TALOS-2022-1632, CVE-2022-41684)
(TALOS-2022-1636 CVE-2022-41837) #3627 (2.4.5/2.5.0.0)
- Fix typo that prevented us from correctly naming Exif
"CameraElevationAngle" metadata.
[#3783](https://github.com/OpenImageIO/oiio/pull/3783) (by Fabien
Castan) (2.4.10.0/2.5.1.0)
- Convert paramvalue string to integer when needed [#3886](https://github.com/OpenImageIO/oiio/pull/3886) (by Fabien Servant @ TCS) (2.5.2.0)
- Squash some alignment problems caught by ubsan [#3646](https://github.com/OpenImageIO/oiio/pull/3646)
* Fix missing OIIO::getattribute support for `limits:channels` and
`limits:imagesize_MB`. #3617 (2.4.5/2.5.0.0)
* IBA::render_text and `oiiotool --text` now can find ".ttc" font files. #3633
(2.5.0.0)
* Fix ImageOutput::check_open error conditions. #3769 (2.5.1.0)
* Fix thread safety issue when reading ICC profiles from multiple files
simultaneously. This could affect any files with ICC profiles. #3767
(2.5.1.0)
* Improve searching for fonts for the text rendering functionality. #3802
#3803 (2.5.1.0)
* Improve OpenCV support -- errors, version, half
[#3853](https://github.com/OpenImageIO/oiio/pull/3853) (2.5.2.0)
* Prevent possible deadlock when reading files with wrong extensions
[#3845](https://github.com/OpenImageIO/oiio/pull/3845)
* Wait for terminated threads to join in thread_pool::Impl::resize [#3879](https://github.com/OpenImageIO/oiio/pull/3879) (by Ray Molenkamp)
### 🔧 Internals and developer goodies
Developer goodies / internals:
* filesystem.h:
- Add an optional size parameter to `read_text_file()` to limit the
maximum size that will be allocated and read (default to a limit of
@@ -199,20 +416,33 @@ Developer goodies / internals:
- IOMemReader::pread now detects and correctly handles out-of-range
read positions. #3712 (2.4.7/2.5.0.0)
* fmath.h:
- Remove useless bitcast specializations. #3728 (2.5.0.0/2.4.8.0)
- Fix a wrong result with `fast_exp2()` with MSVS and sse4.2.
[#3804](https://github.com/OpenImageIO/oiio/pull/3804) (by Eric Mehl)
(2.5.1.0/2.4.11)
* platform.h:
- New macros for detecting MSVS 2019 and 2022. #3727 (2.5.0.0/2.4.8.0)
* simd.h:
- Fixes to ensure safe compilation for Cuda. #3810 (2.5.1.0/2.4.11)
- Fix sense of hiding deprecated type names [#3870](https://github.com/OpenImageIO/oiio/pull/3870) (2.5.2.0)
- Fix broken OIIO_NO_NEON definition [#3911](https://github.com/OpenImageIO/oiio/pull/3911)
* span.h:
- `cspan<>` template now allows for Extent template argument (as `span<>`
already did). #3685 (2.5.0.0)
- New custom fmt formatter can print spans. #3685 (2.5.0.0)
* string_view.h:
- Avoid sanitizer warning unsigned integer overflow [#3678](https://github.com/OpenImageIO/oiio/pull/3678)(by wayne-arnold-adsk)
* strutil.h:
- Add a new flavor of `utf16_to_utf8()` to convert between std::u16string
and std::string (UTF-8 encoded). Note the contrast between this and the
existing flavor that takes a `std::wstring` with UTF-16 encoding
(`std::wchar/wstring` is not guaranteed to 16 bits on all platforms, but
`u16char/u16string` is). #3553 (2.5.0.0)
- New `trimmed_whitspace()`. #3636 (2.4.5/2.5.0.0)
- New `trimmed_whitspace()`. [#3636](https://github.com/OpenImageIO/oiio/pull/3636) (2.4.5/2.5.0.0)
- Use std::forward properly for sync::print().
[#3825](https://github.com/OpenImageIO/oiio/pull/3825) (2.5.2.0)
- Ensure proper constexpr of string hashing [#3901](https://github.com/OpenImageIO/oiio/pull/3901)
* timer.h:
- Minor improvements to Timer and LoggedTimer classes. #3753 (2.5.0.1)
* tiffutils.h:
- `decode_icc_profile` extracts several fields from an ICC profile binary
blob and adds them as metadata to an ImageSpec. #3554 (2.5.0.0)
@@ -228,9 +458,17 @@ Developer goodies / internals:
- Ensure that ustring hashes are always 64 bits, even on 32-bit
architectures. #3606 (2.5.0.0)
- Ensure safe use of this header from Cuda. #3718 (2.4.7/2.5.0.0)
- ustringhash: Make an explicit constructor from a hash value.
[#3778](https://github.com/OpenImageIO/oiio/pull/3778) (2.4.9.0/2.5.1.0)
- String literal operator for ustring and ustringhash
[#3939](https://github.com/OpenImageIO/oiio/pull/3939) (2.5.3.0)
* Safety: excise the last instances of unsafe sprintf. #3705 (2.5.0.0)
* Root out stray uses of deprecated simd type names; `OIIO_DISABLE_DEPRECATED`
[#3830](https://github.com/OpenImageIO/oiio/pull/3830) (2.5.2.0)
* Convert iconvert.cpp stream io and sprintf to modern [#3925](https://github.com/OpenImageIO/oiio/pull/3925)
### 🏗 Build/test/CI and platform ports:
Build/test system improvements and platform ports:
* CMake build system and scripts:
- It is now possible to `-DOpenImageIO_VERSION` to override the version
number being built (use with extreme caution). #3549 #3653 (2.5.0.0)
@@ -241,6 +479,18 @@ Build/test system improvements and platform ports:
(2.4.5/2.5.0.0)
- CMake config should not include a find of fmt if it's internalized.
#3739 (2.4.7.1/2.5.0.0)
- New CMake cache variable `OIIO_DISABLE_BOOST_STACKTRACE` to disable the
stacktrace functionality for users who want to avoid the Boost
stacktrace library. #3777 (by jreichel-nvidia) (2.4.9.0/2.5.1.0)
- Check need for libatomic with check_cxx_source_compiles instead of the
more expensive check_cxx_source_runs. #3774 (2.4.9.0/2.5.1.0)
- Fix incorrect CMake variable name to control symbol visibility
[#3834](https://github.com/OpenImageIO/oiio/pull/3834) (2.5.2.0)
- Make sure use of `${PROJECT_NAME}` doesn't occur before the call to
`project()`. [#3651](https://github.com/OpenImageIO/oiio/pull/3651)
- Fix use of OIIO_LOCAL_DEPS_PATH [#3865](https://github.com/OpenImageIO/oiio/pull/3865)
- Added check for Boost_NO_BOOST_CMAKE, ignore if already set
[#3961](https://github.com/OpenImageIO/oiio/pull/3961) (by Mikael Sundell) (2.5.3.0)
* Dependency version support:
- Support for OpenColorIO 2.2. #3644 (2.5.0.0)
- New CMake option `INTERNALIZE_FMT` (default ON), if set to OFF, will
@@ -248,51 +498,294 @@ Build/test system improvements and platform ports:
necessary fmt headers into the OIIO include area. #3598 (2.4.7/2.5.0.0)
- build_libtiff.bash changed to build shared library by default. #3586
(2.5.0.0)
- build_openexr.bash changed to build v3.1.5 by default. #3703
(2.5.0.0)
- build_openexr.bash changed to build v3.1.5 by default. #3703 (by Michael Oliver) (2.5.0.0)
- Qt6 support for iv. #3779 (2.4.9.0/2.5.1.0)
- Fmt 10.0 support [#3836](https://github.com/OpenImageIO/oiio/pull/3836) (2.5.2.0)
- FFmpeg 6.0 support [#3812](https://github.com/OpenImageIO/oiio/pull/3812) (2.5.2.0)
- Disable new warning for fmt headers in gcc13
[#3827](https://github.com/OpenImageIO/oiio/pull/3827) (2.5.2.0)
- Raise minimum CMake dependency from 3.12 to 3.15 [#3924](https://github.com/OpenImageIO/oiio/pull/3924) (2.5.2.0)
- Raise minimum libraw to 0.18 [#3921](https://github.com/OpenImageIO/oiio/pull/3921) (2.5.2.0)
- Raise OpenEXR minimum from 2.3 to 2.4 [#3928](https://github.com/OpenImageIO/oiio/pull/3928) (2.5.2.0)
- Fix WebP linking if CMAKE_FIND_PACKAGE_PREFER_CONFIG is ON [#3863](https://github.com/OpenImageIO/oiio/pull/3863) (by Benjamin Buch)
- Find OpenEXR equally well with our FindOpenEXR and exr's exported config
file [#3862](https://github.com/OpenImageIO/oiio/pull/3862) (by Benjamin
Buch)
- Fix fmt vs gcc warning that had version typo [#3874](https://github.com/OpenImageIO/oiio/pull/3874)
- Fix broken libheif < 1.13 [#3970](https://github.com/OpenImageIO/oiio/pull/3970) (2.5.3.0)
* Testing and Continuous integration (CI) systems:
- Restored sanitizer tests which had been inadvertently disabled. #3545
(2.5.0.0)
- Added tests for undefined behavior sanitizer. #3565 (2.5.0.0)
- Added tests or improved test coverage for Cineon files #3607, iinfo
#3605 #3613 #3688 #3706, texture statistics #3612, oiiotool unit tests
#3616, oiiotool expression substitution #3636, various oiiotool #3637
#3643 #3649, oiiotool control flow #3643, oiiotool sequence errors and
selecting out of range subimages or mip levels #3649, Strutil
#3616, oiiotool expression substitution #3636, various oiiotool #3626
#3637 #3643 #3649, oiiotool control flow #3643, oiiotool sequence errors
and selecting out of range subimages or mip levels #3649, Strutil
functionality #3655, ImageCache #3654, environment mapping #3694,
texture3d #3699, term output #3714, igrep #3715, oiiotool --pdiff #3723,
zover, fixnan for deep images, 2D filters #3730, pbm files #3731,
maketx --lightprobe #3732. (2.5.0.0)
zover, fixnan for deep images, 2D filters #3730, pbm files #3731, maketx
--lightprobe #3732 (2.5.0.0), TypeDesc::tostring, python ImageCache and
ImageBuf #3745, maketx #3748 (2.5.0.1), ImageBufAlgo python functions
#3766 (2.5.1.0), etc. #3745
- Make testsuite/oiiotool-control run much faster by combining commands
into fewer oiiotool invocations (speeds up testsuite) #3618 (2.5.0.0)
- CI color related tests use the OCIO buit-in configs, when OCIO 2.2+ is
available. #3662 (2.5.0.0)
- Fix compiler warnings [#3833](https://github.com/OpenImageIO/oiio/pull/3833) (2.5.2.0)
- Fix package name for icc [#3860](https://github.com/OpenImageIO/oiio/pull/3860) (2.5.2.0)
- Change the few symbolic links to copies to help Windows
[#3818](https://github.com/OpenImageIO/oiio/pull/3818) (2.5.2.0)
- Fix incorrect branch name when cloning openexr-images for the tests
[#3814](https://github.com/OpenImageIO/oiio/pull/3814) (2.5.2.0) (by
Jesse Y)
- Sonar analysis should exclude stb_sprintf.h [#3609](https://github.com/OpenImageIO/oiio/pull/3609)
- Eliminate xxhash and farmhash code from coverage analysis [#3621](https://github.com/OpenImageIO/oiio/pull/3621)
- No longer add the ppa:ubuntu-toolchain-r/test repository [#3671](https://github.com/OpenImageIO/oiio/pull/3671)
- Test against latest webp, and deal with its master->main repo change [#3695](https://github.com/OpenImageIO/oiio/pull/3695)
- Fix broken Mac CI with proper numpy install [#3702](https://github.com/OpenImageIO/oiio/pull/3702)
- Lock down to older icc so it's not broken [#3744](https://github.com/OpenImageIO/oiio/pull/3744)
- Updates to runners, dependencies [#3786](https://github.com/OpenImageIO/oiio/pull/3786)
- Bump 'latest versions' test to the newest openexr release [#3796](https://github.com/OpenImageIO/oiio/pull/3796)
- Fix broken heif dependency and test [#3894](https://github.com/OpenImageIO/oiio/pull/3894)
- Add test with new aswf containers for VFX Platform 2023 [#3875](https://github.com/OpenImageIO/oiio/pull/3875)
- Simplify build_llvm.bash script [#3892](https://github.com/OpenImageIO/oiio/pull/3892)
- Get rid of long-unused install_test_images.bash [#3895](https://github.com/OpenImageIO/oiio/pull/3895)
- Test against pybind11 v2.11 [#3912](https://github.com/OpenImageIO/oiio/pull/3912)
- Lock down icx version [#3929](https://github.com/OpenImageIO/oiio/pull/3929)
- Fix missing simd test due to copy paste typo [#3896](https://github.com/OpenImageIO/oiio/pull/3896)
- Bump build_openexr and build_opencolorio defaults to latest versions [#3920](https://github.com/OpenImageIO/oiio/pull/3920)
- Test both openexr old and core versions [#3604](https://github.com/OpenImageIO/oiio/pull/3604)
- Add benchmarking of strutil.h ways to concatenate strings. [#3787](https://github.com/OpenImageIO/oiio/pull/3787)
- Make timer_test more robust [#3953](https://github.com/OpenImageIO/oiio/pull/3953) (2.5.3.0)
* Platform support:
- MinGW: fix incorrect symbol visibility issue for ImageBuf iterators.
#3578 (2.4.5/2.5.0.0)
- Windows: protect against OpenEXR thread deadlock on shutdown. #3582
(2.4.5/2.5.0.0)
- Windows: Work around a static destruction order issue. #3591
(2.4.5/2.5.0.0)
- Windows: define `NOGDI` to keep the inclusion of windows.h from adding
as many unneeded symbols. #3596 (2.4.5/2.5.0.0)
- Windows: Stop including Windows.h from public OIIO headers. #3597
(2.5.0.0)
- ARM: improve SIMD operations for ARM NEON. #3599 (2.4.5/2.5.0.0)
as many unneeded symbols. [#3596](https://github.com/OpenImageIO/oiio/pull/3596) (by Aras Pranckevičius) (2.4.5/2.5.0.0)
- Windows: Stop including Windows.h from public OIIO headers. [#3597](https://github.com/OpenImageIO/oiio/pull/3597) (by Aras Pranckevičius) (2.5.0.0)
- Windows: Fix windows.h pre-definitions
[#3965](https://github.com/OpenImageIO/oiio/pull/3965) (2.5.3.0)
- Windows on ARM64 build fixes. #3690 (2.4.6/2.5.0.0)
- Windows: Fix unresolved external symbol for MSVS 2017.
[#3763](https://github.com/OpenImageIO/oiio/pull/3763) (by Latios96) (2.5.0.1)
- Windows: Fix build error with MSVC [#3832](https://github.com/OpenImageIO/oiio/pull/3832) (by Ray Molenkamp) (2.5.2.0)
- MinGW: fix incorrect symbol visibility issue for ImageBuf iterators. #3578
- Mac: Suppress warnings about deprecated std::codecvt on newest Apple
clang. #3709 #3710 (2.4.7/2.5.0.0)
- ARM: Fix signed/unsigned mismatch compiler errors in vbool4 methods.
- Mac: Fixes to make a clean build using Apple Clang 11.0.
[#3795](https://github.com/OpenImageIO/oiio/pull/3795) (by johnfea) (2.4.10.0/2.5.1.0)
- Mac: Fixes for latest xcode on MacOS 13.3 Ventura [#3854](https://github.com/OpenImageIO/oiio/pull/3854) (2.5.2.0)
- Mac: Suppress Xcode warnings [#3940](https://github.com/OpenImageIO/oiio/pull/3940) (by Anton Dukhovnikov) (2.5.3.0)
#3722 (2.4.7/2.5.0.0)
- Mac: Fixes for latest xcode on MacOS 13.3 Ventura [#3854](https://github.com/OpenImageIO/oiio/pull/3854) (2.5.2.0)
- Fixes to make a clean build on Mac using Apple Clang 11.0.
- ARM: Fix signed/unsigned mismatch compiler errors in vbool4 methods.
- ARM: improve SIMD operations for ARM NEON. #3599 (2.4.5/2.5.0.0)
- ARM: Fix signed/unsigned mismatch compiler errors in vbool4 methods.
- ARM Mac: Fix build break. #3735 (2.5.0.0/2.4.7.1)
- Fixes to build properly on OpenBSD. [#3808](https://github.com/OpenImageIO/oiio/pull/3808) (by Brad Smith) (2.5.1.0/2.4.11)
- Squash warning in gcc 12.1 + C++20 [#3679](https://github.com/OpenImageIO/oiio/pull/3679)
- Work around problems with fmt library + NVPTX relating to unknown
float128 type. [#3823](https://github.com/OpenImageIO/oiio/pull/3823)
(by Edoardo Dominici)
- Silence gcc new/delete warnings for texturesys [#3944](https://github.com/OpenImageIO/oiio/pull/3944) (by Shootfast) (2.5.3.0)
Notable documentation changes:
* Added RELEASING.md documenting our versioning and release procedures #3564
#3580
* Docs: Better Windows build instructions in INSTALL.md. #3602 (2.4.5/2.5.0.0)
### 📚 Notable documentation changes:
- Docs: Better Windows build instructions in INSTALL.md. [#3602](https://github.com/OpenImageIO/oiio/pull/3602) (by Aras Pranckevičius) (2.4.5/2.5.0.0)
- ImageInput and ImageOutput docs updated to Python 3. [#3866](https://github.com/OpenImageIO/oiio/pull/3866) (by Ziggy Cross)
- Fix explanation of raw:Exposure config hint [#3889](https://github.com/OpenImageIO/oiio/pull/3889)
- Many fixes to python code examples [#3869](https://github.com/OpenImageIO/oiio/pull/3869) (by Jesse Y)
- Update ImageInput docs to not use deprecated APIs [#3907](https://github.com/OpenImageIO/oiio/pull/3907) (by Jesse Y)
### 🏢 Project Administration
- Added RELEASING.md documenting our versioning and release procedures #3564
#3580
- Update CONTRIBUTING and SECURITY [#3852](https://github.com/OpenImageIO/oiio/pull/3852) (2.5.2.0)
- Update mail list to https://lists.aswf.io/g/oiio-dev [#3880](https://github.com/OpenImageIO/oiio/pull/3880)
- Add charter and other ASWF documents to the repo [#3850](https://github.com/OpenImageIO/oiio/pull/3850)
- Document use of the DCO which is now required for all PRs [#3897](https://github.com/OpenImageIO/oiio/pull/3897)
- Put logo on the main readme [#3927](https://github.com/OpenImageIO/oiio/pull/3927)
- Remove old CLAs that are no longer in effect
- Change open source license to Apache 2.0. #3899, #3903, #3904, #3906,
#3914, #3922, #3926, #3938, #3966.
- Make sure README has links for slack and meetings [#3936](https://github.com/OpenImageIO/oiio/pull/3936)
- Update pull request and issue templates [#3946](https://github.com/OpenImageIO/oiio/pull/3946)
- Add Jesse Yurkovich to the TSC [#3937](https://github.com/OpenImageIO/oiio/pull/3937)
Release 2.4.15.0 (1 Sep 2023) -- compared to 2.4.14.0
-------------------------------------------------------
- *bmp*: Fix signed integer overflow when computing total number of pixels [#3948](https://github.com/OpenImageIO/oiio/pull/3948) (by xiaoxiaoafeifei)
- *dds*: Fix div by 0 during DXT4 DDS load [#3959](https://github.com/OpenImageIO/oiio/pull/3959) (by Jesse Yurkovich)
- *rla*: Invalid read from an empty vector during RLA load [#3960](https://github.com/OpenImageIO/oiio/pull/3960) (by Jesse Yurkovich)
- *fix*: Various protections against corrupted files [#3954](https://github.com/OpenImageIO/oiio/pull/3954)
- *fix*: Improve Utf-8 text rendering [#3935](https://github.com/OpenImageIO/oiio/pull/3935) (by Nicolas)
- *fix*: Fix typo in debug output [#3956](https://github.com/OpenImageIO/oiio/pull/3956) (by Jesse Yurkovich)
- *ustring.h*: String literal operator for ustring and ustringhash [#3939](https://github.com/OpenImageIO/oiio/pull/3939)
- *build* Suppress Xcode warnings [#3940](https://github.com/OpenImageIO/oiio/pull/3940) (by Anton Dukhovnikov)
- *build*: Silence gcc new/delete warnings for texturesys [#3944](https://github.com/OpenImageIO/oiio/pull/3944) (by Shootfast)
- *build* Added check for Boost_NO_BOOST_CMAKE, ignore if already set [#3961](https://github.com/OpenImageIO/oiio/pull/3961) (by Mikael Sundell)
- *build* Fix broken libheif < 1.13 [#3970](https://github.com/OpenImageIO/oiio/pull/3970)
- *ci*: Make more robust timer_test [#3953](https://github.com/OpenImageIO/oiio/pull/3953)
- *admin* Relicense code under Apache 2.0 [#3938](https://github.com/OpenImageIO/oiio/pull/3938) [#3966](https://github.com/OpenImageIO/oiio/pull/3966)
Release 2.4.14.0 (1 Aug 2023) -- compared to 2.4.13.0
-------------------------------------------------------
- *ico*: IOProxy support for ICO input [#3919](https://github.com/OpenImageIO/oiio/pull/3919) (by jasonbaumeister)
- *fix(psd)*: CMYK PSD files now copy alpha correctly [#3918](https://github.com/OpenImageIO/oiio/pull/3918) (by jasonbaumeister)
- *fix(python)*: Fix arithmetic overflow in oiio_bufinfo (Python interop) [#3931](https://github.com/OpenImageIO/oiio/pull/3931) (by Jesse Yurkovich)
- *build*: Fix WebP linking if CMAKE_FIND_PACKAGE_PREFER_CONFIG is ON
[#3863](https://github.com/OpenImageIO/oiio/pull/3863) (by Benjamin Buch)
- *build*: Find OpenEXR equally well with our FindOpenEXR and exr's exported
config file [#3862](https://github.com/OpenImageIO/oiio/pull/3862) (by Benjamin Buch)
- *build*: Fix broken OIIO_NO_NEON definition [#3911](https://github.com/OpenImageIO/oiio/pull/3911)
- *ci*: Lock down icx version [#3929](https://github.com/OpenImageIO/oiio/pull/3929)
- *ci*: Bump build_openexr and build_opencolorio defaults to latest versions [#3920](https://github.com/OpenImageIO/oiio/pull/3920)
- *admin*: Update mail list to https://lists.aswf.io/g/oiio-dev
[#3880](https://github.com/OpenImageIO/oiio/pull/3880)
- *admin*: Add charter and other ASWF documents to the repo
[#3850](https://github.com/OpenImageIO/oiio/pull/3850)
- *admin*: Document use of the DCO which is now required for all PRs
[#3897](https://github.com/OpenImageIO/oiio/pull/3897)
- *admin*: Put logo on the main readme
[#3927](https://github.com/OpenImageIO/oiio/pull/3927)
- *admin*: Remove old CLAs that are no longer in effect
- *admin*: Change open source license to Apache 2.0. #3899, #3903, #3904,
#3906, #3914, #3922, #3926.
Release 2.4.13.0 (1 July 2023) -- compared to 2.4.12.0
-------------------------------------------------------
- *OpenCV*: Improve OpenCV support -- errors, version, half [#3853](https://github.com/OpenImageIO/oiio/pull/3853)
- *IBA*: Improve error message for IBA::ocio functions [#3887](https://github.com/OpenImageIO/oiio/pull/3887)
- *exif*: Convert paramvalue string to integer when needed [#3886](https://github.com/OpenImageIO/oiio/pull/3886) (by Fabien Servant @ TCS)
- *exr*: Correction to dwa vs zip logic when outputting OpenEXR [#3884](https://github.com/OpenImageIO/oiio/pull/3884)
- *ico*: Heap-buffer-overflow [#3872](https://github.com/OpenImageIO/oiio/pull/3872) (by xiaoxiaoafeifei) Fixes CVE-2023-36183.
- *jpeg*: Fix density calculation for jpeg output [#3861](https://github.com/OpenImageIO/oiio/pull/3861) (by Loïc Vital)
- *jpeg2000*: Better pixel type promotion logic [#3878](https://github.com/OpenImageIO/oiio/pull/3878)
- *psd*: Prevent simultaneous psd thumbnail reads from clashing [#3877](https://github.com/OpenImageIO/oiio/pull/3877)
- *strutil.h*: Ensure proper constexpr of string hashing [#3901](https://github.com/OpenImageIO/oiio/pull/3901)
- *build* Fix use of OIIO_LOCAL_DEPS_PATH [#3865](https://github.com/OpenImageIO/oiio/pull/3865)
- *build* Fix fmt vs gcc warning that had version typo [#3874](https://github.com/OpenImageIO/oiio/pull/3874)
- *ci*: Add test with new aswf containers for VFX Platform 2023 [#3875](https://github.com/OpenImageIO/oiio/pull/3875)
- *ci*: Fix broken heif dependency and test [#3894](https://github.com/OpenImageIO/oiio/pull/3894)
- *ci*: Simplify build_llvm.bash script [#3892](https://github.com/OpenImageIO/oiio/pull/3892)
- *tests*: Fix missing simd test due to copy paste typo [#3896](https://github.com/OpenImageIO/oiio/pull/3896)
- *docs*: Update CONTRIBUTING and SECURITY [#3852](https://github.com/OpenImageIO/oiio/pull/3852)
- *docs*: ImageInput and ImageOutput docs updated to Python 3. [#3866](https://github.com/OpenImageIO/oiio/pull/3866) (by Ziggy Cross)
- *docs*: Many fixes to python code examples [#3869](https://github.com/OpenImageIO/oiio/pull/3869) (by Jesse Y)
- *docs*: Update mail list URL [#3880](https://github.com/OpenImageIO/oiio/pull/3880)
- *docs*: Fix explanation of raw:Exposure config hint [#3889](https://github.com/OpenImageIO/oiio/pull/3889)
- *docs*: Document use of the DCO which is now required for all PRs [#3897](https://github.com/OpenImageIO/oiio/pull/3897)
Release 2.4.12.0 (1 June 2023) -- compared to 2.4.11.1
------------------------------------------------------
- *oiiotool*: Don't propagate unsupported channels [#3838](https://github.com/OpenImageIO/oiio/pull/3838)
- *oiiotool*: Improvements to performance and memory when making very large textures [#3829](https://github.com/OpenImageIO/oiio/pull/3829)
- *fix*: Prevent possible deadlock when reading files with wrong extensions [#3845](https://github.com/OpenImageIO/oiio/pull/3845)
- *gif*: Prevent possible heap buffer overflow [#3841](https://github.com/OpenImageIO/oiio/pull/3841) (by xiaoxiaoafeifei)
- *psd*: Improve memory efficiency of PSD read [#3807](https://github.com/OpenImageIO/oiio/pull/3807)
- *raw*: Fix LibRaw flip to Exif orientation conversion [#3847](https://github.com/OpenImageIO/oiio/pull/3847) (by Loïc Vital)
- *raw*: Raw input fix user_flip usage [#3858](https://github.com/OpenImageIO/oiio/pull/3858) (by Loïc Vital)
- *strutil*: Use forward properly for sync::print(). [#3825](https://github.com/OpenImageIO/oiio/pull/3825)
- *build*: Fixes for latest xcode on MacOS 13.3 Ventura [#3854](https://github.com/OpenImageIO/oiio/pull/3854)
- *build*: Fix build error with MSVC [#3832](https://github.com/OpenImageIO/oiio/pull/3832) (by Ray Molenkamp)
- *ci*: Fix warnings [#3833](https://github.com/OpenImageIO/oiio/pull/3833)
- *ci*: Fix package name for icc [#3860](https://github.com/OpenImageIO/oiio/pull/3860)
Release 2.4.11.1 (14 May 2023) -- compared to 2.4.11.0
------------------------------------------------------
- *build*: Fmt 10.0 support [#3836](https://github.com/OpenImageIO/oiio/pull/3836)
Release 2.4.11.0 (1 May 2023) -- compared to 2.4.10.0
------------------------------------------------------
* oiiotool: For expression evaluation, `NIMAGES` now evaluates to the current
image stack depth. #3822
* Python: Improve error messages when passing wrong python array sizes. #3801
* Raw: handle 1-channel raw images. #3798
* HEIC: Support the ".hif" extension, which seems to be used by some Canon
cameras instead of .heif. [#3813](https://github.com/OpenImageIO/oiio/pull/3813)(by AdamMainsTL)
* PSD: Fix problems reading images with width > 64k pixels. #3806
* Windows/fmath: Work around MSVS bug(?) that generated wrong code for
fast_exp2. #3804
* Build: Fix building on OpenBSD. #3808
* Build: Refactor simd.h to disable Intel intrinsics when not on Intel
(including Cuda compiles). #3814
* Build: Fix building against new ffmpeg 6.0. #3812
* Build: Work around problems with fmt library + NVPTX relating to unknown
float128 type. [#3823](https://github.com/OpenImageIO/oiio/pull/3823) (by Edoardo Dominici)
* CI/test: Fix incorrect branch name when cloning openexr-images for the
testsuite. #3814
* Test: Use copies instead of symlinks in a couple spots to help on Windows.
#3818
Release 2.4.10.0 (1 Apr 2023) -- compared to 2.4.9.0
-----------------------------------------------------
* Exif: Fix typo that prevented us from correctly naming Exif
"CameraElevationAngle" metadata. #3783
* IC/TS: Fixes that avoid deadlock situations on the file handle cache
in certain scenarios with very high thread contention. #3784
* Docs: Some retroactive edits to INSTALL.md to correctly document changed
dependencies of the 2.4 series.
* GIF: Fix potential array overrun when writing GIF files. #3789
* Build: Fixes to make a clean build on Mac using Apple Clang 11.0. #3795
* FYI: This version of OIIO should build against Clang 16.
* maketx: Fix a broken --cdf flag, which was set up to take an argument, but
should always simply have acted as a simple boolean flag on its own. The
incorrect way it was set up not only was useless, but also could lead to
occasional crashes. #3748
* maketx and oiiotool --otex: Add support for CDFs of bumpslopes channels.
Previously, if you used both --bumpslopes and --cdf at the same time, the
CDFs were not produced for all channels. #3793
Release 2.4.9.0 (1 Mar 2023) -- compared to 2.4.8.1
-----------------------------------------------------
* Build: check need for libatomic with check_cxx_source_compiles instead of
the more expensive check_cxx_source_runs. #3774
* Fix(IC): Avoid bad IC stats when no files were read. #3765
* Build: Add a cmake option OIIO_DISABLE_BOOST_STACKTRACE to disable use and
dependency of boost stacktrace. #3777
* ustringhash: Make an explicit constructor from a hash value. #3778
* Build: Add ability to build against Qt6. #3779
Release 2.4.8.1 (13 Feb 2023) -- compared to 2.4.8.0
-----------------------------------------------------
* Fix(targa): guard against corrupted tga files Fixes TALOS-2023-1707 /
CVE-2023-24473, TALOS-2023-1708 / CVE-2023-22845. #3768
* Fix: race condition in TIFF reader, fixes TALOS-2023-1709 / CVE-2023-24472.
#3772
* Windows: Fix unresolved external symbol for MSVS 2017 #3763
* Fix: Initialize OpenEXROutput::m_levelmode() in init(). #3764
* Fix: improve thread safety for concurrent tiff loads. #3767
* Fix(fits): Make sure to close if open fails to find right magic number.
#3771
Release 2.4.8.0 (1 Feb 2023) -- compared to 2.4.7.1
----------------------------------------------------
* oiiotool --pdiff: test, be sure to count it as making output. #3723
* IBAprep should not zero out deep images when creating dst #3724
* PBM: Fix for incorrect inverting of 1-bit pbm images. #3731
* New `ImageSpec:set_colorspace()` sets color space metadata in a consistent
way. #3734
* BMP: set colorspace to sRGB #3701
* PNG: Add EXIF support when writing PNG files. #3735
* PSD: Fix wrong oiio:UnassociatedAlpha metadata for PSD files. #3750
* platform.h: set up macros for detecting MSVS 2019 and 2022 #3727
* typedesc.h: Extend TypeDescFromC template to the full set of pixel types
#3726
* Testing: many improvements for testing and code coverage. #3730 #3654 #3694
#3699 #3732 #3741 #3745 #3747
* Testing: Fix long-broken ref images for texture-icwrite test #3733
* Docs: Updated RTD docmentation style, looks much nicer. #3737
* Docs: improve description of ociodisplay and others.
* Docs: Fix old release notes to document all CVEs addressed in certain
prior releases.
Release 2.4.7.1 (3 Jan 2023) -- compared to 2.4.7.0
----------------------------------------------------
* Fix build break for Mac ARM. #3735
@@ -336,9 +829,10 @@ Release 2.4.6 (1 Dec 2022) -- compared to 2.4.5.0
* IFF files: Add IOProxy support. #3647
* IFF: Fix possible write errors, fixes TALOS-2022-1654 / CVE-2022-43596,
TALOS-2022-1655 / CVE-2022-43597 CVE-2022-43598, TALOS-2022-1656 /
CVE-2022-43599 CVE-2022-43600 CVE-2022-43601 CVE-2022-43602 #3676
CVE-2022-43599 CVE-2022-43600 CVE-2022-43601 CVE-2022-43602
[#3676](https://github.com/OpenImageIO/oiio/pull/3676)
* PSD: Fix thumbnail extraction. #3668
* PSD: when reading, don't reject padded thumbnails. #3677
* PSD: when reading, don't reject padded thumbnails. [#3677](https://github.com/OpenImageIO/oiio/pull/3677)
* Raw: Update Exif orientation if user flip is set. #3669
* Zfile write safety, fixes TALOS-2022-1657 / CVE-2022-43603. #3670
* filesystem.h: new `Filesystem::is_executable()` and `find_program()`. #3638
@@ -1056,7 +1550,7 @@ Build/test system improvements and platform ports:
components to the path. #3487 (2.4.2.1)
- On MacOS, do not force MACOS_RPATH on. #3523 (2.4.2.2)
- Improvements to the generated cmake config files when building static
libraries. #3552 #3557 (2.4.4.0)
libraries. #3552 #3557 (by Povilas Kanapickas) (2.4.4.0)
* Dependency version support:
- When using C++17, use std::gcd instead of boost. #3076 (2.4.0)
- When using C++17, use `inline constexpr` instead of certain statics.
@@ -1081,6 +1575,7 @@ Build/test system improvements and platform ports:
- Fixes for ffmpeg 5.1 detection. #3516 (2.3.19.0/2.4.2.2)
- Support for gcc 12.1. #3480 (2.4.2.1) #3551 (2.4.4.0)
- Support building with clang 15.0. #3563 (2.4.4.0)
- Try FORTIFY_SOURCE [#3575](https://github.com/OpenImageIO/oiio/pull/3575)
* Testing and Continuous integration (CI) systems:
- Properly test against all the versions of VFX Platform 2022. #3074
(2.4.0)
@@ -1120,8 +1615,8 @@ Build/test system improvements and platform ports:
- Improved simd.h support for armv7 and aarch32. #3361 (2.4.1.0/2.3.14)
- Suppress MacOS wasnings about OpenGL deprecation. #3380 (2.4.1.0/2.3.14)
- Fix MSVS/Windows errors. #3382 (2.4.1.1)
- Fix cross-compiling on Android failing due to `-latomic` check. #3560
(2.4.4.0)
- Fix cross-compiling on Android failing due to `-latomic` check.
[#3560](https://github.com/OpenImageIO/oiio/pull/3560) (by Povilas Kanapickas) (2.4.4.0)
- Fix building on iOS. #3562 (2.4.4.0)
Notable documentation changes:
+7 -7
View File
@@ -1,10 +1,10 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
# https://github.com/OpenImageIO/oiio
cmake_minimum_required (VERSION 3.12)
cmake_minimum_required (VERSION 3.15)
set (OpenImageIO_VERSION "2.5.0.2")
set (OpenImageIO_VERSION "2.5.3.0")
set (OpenImageIO_VERSION_OVERRIDE "" CACHE STRING
"Version override (use with caution)!")
mark_as_advanced (OpenImageIO_VERSION_OVERRIDE)
@@ -19,12 +19,12 @@ project (OpenImageIO VERSION ${OpenImageIO_VERSION}
set (PROJ_NAME OIIO) # short name, caps
string (TOLOWER ${PROJ_NAME} PROJ_NAME_LOWER) # short name lower case
string (TOUPPER ${PROJ_NAME} PROJ_NAME_UPPER) # short name upper case
set (PROJECT_VERSION_RELEASE_TYPE "dev" CACHE STRING
set (PROJECT_VERSION_RELEASE_TYPE "beta" CACHE STRING
"Build type, for example: dev, beta2, RC1 (empty string for normal release)")
set (${PROJECT_NAME}_VERSION_RELEASE_TYPE ${PROJECT_VERSION_RELEASE_TYPE})
set (PROJECT_AUTHORS "Contributors to the OpenImageIO project")
option (${PROJECT_NAME}_SUPPORTED_RELEASE
"Set ON for supported release branch, OFF for master" OFF)
"Set ON for supported release branch, OFF for master" ON)
if (${PROJECT_NAME}_SUPPORTED_RELEASE)
set (${PROJECT_NAME}_DEV_RELEASE OFF)
else ()
@@ -305,7 +305,7 @@ install (EXPORT OIIO_EXPORTED_TARGETS
NAMESPACE ${PROJECT_NAME}::)
if (PROJECT_IS_TOP_LEVEL AND BUILD_TESTING)
if (PROJECT_IS_TOP_LEVEL AND BUILD_TESTING AND ${PROJ_NAME}_BUILD_TESTS)
oiio_setup_test_data()
oiio_add_all_tests()
endif ()
+7
View File
@@ -0,0 +1,7 @@
# Code of Conduct
The OpenImageIO project abides by Linux Foundation's code of conduct, which
you can read in full [here](https://lfprojects.org/policies/code-of-conduct).
To report incidents or to appeal reports of incidents, send email to
the Manager of LF Projects at manager@lfprojects.org.
+145 -72
View File
@@ -1,56 +1,76 @@
Contributing to OpenImageIO
===========================
Code contributions to OpenImageIO are always welcome, and [nearly 150
people](CREDITS.md) have done so over the years. Please review this
document to get a briefing on our process.
> NOTE: This is the proposed post-ASWF-move version of CONTRIBUTING. After the
> project is legally transferred and moved to the new repo, this file will
> replace the one at the project root.
>
> TO DO:
>
> - [X] Update the mail list sign-up page after the mail list moves.
> - [ ] Update the repo URL
> - [ ] Double check the security and info email addresses.
>
Code contributions to OpenImageIO are always welcome, and [nearly 200
people](https://github.com/OpenImageIO/oiio/blob/master/CREDITS.md) have done
so over the years. Please review this document to get a briefing on our
process.
Mail Lists
----------
Mail List and Slack
-------------------
There are two mail lists associated with OpenImageIO development:
Contributors should be reading the oiio-dev mail list:
* [oiio-dev](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org)
* [oiio-dev](https://lists.aswf.io/g/oiio-dev)
For developers of the OpenImageIO code itself, or users who are really
interested in the OIIO internals. This is where we mostly discuss the code
(including bug reports), but are also happy to answer user questions about
use or working of OIIO.
* [oiio-announce](http://lists.openimageio.org/listinfo.cgi/oiio-announce-openimageio.org)
For announcements about major OIIO releases or other important news.
You can sign up for the mail list on your own using the link above.
You can sign up for these mail lists on your own using the links above.
The [ASWF Slack](https://slack.aswf.io/) has an `openimageio` channel. Sign up
for the Slack on your own, then under "channels", select "browse channels" and
you should see the openimageio channel (among those of the other projects and
working groups).
How to Ask for Help
-------------------
If you have trouble installing, building, or using OpenImageIO, but there's
not yet reason to suspect you've encountered a genuine bug, start by posting
a question to the
[oiio-dev](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org)
mailing list. This is the place for question such has "How do I...".
not yet a solid reason to suspect you've encountered a genuine bug, start by
posting a question to the [oiio-dev mailing
list](https://lists.aswf.io/g/oiio-dev).
This is the place for questions such has "How do I...".
Bug Reports and Issue Tracking
------------------------------
We use GitHub's issue tracking system for bugs and enhancements:
https://github.com/OpenImageIO/oiio/issues
We use GitHub's issue tracking system for reporting bugs and requesting
enhancements: https://github.com/OpenImageIO/oiio/issues
**If you are merely asking a question ("how do I...")**, please do not file an
issue, but instead ask the question on the [oiio-dev mailing
list](https://lists.aswf.io/g/oiio-dev).
If you are submitting a bug report, please be sure to note which version of
OIIO you are using, on what platform (OS/version, which compiler you used,
and any special build flags or other unusual environmental issues). Please
give a specific an account of
give a specific, as-detailed-as-possible account of
* what you tried
* what happened
* what you expected to happen instead
* what you tried (command line, source code example)
* what you expected to happen
* what actually happened (crash? error message? ran but didn't give the
correct result?)
with enough detail that others can reproduce the problem. Please quote the
exact error message you received. If you are having trouble building, please
post the full cmake output of a fresh VERBOSE=1 build.
with enough detail that others can easily reproduce the problem just by
following your instructions. Please quote the exact error message you
received. If you are having trouble building, please post the full cmake
output of a fresh VERBOSE=1 build.
Suspected security vulnerabilities should be reported by the same process.
@@ -61,29 +81,57 @@ may contact us privately at [security@openimageio.org](security@openimageio.org)
Contributor License Agreement (CLA) and Intellectual Property
-------------------------------------------------------------
To protect the project -- and the contributors! -- we do require a
Contributor License Agreement (CLA) for anybody submitting substantial
changes. Trivial changes (such as an alteration to the Makefiles, a one-line
bug fix, etc.) may be accepted without a CLA, at the sole discretion of the
project leader, but anything complex needs a CLA. This is for your own
safety.
To protect the project -- and the contributors! -- we do require a Contributor
License Agreement (CLA) for anybody submitting changes. This is for your own
safety, as it prevents any possible future disputes between code authors and
their employers or anyone else who might think they might own the IP output of
the author.
* If you are an individual writing the code on your own time and you're SURE
you are the sole owner of any intellectual property you contribute, use the
[Individual CLA](https://github.com/OpenImageIO/oiio/blob/master/src/doc/CLA-INDIVIDUAL).
* [Corporate CLA](https://github.com/OpenImageIO/oiio/blob/master/ASWF/CLA-corporate.md) :
If you are writing the code as part of your job, or if there is any
possibility that your employers might think they own any intellectual
property you create. This needs to be executed by someone who has
signatory power for the company.
* If you are writing the code as part of your job, or if there is any
possibility that your employers might think they own any intellectual
property you create, then you should use the [Corporate
CLA](https://github.com/OpenImageIO/oiio/blob/master/src/doc/CLA-CORPORATE).
* [Individual CLA](https://github.com/OpenImageIO/oiio/blob/master/ASWF/CLA-individual.md) :
If you are an individual writing the code on your own time, using your own
equipment, and you're SURE you are the sole owner of any intellectual
property you contribute.
Download the appropriate CLA from the links above (or find them in the
src/doc directory of the software distribution), print, sign, and rescan it
(or just add a digital signature directly), and email it back to us
(info@openimageio.org).
The easiest way to sign CLAs is digitally [using EasyCLA](https://corporate.v1.easycla.lfx.linuxfoundation.org).
Companies who prefer not to use the online tools may sign, scan, and email
the executed copy to manager@lfprojects.org.
Our CLA's are identical to those used by Apache and many other open source
projects.
The CLA allows a company to name a "CLA Manager" (who does not need
signatory power) who has the ability to use the online system to add or
delete individual employees of the company who are authorized to submit pull
requests, without needing to get an executive to amend and sign the
agreement each time.
Please note that these CLAs are based on the Apache 2.0 CLAs, and differ
minimally, only as much as was required to correctly describe the EasyCLA
process and our use of a CLA manager.
**Contribution sign off**
This project requires the use of the [Developer’s Certificate of Origin 1.1
(DCO)](https://developercertificate.org/), which is the same mechanism that
the [Linux®
Kernel](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n416)
and many other communities use to manage code contributions. The DCO is
considered one of the simplest tools for sign offs from contributors as the
representations are meant to be easy to read and indicating signoff is done
as a part of the commit message.
Here is an example Signed-off-by line, which indicates that the submitter
accepts the DCO:
Signed-off-by: John Doe <john.doe@example.com>
You can include this automatically when you commit a change to your local
git repository using `git commit -s`. You might also want to
leverage this [command line tool](https://github.com/coderanger/dco) for
automatically adding the signoff message on commits.
Pull Requests and Code Review
@@ -98,40 +146,61 @@ repository. The protocol is like this:
1. Get a GitHub account, fork OpenImageIO/oiio to create your own repository
on GitHub, and then clone it to get a repository on your local machine.
2. Edit, compile, and test your changes. Run clang-format (see the
1. Edit, compile, and test your changes. Run clang-format (see the
instructions on coding style below).
3. Push your changes to your fork (each unrelated pull request to a separate
1. Push your changes to your fork (each unrelated pull request to a separate
"topic branch", please).
4. Make a "pull request" on GitHub for your patch.
1. Make a "pull request" on GitHub for your patch.
5. If your patch will induce a major compatibility break, or has a design
2. If your patch will induce a major compatibility break, or has a design
component that deserves extended discussion or debate among the wider OIIO
community, then it may be prudent to email oiio-dev pointing everybody to
the pull request URL and discussing any issues you think are important.
6. All pull requests automatically launch CI jobs on GitHub Actions to
1. All pull requests automatically launch CI jobs on GitHub Actions to
ensure that the build completes and that the tests suite runs correctly, for
a variety of platform, compiler, library, and flag combinations. The status
of the CI tests for your PR will be displayed on the GitHub PR page. We will
not accept PRs that don't build cleanly or pass the existing testsuite.
7. The reviewer will look over the code and critique on the "comments" area.
1. The reviewer will look over the code and critique on the "comments" area.
Reviewers may ask for changes, explain problems they found, congratulate the
author on a clever solution, etc. But until somebody says "LGTM" (looks good
to me), the code should not be committed. Sometimes this takes a few rounds
of give and take. Please don't take it hard if your first try is not
accepted. It happens to all of us.
8. After approval, one of the senior developers (with commit approval to the
1. After approval, one of the senior developers (with commit approval to the
official main repository) will merge your fixes into the master branch.
Coding Style
------------
#### Formatting
### File conventions
C++ implementation should be named `*.cpp`. Headers should be named `.h`.
All headers should contain
#pragma once
All source files should begin with these three lines:
// Copyright Contributors to the OpenImageIO project.
// SPDX-License-Identifier: Apache-2.0
// https://github.com/OpenImageIO/oiio
as a comment in the syntax of whatever source code is used in that file.
Occasionally a file may contain substantial code from another project and will
also list its original copyright and license information. Do NOT alter that
notice or copy it to any new files, it really only applies to the particular
file in which it appears.
### Formatting
We use [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
to uniformly format our source code prior to PR submission. Make sure that
@@ -151,31 +220,35 @@ it on your end and update the PR with the formatting fixes.
If you don't have clang-format set up on your machine, and your patch is not
very long, you may find that it's more convenient to just submit it and hope
for the best, and if it doesn't pass the CI test, look at the diffs in
the log and make the corrections by hand and then submit an update to the
patch (i.e. relying on CI to run clang-format for you).
for the best, and if it doesn't pass the CI test, look at the diffs in the log
for the "clang-format" CI run and make the corrections by hand and then submit
an update to the patch (i.e. relying on CI to run clang-format for you).
Because the basic formatting is automated by clang-format, we won't
enumerate the rules here.
For the occasional non-clang-format regions of code, NEVER alter somebody
else's code to reformat just because you found something that violates the
rules. Let the group/author/leader know, and resist the temptation to change
it yourself.
#### File conventions
Each line of text in your code, including comments, should be at most 80
characters long. Exceptions are allowed for those rare cases where letting a
line be longer (and wrapping on an 80-character window) is actually a better
and clearer alternative than trying to split it into two lines. Sometimes this
happens, but it's extremely rare.
C++ implementation should be named `*.cpp`. Headers should be named `.h`.
All headers should contain
#pragma once
All source files should begin with the copyright and license, which can be
found in the LICENSE.md file (or cut and pasted from any other other source
file).
For NEW source files, please change the copyright year to the present. DO
NOT edit existing files only to update the copyright year, it just creates
pointless deltas and offers no increased protection.
We prefer three (3) consecutive empty lines between freestanding functions or
class definitions, one blank line between method declarations within a class
definition. Put a single blank line within a function if it helps to visually
separate different sequential tasks, but don't put multiple blank lines in a
row within a function, or blank lines right after an opening brace or right
before a closing brace. The goal is to use just enough white space to help
developers visually parse the code (for example, spotting at a glance where
new functions begin), but not so much as to spread it out or be confusing.
#### Identifiers
### Identifiers
In general, classes and templates should start with upper case and
capitalize new words: `class CustomerList;` In general, local variables
@@ -195,7 +268,7 @@ Names of data should generally be nouns. Functions/methods are trickier: a
the name of a function that returns a value but has no side effects should
be a noun, but a procedure that performs an action should be a verb.
#### Class structure
### Class structure
Try to avoid public data members, although there are some classes that serve
a role similar to a simple C struct -- a very straightforward collection of
@@ -215,21 +288,21 @@ Avoid multiple inheritance.
Namespaces: yes, use them!
#### Third-party libraries
### Third-party libraries
Prefer C++11 `std` rather than Boost, where both can do the same task.
Feel free to use Boost classes you already see in the code base, but don't
use any Boost you don't see us already using, without first checking with
the project leader.
Please do use IlmBase vector, matrix, and utility classes where applicable.
Please do use Imath vector, matrix, and utility classes where applicable.
Don't write your own vector or matrix code!
Use these libraries for OIIO internals, but please DO NOT require them in
any of our main external APIs unless it's been thoroughly discussed and
approved by the group.
#### Comments and Doxygen
### Comments and Doxygen
Comment philosophy: try to be clear, try to help teach the reader what's
going on in your code.
@@ -245,7 +318,7 @@ They looks like this:
float foo; ///< Doxygen comments on same line look like this
}
#### Miscellaneous
### Miscellaneous
Macros should be used only rarely -- prefer inline functions, templates,
enums, or "const" values wherever possible.
+10
View File
@@ -19,6 +19,7 @@ lg@openimageio.org
* Aman Shah
* Ananth Garre
* Anders Langlands
* Angus Davis
* Anthony Nemoff
* Aras Pranckevičius
* Arkady Shapkin
@@ -67,6 +68,7 @@ lg@openimageio.org
* Fredrik Averpil
* Frédéric Devernay
* Gaurav Bansal
* Gerdya
* Ghislain Antony Vaillant
* Gonzalo Garramuño
* Gregor Mueckl
@@ -81,6 +83,7 @@ lg@openimageio.org
* Irena Damsky
* Ismael Cortes
* Jan Hettenkofer
* Jan Honsbrok
* Jens Lindgren
* Jep Hill
* Jeph Alapat
@@ -89,9 +92,11 @@ lg@openimageio.org
* Jim Hourihan
* Johannes Unterguggenberger
* John Burnett
* John Fea
* John Haddon
* Jonathan Hearn
* Jonathan Scruggs
* Joris Nijs
* Joseph Goldstone
* Julien Enche
* Justin Israel
@@ -119,6 +124,7 @@ lg@openimageio.org
* Mariusz Szczepanczyk
* Mark Boorer
* Mark Visser
* Massimo Paladin
* Matteo F. Vescovi
* Matthew E. Levine
* Max Liani
@@ -136,6 +142,7 @@ lg@openimageio.org
* Nick Black
* Nicolas Burtnyk
* Nixon Kwok
* Noah Rahm (designer of our logo!)
* Northon Patrick
* Nuno Cardoso
* Ole Gulbrandsen
@@ -160,6 +167,7 @@ lg@openimageio.org
* Roeland Schoukens
* Roman Zulak
* Rui Li
* Russell Greene
* Ryen
* Saket Jalan
* Sam Richards
@@ -181,10 +189,12 @@ lg@openimageio.org
* Till Dechent
* Tim D. Smith
* Tim Grant
* Tom Knowles
* Troy James Sobotka
* Vinod Khare
* Vishal Agrawal
* Vitor Franchi
* Wayne Arnold
* Will Rosecrans
* William Krick
* Wormszer
+215
View File
@@ -0,0 +1,215 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the OpenImageIO Project. -->
# OpenImageIO Project Governance
OpenImageIO is a project of the Academy Software Foundation and relies on the
ASWF governance policies, supported by the Linux Foundation.
There are three primary project roles: Contributors submit code to the
project; Committers approve code to be included into the project; and the
Technical Steering Committee (TSC) provides overall high-level project
guidance.
* [Contributors](#Contributors)
* [Committers](#Committers)
* [Technical Steering Committee](#Technical-Steering-Committee)
## Contributors
The OpenImageIO project grows and thrives from assistance from Contributors.
Contributors include anyone in the community who contributes code,
documentation, or other technical artifacts that have been incorporated into
the project repository.
Anyone can be a Contributor. You need no formal approval from the project,
beyond the legal forms.
### How to Become a Contributor
* Review the coding standards and [contributing
guidelines](../CONTRIBUTING.md) to ensure your contribution is in line with
the project's coding and styling guidelines.
* Sign the Individual CLA, or if you are employed by an organization that
might have any claim to IP you create, have your organization sign the
Corporate CLA.
* Submit your code as a PR with the appropriate DCO sign-off on each commit.
The easiest way to do this is to ensure that you commit your code with `git
commit -s`.
## Committers
Project Committers have merge access on the OpenImageIO GitHub repository
and are responsible for approving submissions by Contributors.
### Committer Responsibilities
Typical activities of a Committer include:
* Helping users and novice contributors.
* Ensuring a response to questions posted to the
[Oiio-dev developer mail list](https://lists.aswf.io/g/oiio-dev)
* Contributing code and documentation changes that improve the project.
* Reviewing and commenting on issues and pull requests.
* Ensuring that changes and new code meet acceptable standards and are in
the long-term interest of the project.
* Participation in working groups.
* Merging pull requests.
### How to Become a Committer
Any member of the OpenImageIO community (though typically an existing
Committer or TSC member) may nominate an individual making significant and
valuable contributions to the OpenImageIO project to become a new Committer.
To nominate a new Committer, open an issue in the OpenImageIO repository, send
mail to the TSC mail list, or raise the issue at a TSC meeting.
The TSC may periodically review the Committer list to identify inactive
Committers. Past Committers are typically given Emeritus status. Emeriti may
request that the TSC restore them to active Committer status.
## Technical Steering Committee
The Technical Steering Committee (TSC) has final authority over this project.
As defined in the project charter, in addition to committer activities, TSC
responsibilities also include, but are not limited to:
* Coordinating technical direction of the Project.
* Project governance and contribution policy.
* GitHub repository administration.
* Maintaining the list of additional Committers
* Appointing representatives to work with other open source or open
standards communities.
* Discussions, seeking consensus, and where necessary, voting on technical
matters relating to the code base that affect multiple projects.
* Coordinating any marketing, events, or communications regarding the
project.
Within the TSC are two elected leadership roles to be held by its members
and voted on annually. Any TSC member can express interest in serving in a
role, or nominate another member to serve. There are no term limits, and one
person may hold multiple roles simultaneously. Should a TSC member resign
from a leadership role before their term is complete, a successor shall be
elected through the standard nomination and voting process to complete the
remainder of the term. The leadership roles are:
* **Chair**: This position acts as the project manager, organizing meetings
and providing oversight to project administration.
* **Chief Architect**: This position makes all the final calls on design and
technical decisions, and is responsible for avoiding "design by committee"
pitfalls.
The chair role is assumed to rotate annually (though there are no term
limits, so the TSC may reelect an existing chair). The chief architect
position should be a source of stability and coherent design vision, so the
TSC is encouraged to choose an architect who can serve for many years and
only change architects when it is necessary for the health of the project
and its community.
At the time of election, the TSC will also agree upon which of these two
leaders will serve as the OpenImageIO ASWF (Academy Software Foundation) TAC
(Technical Advisory Council) representative for the term. This member
represents the project at all ASWF TAC meetings.
### TSC Members
Current voting members of the TSC are:
* **Chair and TAC representative**: Daniel Greenstein - Sony Pictures Imageworks (possibly interim?)
* **Chief Architect**: Larry Gritz - Sony Pictures Imageworks
* Anton Dukhovnikov - Wētā Digital / Unity
* Jesse Yurkovich - Blender
* Joseph Goldstone - ARRI
* Lewis Wakeland - Disney TV Animation
* Luke Emrose - Animal Logic (interim?)
* Martin Davies - LAIKA
* Robin Rowe - Heroic Robots
* Thiago Ize - Autodesk
### TSC Nomination and Succession
Any proposal for additional members of the TSC may be submitted by Committers,
TSC members, or other major stakeholders of the OpenImageIO community by
opening an issue outlining their case or raising the issue at a TSC meeting.
New TSC members are accepted or rejected by majority vote of the TSC.
If a TSC member is for an extended period not regularly participating or
performing the responsibilities expected of TSC members, the TSC may by
majority vote request an alternate TSC member be submitted by that
organization, or remove the inactive member from the TSC.
A voting member of the TSC may nominate a successor in the event that such
voting member decides to leave the TSC, and the TSC, including the departing
member, shall confirm or reject such nomination by a vote. In the event that
the departing member's nomination for successor is rejected by vote of the
TSC, the departing member shall be entitled to continue nominating successors
until one such successor is confirmed by vote of the TSC. If the departing
member fails or is unable to nominate a successor, the TSC may nominate one on
the departing member's behalf.
TSC membership is presumed to be retained by the individual even if they
change employers, provided they remain active in the project. The TSC may take
action to ensure that organizational stakeholder representation not become
severely disproportionate, for example by urging an organization that loses
its sole TSC representative to nominate a new member, or by limiting the total
number of voting members from any one organization if too many members all
move to the same organization.
### TSC Meetings
Any meetings of the TSC are intended to be open to the public, except where
there is a reasonable need for privacy. The TSC meets regularly in a voice
conference call, at a cadence deemed appropriate by the TSC. The TSC Chair
moderates the meeting, or appoints another TSC member to moderate in his or
her absence. Meetings may also be streamed online where appropriate;
connection details will be posted to the oiio-dev mail list in advance of the
scheduled meeting.
The biweekly TSC meetings can be found on the [ASWF Calendar](https://www.aswf.io/meeting-calendar),
just click on the OpenImageIO meeting entries to get the Zoom link.
Items are added to the TSC agenda which are considered contentious or are
modifications of governance, contribution policy, TSC membership, or release
process, in addition to topics involving the high-level technical direction
of the project.
The intention of the agenda is not to approve or review all patches. That
should happen continuously on GitHub and be handled by the larger group of
Committers.
Any community member or Contributor can ask that something be reviewed by
the TSC at the meeting by logging a GitHub issue. Any Committer, TSC member,
or the meeting chair can bring the issue to the TSC's attention by applying
the `TSC` label.
Prior to each TSC meeting, the meeting chair will share the agenda with
members of the TSC. TSC members can also add items to the agenda at the
beginning of each meeting. The meeting chair and the TSC cannot veto or
remove items.
The TSC may invite additional persons to participate in a non-voting
capacity.
The meeting chair is responsible for ensuring that minutes are taken and
archived in the project repository or other designated accessible location.
Due to the challenges of scheduling a global meeting with participants in
several time zones, the TSC will seek to resolve as many agenda items as
possible outside of meetings on the public mailing list or through GitHub
issues, discussions, and pull requests.
+48 -47
View File
@@ -14,67 +14,70 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
### Required dependencies -- OIIO will not build at all without these
* **C++14** (also builds with C++17, and C++20)
* C++14 or higher (also builds with C++17, and C++20)
* The default build mode is C++14. This can be controlled by via the
CMake configuration flag: `-DCMAKE_CXX_STANDARD=17`, etc.
* Compilers: **gcc 6.1 - 12.1**, **clang 3.4 - 15**, **MSVS 2017 - 2019**,
**Intel icc 17+**, **Intel OneAPI C++ compiler 2022+**.
* CMake >= 3.12 (tested through 3.24)
* OpenEXR/Imath >= 2.3 (recommended: 2.4 or higher; tested through 3.1)
* ADVISORY: We expect that OIIO 2.6 in 2024 will require C++17 or higher.
* Compilers: gcc 6.1 - 12.1, clang 3.4 - 16, MSVS 2017 - 2019,
Intel icc 17+, Intel OneAPI C++ compiler 2022+.
* **CMake >= 3.15** (tested through 3.27)
* **OpenEXR/Imath >= 2.4** (recommended: 3.1 or higher; tested through 3.2
and main) (ADVISORY: We expect that OIIO 2.6 in 2024 will require OpenEXR >= 3.1)
* libTIFF >= 3.9 (recommended: 4.0+; tested through 4.5)
* libjpeg >= 8, or libjpeg-turbo >= 1.1 (tested through jpeg9d and jpeg-turbo
2.1)
* Boost >= 1.53 (recommended: at least 1.66; tested through 1.80)
* [fmtlib](https://github.com/fmtlib/fmt) >= 6.1.2 (tested through 9.1). If
not found at build time, this will be automatically downloaded unless the
build sets `-DBUILD_MISSING_FMT=OFF`.
* Boost >= 1.53 (recommended: at least 1.66; tested through 1.81)
* **[fmtlib](https://github.com/fmtlib/fmt) >= 7.0** (tested through 10.1).
If not found at build time, this will be automatically downloaded unless
the build sets `-DBUILD_MISSING_FMT=OFF`.
### Optional dependencies -- features may be disabled if not found
* If you are building the `iv` viewer (which will be disabled if any of
these are not found):
* Qt >= 5.6 (tested through 5.15)
* Qt5 >= 5.6 (tested through 5.15) or Qt6 (tested through 6.4)
* OpenGL
* If you are building the Python bindings or running the testsuite:
* Python >= 2.7 (tested against 2.7, 3.7, 3.8, 3.9, 3.10)
* pybind11 >= 2.4.2 (Tested through 2.10. Note that pybind11 v2.10+ does
* Python >= 2.7 (tested against 2.7, 3.7, 3.8, 3.9, 3.10, 3.11)
* pybind11 >= 2.4.2 (Tested through 2.11. Note that pybind11 v2.10+ does
not support Python < 3.6.)
* NumPy
* If you want support for camera "RAW" formats:
* LibRaw >= 0.15 (tested 0.15 - 0.20.2; LibRaw >= 0.18 is necessary for
ACES support and much better recognition of camera metadata; if
* LibRaw >= 0.18 (tested though 0.21.1; if
building with C++17 or higher, LibRaw >= 0.20 is necessary)
* If you want support for a wide variety of video formats:
* **ffmpeg >= 3.0** (tested through 5.1)
* ffmpeg >= 3.0 (tested through 6.0)
* If you want support for jpeg 2000 images:
* **OpenJpeg >= 2.0** (tested through 2.5; we recommend 2.4 or higher
* OpenJpeg >= 2.0 (tested through 2.5; we recommend 2.4 or higher
for multithreading support)
* If you want support for OpenVDB files:
* OpenVDB >= 5.0 (tested through 9)
* OpenVDB >= 5.0 (tested through 10.0)
* If you want to use TBB as the thread pool:
* TBB >= 2018 (tested through 2021)
* TBB >= 2018 (tested through 2021 and OneTBB)
* If you want support for converting to and from OpenCV data structures,
or for capturing images from a camera:
* **OpenCV 3.x, or 4.x** (tested through 4.5)
* OpenCV 3.x, or 4.x (tested through 4.5)
* If you want support for GIF images:
* giflib >= 4.1 (tested through 5.2; 5.0+ is strongly recommended for
stability and thread safety)
* If you want support for HEIF/HEIC or AVIF images:
* libheif >= 1.3 (1.7 required for AVIF support, tested through 1.12)
* libheif >= 1.3 (1.7 required for AVIF support, tested through 1.16)
* libheif must be built with an AV1 encoder/decoder for AVIF support.
* Avoid libheif 1.10 on Mac, it is very broken. Libheif 1.11 is fine.
* Avoid libheif 1.10 on Mac, it is very broken. Libheif 1.11+ is fine.
* If you want support for DICOM medical image files:
* DCMTK >= 3.6.1 (tested through 3.6.6)
* DCMTK >= 3.6.1 (tested through 3.6.7)
* If you want support for WebP images:
* WebP >= 0.6.1 (tested through 1.2.1)
* WebP >= 0.6.1 (tested through 1.3.1)
* If you want support for OpenColorIO color transformations:
* OpenColorIO >= 1.1 (tested through 2.2; 2.0+ is recommended)
* OpenColorIO >= 1.1 (tested through 2.3; 2.0+ is recommended)
* If you want support for Ptex:
* Ptex >= 2.3.1 (probably works for older; tested through 2.4.2)
* If you want to be able to do font rendering into images:
* Freetype (minimum unknown, tested 2.8 through 2.13)
* We use PugiXML for XML parsing. There is a version embedded in the OIIO
tree, but if you want to use an external, system-installed version (as
may be required by some software distributions with policies against
embedding other projects), then just build with `-DUSE_EXTERNAL_PUGIXML=1`.
Any PugiXML >= 1.8 should be fine (we have tested through 1.12).
Any PugiXML >= 1.8 should be fine (we have tested through 1.13).
@@ -121,6 +124,9 @@ build options), maybe one of these packages managers will do it for you:
If these work for you and it's all you need, bingo! You are done.
You may find this guide to versions carried by distributions helpful:
[![OpenImageIO packaging status](https://repology.org/badge/vertical-allrepos/openimageio.svg?exclude_unsupported=1&columns=3&exclude_sources=modules,site&header=OpenImageIO%20packaging%20status)](https://repology.org/project/openimageio/versions)
Building from source
@@ -246,9 +252,8 @@ The command 'make help' will list all possible options.
You can also ignore the top level Makefile wrapper, and instead use
CMake directly:
mkdir build
cd build
cmake ..
cmake -B build -S .
cmake --build build --target install
If the compile stops because of warnings, try again with
@@ -257,8 +262,9 @@ If the compile stops because of warnings, try again with
or, if you are using CMake directly,
cd build
cmake -DSTOP_ON_WARNING=0 ..
rm -rf build
cmake -B build -S . -DSTOP_ON_WARNING=0
cmake --build build --target install
@@ -283,19 +289,16 @@ the section below, and will only have to point OIIO build process so their locat
```
cd {ZLIB_ROOT}
git clone https://github.com/madler/zlib .
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=. ..
cmake --build . --config Release --target install
del lib\zlib.lib
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=.
cmake --build build --config Release --target install
del build\lib\zlib.lib
```
* libTIFF:
```
cd {TIFF_ROOT}
git clone https://gitlab.com/libtiff/libtiff.git .
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=. ..
cmake --build . --target install
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=.
cmake --build build --target install
```
* libjpeg-turbo:
```
@@ -303,19 +306,19 @@ the section below, and will only have to point OIIO build process so their locat
git clone https://github.com/libjpeg-turbo/libjpeg-turbo .
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=. ..
cmake --build . --config Release --target install
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=.
cmake --build build --config Release --target install
```
* OpenEXR: you'll have to point it to your `{ZLIB_ROOT}` location from the above. If copy-pasting the multi-line command (with lines ending in `^`) into
cmd.exe prompt, make sure to copy all the lines at once.
```
cd {EXR_ROOT}
git clone https://github.com/AcademySoftwareFoundation/openexr .
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=dist ^
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=dist ^
-DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DOPENEXR_BUILD_TOOLS=OFF ^
-DOPENEXR_INSTALL_TOOLS=OFF -DOPENEXR_INSTALL_EXAMPLES=OFF ^
-DZLIB_ROOT={ZLIB_ROOT}\build ..
cmake --build . --target install --config Release
-DZLIB_ROOT={ZLIB_ROOT}\build
cmake --build build --target install --config Release
```
Now get the OIIO source and do one-time CMake configuration step. Replace `{*_ROOT}` below with folders where you have put the 3rd party
@@ -323,16 +326,14 @@ dependencies.
```
cd {OIIO_ROOT}
git clone https://github.com/OpenImageIO/oiio .
mkdir build
cd build
cmake -DVERBOSE=ON -DCMAKE_BUILD_TYPE=Release ^
cmake -S . -B build -DVERBOSE=ON -DCMAKE_BUILD_TYPE=Release ^
-DBoost_USE_STATIC_LIBS=ON -DBoost_NO_WARN_NEW_VERSIONS=ON -DBoost_ROOT={BOOST_ROOT} ^
-DZLIB_ROOT={ZLIB_ROOT}\build ^
-DTIFF_ROOT={TIFF_ROOT}\build ^
-DOpenEXR_ROOT={EXR_ROOT}\build\dist ^
-DImath_DIR={EXR_ROOT}\build\dist\lib\cmake\Imath ^
-DJPEG_ROOT={JPEG_ROOT}\build ^
-DUSE_PYTHON=0 -DUSE_QT=0 -DBUILD_SHARED_LIBS=0 -DLINKSTATIC=1 ..
-DUSE_PYTHON=0 -DUSE_QT=0 -DBUILD_SHARED_LIBS=0 -DLINKSTATIC=1
```
This will produce `{OIIO_ROOT}/build/OpenImageIO.sln` that can be opened in Visual Studio IDE. Note that the solution will be
+27
View File
@@ -0,0 +1,27 @@
Copyright (c) 2008-present by Contributors to the OpenImageIO project.
All Rights Reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. 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.
3. Neither the name of the copyright holder 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 HOLDER 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.
+196 -22
View File
@@ -1,27 +1,201 @@
Copyright (c) 2008-present by Contributors to the OpenImageIO project.
All Rights Reserved.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
1. Definitions.
2. 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.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
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 HOLDER 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.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+2 -2
View File
@@ -8,8 +8,8 @@
#
# Run 'make help' to list helpful targets.
#
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
# https://github.com/OpenImageIO/oiio
#########################################################################
+20 -10
View File
@@ -1,9 +1,11 @@
README for OpenImageIO
======================
<p align="center">
<img src="ASWF/logos/openimageio-horizontal-gradient.png">
</p>
[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md)
[![License](https://img.shields.io/badge/license-Apache2.0-blue.svg?style=flat-square)](https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md)
[![CI](https://github.com/OpenImageIO/oiio/actions/workflows/ci.yml/badge.svg)](https://github.com/OpenImageIO/oiio/actions/workflows/ci.yml)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2694/badge)](https://bestpractices.coreinfrastructure.org/projects/2694)
[![latest packaged version(s)](https://repology.org/badge/latest-versions/openimageio.svg)](https://repology.org/project/openimageio/versions)
Introduction
@@ -67,10 +69,13 @@ Licensing
OpenImageIO is (c) Copyright Contributors to the OpenImageIO project.
OpenImageIO is distributed using the [modified BSD license](LICENSE.md)
(also known as the "new BSD" or "3-clause BSD" license). The documentation
is licensed under the [Creative Commons Attribution 3.0 Unported
License](http://creativecommons.org/licenses/by/3.0/).
OpenImageIO is distributed using primarily the Apache 2.0 license -- see the
[LICENSE.md](LICENSE.md) file for details. The documentation is licensed
under the [Creative Commons Attribution 4.0 Unported
License](http://creativecommons.org/licenses/by/4.0/). A small amount of code
imported from other projects, and also some pre-July-2023 code that has not
yet been relicensed under Apache-2.0, is covered by other compatible licenses
-- see [THIRD-PARTY](THIRD-PARTY.md) file for details.
The plain English bottom line is that OpenImageIO is free, as well as
freely modifiable and redistributable (in both source and binary form).
@@ -110,7 +115,7 @@ Contact & reporting problems
Simple "how do I...", "I'm having trouble", or "is this a bug" questions are
best asked on the [oiio-dev developer mail
list](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org).
list](https://lists.aswf.io/g/oiio-dev).
That's where the most people will see it and potentially be able to answer
your question quickly (more so than a GH "issue").
@@ -127,7 +132,7 @@ security-related issues [security@openimageio.org](security@openimageio.org).
Contributing
------------
OpenImageIO welcomes code contributions, and [nearly 150 people](CREDITS.md)
OpenImageIO welcomes code contributions, and [nearly 200 people](CREDITS.md)
have done so over the years. We take code contributions via the usual GitHub
pull request (PR) mechanism. Please see [CONTRIBUTING](CONTRIBUTING.md) for
detailed instructions.
@@ -141,5 +146,10 @@ Web Resources
* GitHub page: http://github.com/OpenImageIO/oiio
* Developer mail list subscriptions and archives:
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
https://lists.aswf.io/g/oiio-dev
* ASWF Slack: https://slack.aswf.io
(look for the `#openimageio` channel)
* Biweekly TSC meetings are on the ASWF Calendar: https://www.aswf.io/meeting-calendar/
(click on the OpenImageIO meeting entries, every second Monday, to get the Zoom link, anyone may join)
+1 -1
View File
@@ -259,7 +259,7 @@ The following are the steps for making the release:
release (from CHANGES.md). If this is a beta or release candidate, check
"this is a pre-release" box at the bottom.
8. Announce the release on the [oiio-dev mail list](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org)
8. Announce the release on the [oiio-dev mail list](https://lists.aswf.io/g/oiio-dev)
with the subject "Release: OpenImageIO v1.2.3.4" and using one of these
templates for the body of the email.
+151
View File
@@ -0,0 +1,151 @@
New code entering the OpenImageIO repository from July 1 2023 onward is
subject to the [Apache 2.0 license](LICENSE.md).
Code dating from earlier than July 1 2023 was contributed under the [BSD
3-clause license](LICENSE-BSD-3-Clause.md), unless relicensed below.
The following copyright holders agree that all of their contributions
originally submitted to this project under the 3-Clause BSD License are hereby
relicensed to the Apache License, Version 2.0, and are submitted pursuant to
the Developer Certificate of Origin, version 1.1:
- Larry Gritz (@lgritz)
- Chris Kulla (fpsunflower)
- Brecht Van Lommel (brechtvl)
- Daniel Flehner Heen (apetrynet)
- Daniel Wyatt (dewyatt)
- Aras Pranckevičius (aras-p)
- Leszek Godlewski (inequation)
- Dalai Felinto (dfelinto)
- Jesse Yurkovich (jessey-git)
- Sergey Sharybin (sergeyvfx)
- Ray Molenkamp (LazyDodo)
- Nathan Rusch (nrusch)
- Ismael Cortes (leamsi)
- AdamMainsTL
- Sony Pictures Imageworks (cmstein, olegul, fpsunflower, brianhall77, jeremyselan, drg, richardssam, lecocqp)
- Richard Shaw (hobbes1069)
- Robert Matusewicz
- Mariusz Szczepańczyk (mszczepanczyk)
- Scott Wilson
- Kevin Brightwell (Nava2)
- Simon Boorer
- Alex Hughes (Ahuge)
- Alister Chowdhury
- Manuel Leonhardt (skycaptain)
- Alexandre Gauthier (MrKepzie)
- Mark Boorer (shootfast)
- Povilas Kanapickas (p12tic)
- Mikael Sundell
- Roman Zulak (marsupial)
- Autodesk (includes Thiago Ize, Elvic Liang, Wayne Arnold, William Krick, Brecht Van Lommel, Marcos Fajardo)
- Thiago Ize
- Nick Black (dankamongmen)
- Michel Lerenard (micler)
- Stefan Bruens (StefanBruens)
- David Gordon
- Claire Foster (c42f)
- Konrad Kleine (kwk)
- Simone Gasparini (simogasp)
- Radu Arjocu (ra-mt)
- Dominik Bartkiewicz (fafik23)
- 360highdynamicrangehdr (?)
- Leonid Onokhov (sopvop)
- Nuno Cardoso (npcardoso)
- Todica Ionut (360highdynamicrangehdr)
- Till Dechent (ttddee)
- Tom Knowles (knowlsie)
- SRHMorris
- Biswapriyo Nath (Biswa96)
- Edoardo Dominici (dedoardo)
- Frédéric Devernay (devernay)
- Simone Gasparini (simogasp)
- roelandschoukens
- Nayden Dochev (nayyden)
- Yann Lanthony (yann-lty)
- Benjamin Buch (bebuch)
- Joris Nijs (joris-nijs)
- Jan Honsbrok (Latios96)
- Matteo F. Vescovi (mfvescovi)
- Patrick Northon (patlefort)
- Eric Mehl (ericmehl)
- Xo Wang (GHF)
- etiam
- Fabien Servant (servantftechnicolor)
- Loïc Vital (mugulmd)
- Thomas Mansencal (Wētā FX)
- Brent Davis (btdavis)
- pwm1234-sri
- toxieainc
- demoulinv
- Julien Enche (jenche)
- Justin Israel
- xiaoxiaoafeifei
- Brad Smith (brad0)
- lmarz
- Seifeddine Dridi (seifeddinedridi)
- Daniel Dresser (danieldresser)
- Luc Bournaud (DevilishSpirits)
- Dennis Schridde (devurandom)
- Dieter De Baets (debaetsd)
- Gonzalo Garramuño (ggarra13)
- Alan Jones (@skyphyr)
- pumkinpal
- Christopher Crosetto (ccrosetto)
- Russell Greene (russelltg)
- Sam Richards (richardssam)
- Guillaume Chatelet (gchatelet)
- extrowerk
- Heiko Becker (heirecka)
- Mark Visser (mjmvisser)
- Harry Mallon (hjmallon)
- Henri Fousse (darkhorse64)
- Krzysztof Blicharski (blicharski)
- Hugh Macdonald (HughMacdonald)
- Pascal Lecocq (lecocqp)
- Ramon Montoya Vozmediano (rmv)
- Dan Wexler (danwexler)
- Jérôme Duval (korli)
- Tim Grant (timgrant)
- Shane Ambler (sambler)
- Wētā
- Kimball Thurston (kdt3rd)
- Anders Langlands (anderslanglands)
- Алексей (Alexpux)
- Fabien Castan (fabiencastan)
- Grégoire De Lillo (gregoire-dl)
- Edgar Velázquez-Armendáriz (edgarv)
- Malcolm Humphreys (malcolmhumphreys)
- johnfea
- Max Liani (maxliani)
- Michael Görner (v4hn)
**Prior authors, please submit a PR against this file that adds your name
above. If, at the time of your prior contributions, you were employed by a
company who would have owned your IP output, then please have someone from
that company who is authorized to do so submit a PR to add their company’s
name to the list under the statement in this file.**
---
Here are the instructions we have been given by the Linux Foundation for how
to document the contents of each file:
a. Files that consist of only contributions made entirely by companies that
have submitted PRs as described above can have, once those PRs are merged,
the BSD-3-Clause license information replaced with Apache-2.0 license
information.
b. Files that contain contributions made after the change to the Apache-2.0
license as the license for the project should include only the Apache-2.0
license information.
c. Files that contain contributions made both before the Apache-2.0 license
change and after the Apache-2.0 license change should include both
BSD-3-Clause and Apache-2.0 license information. The SPDX identifier for
these files is “BSD-3-Clause and Apache-2.0”.
d. Files that contain only contributions made prior to the Apache-2.0 license
change should continue to include BSD-3-Clause license information (e.g.,
no changes to BSD-3-Clause information included in those files).
+5 -5
View File
@@ -8,16 +8,16 @@ security vulnerabilities.
| Version / branch | Supported |
| ----------------- | ---------------------------------------------------- |
| master | :white_check_mark: :construction: ALL fixes immediately, but this is a branch under development with a frequently unstable ABI and occasionally unstable API. |
| 2.3.x | :white_check_mark: All fixes that can be backported without breaking ABI compatibility. New tagged releases monthly. |
| 2.2.x | :x: Only receives occasional critical fixes, upon request. |
| <= 2.1.x | :x: No longer receiving patches of any kind. |
| 2.4.x | :white_check_mark: All fixes that can be backported without breaking ABI compatibility. New tagged releases monthly. |
| 2.3.x | :x: Only receives occasional critical fixes, upon request. |
| <= 2.2.x | :x: No longer receiving patches of any kind. |
## Reporting a Vulnerability
If you think you've found a potential vulnerability in OpenImageIO, please
report it by emailing security@openimageio.org. Only the project administrator
has access to these messages. Include detailed steps to reproduce the issue,
report it by emailing security@openimageio.org. Only the project administrators
have access to these messages. Include detailed steps to reproduce the issue,
and any other information that could aid an investigation. Our policy is to
respond to vulnerability reports within 14 days.
+8 -1
View File
@@ -1,5 +1,5 @@
See [LICENSE.md](LICENSE.md) for the main open source license of original
code written for the OpenImageIO project.
code written for the OpenImageIO project, which is the Apache-2.0 license.
The remainder of this file reproduces the open source licensing details
of other projects that have been imported, incorporated into, or derived
@@ -12,6 +12,13 @@ In no particular order:
BSD 3-Clause License
SPDX-License-Identifier: BSD-3-Clause
* OpenImageIO prior to July 1, 2023
Code that was contributed to OpenImageIO prior to July 1 2023, and has not
yet been [relicensed](RELICENSING.md), was contributed under the [BSD
3-clause license](LICENSE-BSD.md). Currently, this is less than 2% of the
codebase (by lines of code).
* Gelato, Copyright (c) 2004 by NVIDIA Corp.
The initial (version 0.1) code found in imageio.h, fmath.h, filter.h,
+7
View File
@@ -222,6 +222,10 @@ else ifeq (${platform}, macosx)
MY_CMAKE_FLAGS += \
-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
USE_LIBCPLUSPLUS := 0
else ifeq (${COMPILER}, gcc13)
MY_CMAKE_FLAGS += \
-DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13
USE_LIBCPLUSPLUS := 0
else ifeq (${COMPILER},clang13)
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@13/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@13/bin/clang++
@@ -231,6 +235,9 @@ else ifeq (${platform}, macosx)
else ifeq (${COMPILER},clang15)
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@15/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@15/bin/clang++
else ifeq (${COMPILER},clang16)
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@16/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@16/bin/clang++
else ifeq (${COMPILER},clang)
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
else ifeq (${COMPILER},gcc)
+1 -4
View File
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
# Copyright Contributors to the OpenImageIO Project.
sonar.host.url=https://sonarcloud.io
@@ -19,7 +19,4 @@ sonar.cfamily.build-wrapper-output=build/bw_output
sonar.cfamily.gcov.reportsPath=_coverage
sonar.coverage.exclusions=src/iv/**,src/include/OpenImageIO/detail/pugixml/**,src/include/OpenImageIO/detail/fmt/**,src/libOpenImageIO/kissfft.hh
sonar.cfamily.cache.enabled=true
sonar.cfamily.cache.path=/tmp/sonarcache
sonar.verbose=false
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
add_oiio_plugin (bmpinput.cpp bmpoutput.cpp bmp_pvt.cpp)
+2 -2
View File
@@ -1,5 +1,5 @@
// Copyright 2008-present Contributors to the OpenImageIO project.
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenImageIO project.
// SPDX-License-Identifier: Apache-2.0
// https://github.com/OpenImageIO/oiio
+2 -2
View File
@@ -1,5 +1,5 @@
// Copyright 2008-present Contributors to the OpenImageIO project.
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenImageIO project.
// SPDX-License-Identifier: Apache-2.0
// https://github.com/OpenImageIO/oiio
#pragma once
+9 -7
View File
@@ -1,5 +1,5 @@
// Copyright 2008-present Contributors to the OpenImageIO project.
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenImageIO project.
// SPDX-License-Identifier: Apache-2.0
// https://github.com/OpenImageIO/oiio
#include <cstdio>
@@ -23,7 +23,7 @@ public:
{
return feature == "ioproxy";
}
bool valid_file(const std::string& filename) const override;
bool valid_file(Filesystem::IOProxy* ioproxy) const override;
bool open(const std::string& name, ImageSpec& newspec) override;
bool open(const std::string& name, ImageSpec& newspec,
const ImageSpec& config) override;
@@ -94,11 +94,13 @@ OIIO_PLUGIN_EXPORTS_END
bool
BmpInput::valid_file(const std::string& filename) const
BmpInput::valid_file(Filesystem::IOProxy* ioproxy) const
{
if (!ioproxy || ioproxy->mode() != Filesystem::IOProxy::Mode::Read)
return false;
bmp_pvt::BmpFileHeader header;
Filesystem::IOFile file(filename, Filesystem::IOProxy::Read);
return file.opened() && header.read_header(&file) && header.isBmp();
return header.read_header(ioproxy) && header.isBmp();
}
@@ -297,7 +299,7 @@ BmpInput::read_rle_image()
int rletype = m_dib_header.compression == RLE4_COMPRESSION ? 4 : 8;
m_spec.attribute("compression", rletype == 4 ? "rle4" : "rle8");
m_uncompressed.clear();
m_uncompressed.resize(m_spec.height * m_spec.width);
m_uncompressed.resize(m_spec.image_pixels());
// Note: the clear+resize zeroes out the buffer
bool ok = true;
int y = 0, x = 0;
+2 -2
View File
@@ -1,5 +1,5 @@
// Copyright 2008-present Contributors to the OpenImageIO project.
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenImageIO project.
// SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
// https://github.com/OpenImageIO/oiio
#include <cstdio>
+5 -7
View File
@@ -3,7 +3,7 @@
# Utility script to download and build OpenJPEG
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
@@ -36,15 +36,13 @@ cd ${OPENJPEG_SRC_DIR}
echo "git checkout ${OPENJPEG_VERSION} --force"
git checkout ${OPENJPEG_VERSION} --force
mkdir -p ${OPENJPEG_BUILD_DIR} && true
cd ${OPENJPEG_BUILD_DIR}
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
time cmake -DCMAKE_BUILD_TYPE=Release \
time cmake -S . -B ${OPENJPEG_BUILD_DIR} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${OPENJPEG_INSTALL_DIR} \
-DBUILD_CODEC=OFF \
${OPENJPEG_CONFIG_OPTS} ..
time cmake --build . --config Release --target install
${OPENJPEG_CONFIG_OPTS}
time cmake --build ${OPENJPEG_BUILD_DIR} --config Release --target install
fi
# ls -R ${OPENJPEG_INSTALL_DIR}
+4 -6
View File
@@ -3,7 +3,7 @@
# Utility script to download and build Ptex
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
@@ -31,12 +31,10 @@ cd ${PTEX_SRC_DIR}
echo "git checkout ${PTEX_VERSION} --force"
git checkout ${PTEX_VERSION} --force
mkdir -p ${PTEX_BUILD_DIR}
cd ${PTEX_BUILD_DIR}
time cmake -DCMAKE_BUILD_TYPE=Release \
time cmake -S . -B ${PTEX_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${PTEX_INSTALL_DIR} \
${PTEX_CONFIG_OPTS} ..
time cmake --build . --config Release --target install
${PTEX_CONFIG_OPTS}
time cmake --build ${PTEX_BUILD_DIR} --config Release --target install
# ls -R ${PTEX_INSTALL_DIR}
popd
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# Utility script to download and build abi checking tools
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
set -ex
# Where to install the final results
: ${LOCAL_DEPS_DIR:=${PWD}/ext}
: ${ABITOOLS_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist}
mkdir -p ${LOCAL_DEPS_DIR}
pushd ${LOCAL_DEPS_DIR}
git clone https://github.com/lvc/vtable-dumper
pushd vtable-dumper ; make install prefix=${ABITOOLS_INSTALL_DIR} ; popd
git clone https://github.com/lvc/abi-dumper
pushd abi-dumper ; make install prefix=${ABITOOLS_INSTALL_DIR} ; popd
git clone https://github.com/lvc/abi-compliance-checker
pushd abi-compliance-checker ; make install prefix=${ABITOOLS_INSTALL_DIR} ; popd
popd
# ls -R ${LOCAL_DEPS_DIR}
export PATH=${PATH}:${ABITOOLS_INSTALL_DIR}/bin
+5 -1
View File
@@ -1,6 +1,10 @@
#!/usr/bin/env bash
# Utility script to download and build cmake
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
set -ex
@@ -8,7 +12,7 @@ set -ex
echo "Building cmake"
uname
CMAKE_VERSION=${CMAKE_VERSION:=3.12.4}
CMAKE_VERSION=${CMAKE_VERSION:=3.18.5}
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
CMAKE_INSTALL_DIR=${CMAKE_INSTALL_DIR:=${LOCAL_DEPS_DIR}/cmake}
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Utility script to download and build giflib
+4 -7
View File
@@ -3,7 +3,7 @@
# Utility script to download and build libjpeg-turbo
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
@@ -36,14 +36,11 @@ cd ${LIBJPEGTURBO_SRC_DIR}
echo "git checkout ${LIBJPEGTURBO_VERSION} --force"
git checkout ${LIBJPEGTURBO_VERSION} --force
mkdir -p ${LIBJPEGTURBO_BUILD_DIR}
cd ${LIBJPEGTURBO_BUILD_DIR}
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
time cmake -DCMAKE_BUILD_TYPE=Release \
time cmake -S . -B ${LIBJPEGTURBO_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${LIBJPEGTURBO_INSTALL_DIR} \
${LIBJPEGTURBO_CONFIG_OPTS} ..
time cmake --build . --config Release --target install
${LIBJPEGTURBO_CONFIG_OPTS}
time cmake --build ${LIBJPEGTURBO_BUILD_DIR} --config Release --target install
fi
# ls -R ${LIBJPEGTURBO_INSTALL_DIR}
+4 -7
View File
@@ -3,7 +3,7 @@
# Utility script to download and build libpng
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
@@ -38,16 +38,13 @@ cd ${LIBPNG_SRC_DIR}
echo "git checkout ${LIBPNG_VERSION} --force"
git checkout ${LIBPNG_VERSION} --force
mkdir -p ${LIBPNG_BUILD_DIR}
cd ${LIBPNG_BUILD_DIR}
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
time cmake -DCMAKE_BUILD_TYPE=Release \
time cmake -S . -B ${LIBPNG_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${LIBPNG_INSTALL_DIR} \
-DPNG_EXECUTABLES=OFF \
-DPNG_TESTS=OFF \
${LIBPNG_CONFIG_OPTS} ..
time cmake --build . --config Release --target install
${LIBPNG_CONFIG_OPTS}
time cmake --build ${LIBPNG_BUILD_DIR} --config Release --target install
fi
# ls -R ${LIBPNG_INSTALL_DIR}
+4
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Utility script to download and build LibRaw
# Exit the whole script if any command fails.
+8 -6
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Utility script to download and build libtiff
# Exit the whole script if any command fails.
@@ -32,19 +36,17 @@ cd libtiff
echo "git checkout ${LIBTIFF_VERSION} --force"
git checkout ${LIBTIFF_VERSION} --force
mkdir -p build
cd build
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
time cmake -DCMAKE_BUILD_TYPE=${LIBTIFF_BUILD_TYPE} \
time cmake -S . -B build \
-DCMAKE_BUILD_TYPE=${LIBTIFF_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX=${LIBTIFF_INSTALL_DIR} \
-DCMAKE_CXX_FLAGS="${LIBTIFF_CXX_FLAGS}" \
-DBUILD_SHARED_LIBS=${LIBTIFF_BUILD_SHARED_LIBS:-ON} \
-Dtiff-tests=${LIBTIFF_BUILD_TESTS:-OFF} \
-Dtiff-docs=${LIBTIFF_BUILD_TESTS:-OFF} \
-Dlibdeflate=ON \
${LIBTIFF_BUILDOPTS} ..
time cmake --build . --target install
${LIBTIFF_BUILDOPTS}
time cmake --build build --target install
fi
popd
+8 -22
View File
@@ -1,6 +1,10 @@
#!/usr/bin/env bash
# Utility script to download and build LLVM & clang
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
set -ex
@@ -10,30 +14,12 @@ uname
if [[ `uname` == "Linux" ]] ; then
LLVM_VERSION=${LLVM_VERSION:=13.0.0}
LLVM_INSTALL_DIR=${LLVM_INSTALL_DIR:=${PWD}/llvm-install}
if [[ "$GITHUB_WORKFLOW" != "" ]] ; then
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=ubuntu-18.04}
elif [[ "$TRAVIS_DIST" == "trusty" ]] ; then
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=ubuntu-14.04}
elif [[ "$TRAVIS_DIST" == "xenial" ]] ; then
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=ubuntu-16.04}
elif [[ "$TRAVIS_DIST" == "bionic" ]] ; then
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=ubuntu-18.04}
else
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=error}
fi
: ${LLVM_VERSION:=13.0.0}
: ${LLVM_INSTALL_DIR:=${PWD}/llvm-install}
: ${LLVM_DISTRO_NAME:=ubuntu-18.04}
LLVMTAR=clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-${LLVM_DISTRO_NAME}.tar.xz
echo LLVMTAR = $LLVMTAR
if [[ "$LLVM_VERSION" == "10.0.0" ]] || [[ "$LLVM_VERSION" == "11.0.0" ]] \
|| [[ "$LLVM_VERSION" == "11.1.0" ]] || [[ "$LLVM_VERSION" == "12.0.0" ]] \
|| [[ "$LLVM_VERSION" == "13.0.0" ]] || [[ "$LLVM_VERSION" == "14.0.0" ]] ;
then
# new
curl --location https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/${LLVMTAR} -o $LLVMTAR
else
curl --location http://releases.llvm.org/${LLVM_VERSION}/${LLVMTAR} -o $LLVMTAR
fi
curl --location https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/${LLVMTAR} -o $LLVMTAR
ls -l $LLVMTAR
tar xf $LLVMTAR
rm -f $LLVMTAR
+4
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
set -ex
+10 -6
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Utility script to download and build OpenColorIO
# Exit the whole script if any command fails.
@@ -7,13 +11,14 @@ set -ex
# Which OCIO to retrieve, how to build it
OPENCOLORIO_REPO=${OPENCOLORIO_REPO:=https://github.com/AcademySoftwareFoundation/OpenColorIO.git}
OPENCOLORIO_VERSION=${OPENCOLORIO_VERSION:=v2.1.2}
OPENCOLORIO_VERSION=${OPENCOLORIO_VERSION:=v2.2.1}
# Where to install the final results
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
OPENCOLORIO_SOURCE_DIR=${OPENCOLORIO_SOURCE_DIR:=${LOCAL_DEPS_DIR}/OpenColorIO}
OPENCOLORIO_BUILD_DIR=${OPENCOLORIO_BUILD_DIR:=${LOCAL_DEPS_DIR}/OpenColorIO-build}
OPENCOLORIO_INSTALL_DIR=${OPENCOLORIO_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist}
OPENCOLORIO_BUILD_TYPE=${OPENCOLORIO_BUILD_TYPE:=Release}
OPENCOLORIO_CXX_FLAGS=${OPENCOLORIO_CXX_FLAGS:="-Wno-unused-function -Wno-deprecated-declarations -Wno-cast-qual -Wno-write-strings"}
# Just need libs:
OPENCOLORIO_BUILDOPTS="-DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_NUKE=OFF \
@@ -38,13 +43,12 @@ cd ${OPENCOLORIO_SOURCE_DIR}
echo "git checkout ${OPENCOLORIO_VERSION} --force"
git checkout ${OPENCOLORIO_VERSION} --force
mkdir -p ${OPENCOLORIO_BUILD_DIR}
cd ${OPENCOLORIO_BUILD_DIR}
time cmake -DCMAKE_BUILD_TYPE=Release \
time cmake -S . -B ${OPENCOLORIO_BUILD_DIR} \
-DCMAKE_BUILD_TYPE=${OPENCOLORIO_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX=${OPENCOLORIO_INSTALL_DIR} \
-DCMAKE_CXX_FLAGS="${OPENCOLORIO_CXX_FLAGS}" \
${OPENCOLORIO_BUILDOPTS} ${OPENCOLORIO_SOURCE_DIR}
time cmake --build . --config Release --target install
${OPENCOLORIO_BUILDOPTS}
time cmake --build ${OPENCOLORIO_BUILD_DIR} --config Release --target install
popd
# ls -R ${OPENCOLORIO_INSTALL_DIR}
+20 -33
View File
@@ -2,12 +2,16 @@
# Utility script to download and build OpenEXR & IlmBase
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
set -ex
# Which OpenEXR to retrieve, how to build it
OPENEXR_REPO=${OPENEXR_REPO:=https://github.com/AcademySoftwareFoundation/openexr.git}
OPENEXR_VERSION=${OPENEXR_VERSION:=v3.1.5}
OPENEXR_VERSION=${OPENEXR_VERSION:=v3.1.9}
# Where to install the final results
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
@@ -32,42 +36,25 @@ if [[ ! -e ${OPENEXR_SOURCE_DIR} ]] ; then
git clone ${OPENEXR_REPO} ${OPENEXR_SOURCE_DIR}
fi
mkdir -p ${OPENEXR_INSTALL_DIR} && true
mkdir -p ${OPENEXR_BUILD_DIR} && true
pushd ${OPENEXR_SOURCE_DIR}
git checkout ${OPENEXR_VERSION} --force
if [[ ${OPENEXR_VERSION} == "v2.3.0" ]] ; then
# Simplified setup for 2.3+
cd ${OPENEXR_BUILD_DIR}
cmake -DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
-DILMBASE_PACKAGE_PREFIX="${OPENEXR_INSTALL_DIR}" \
-DOPENEXR_BUILD_UTILS=0 \
-DOPENEXR_BUILD_TESTS=0 \
-DOPENEXR_BUILD_PYTHON_LIBS=0 \
-DCMAKE_CXX_FLAGS="${OPENEXR_CXX_FLAGS}" \
${OPENEXR_CMAKE_FLAGS} ${OPENEXR_SOURCE_DIR}
time cmake --build . --target install --config ${OPENEXR_BUILD_TYPE}
else
# Simplified setup for 2.4+
cd ${OPENEXR_BUILD_DIR}
cmake -DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
-DILMBASE_PACKAGE_PREFIX="${OPENEXR_INSTALL_DIR}" \
-DOPENEXR_BUILD_UTILS=0 \
-DBUILD_TESTING=0 \
-DPYILMBASE_ENABLE=0 \
-DOPENEXR_VIEWERS_ENABLE=0 \
-DINSTALL_OPENEXR_EXAMPLES=0 \
-DOPENEXR_INSTALL_EXAMPLES=0 \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_CXX_FLAGS="${OPENEXR_CXX_FLAGS}" \
${OPENEXR_CMAKE_FLAGS} ${OPENEXR_SOURCE_DIR}
time cmake --build . --target install --config ${OPENEXR_BUILD_TYPE}
fi
cmake -S . -B ${OPENEXR_BUILD_DIR} \
-DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
-DILMBASE_PACKAGE_PREFIX="${OPENEXR_INSTALL_DIR}" \
-DOPENEXR_BUILD_UTILS=0 \
-DBUILD_TESTING=0 \
-DPYILMBASE_ENABLE=0 \
-DOPENEXR_VIEWERS_ENABLE=0 \
-DINSTALL_OPENEXR_EXAMPLES=0 \
-DOPENEXR_INSTALL_EXAMPLES=0 \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_CXX_FLAGS="${OPENEXR_CXX_FLAGS}" \
${OPENEXR_CMAKE_FLAGS}
time cmake --build ${OPENEXR_BUILD_DIR} --target install --config ${OPENEXR_BUILD_TYPE}
popd
+3 -6
View File
@@ -3,7 +3,7 @@
# Utility script to download and build pugixml
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
@@ -38,16 +38,13 @@ cd ${PUGIXML_SRC_DIR}
echo "git checkout ${PUGIXML_VERSION} --force"
git checkout ${PUGIXML_VERSION} --force
mkdir -p ${PUGIXML_BUILD_DIR}
cd ${PUGIXML_BUILD_DIR}
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
time cmake -DCMAKE_BUILD_TYPE=Release \
time cmake -S . -B ${PUGIXML_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${PUGIXML_INSTALL_DIR} \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTS=OFF \
${PUGIXML_BUILD_OPTS} ..
time cmake --build . --config Release --target install
time cmake --build ${PUGIXML_BUILD_DIR} --config Release --target install
fi
# ls -R ${PUGIXML_INSTALL_DIR}
+7 -6
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Utility script to download and build pybind11
# Exit the whole script if any command fails.
@@ -38,15 +42,12 @@ cd ${PYBIND11_SRC_DIR}
echo "git checkout ${PYBIND11_VERSION} --force"
git checkout ${PYBIND11_VERSION} --force
mkdir -p ${PYBIND11_BUILD_DIR}
cd ${PYBIND11_BUILD_DIR}
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
time cmake -DCMAKE_BUILD_TYPE=Release \
time cmake -S . -B ${PYBIND11_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${PYBIND11_INSTALL_DIR} \
-DPYBIND11_TEST=OFF \
${PYBIND11_BUILD_OPTS} ..
time cmake --build . --config Release --target install
${PYBIND11_BUILD_OPTS}
time cmake --build ${PYBIND11_BUILD_DIR} --config Release --target install
fi
# ls -R ${PYBIND11_INSTALL_DIR}
+4 -7
View File
@@ -3,7 +3,7 @@
# Utility script to download and build webp
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
@@ -37,11 +37,8 @@ cd ${WEBP_SRC_DIR}
echo "git checkout ${WEBP_VERSION} --force"
git checkout ${WEBP_VERSION} --force
mkdir -p ${WEBP_BUILD_DIR}
cd ${WEBP_BUILD_DIR}
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
time cmake -DCMAKE_BUILD_TYPE=${WEBP_BUILD_TYPE} \
time cmake -S . -B ${WEBP_BUILD_DIR} -DCMAKE_BUILD_TYPE=${WEBP_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX=${WEBP_INSTALL_DIR} \
-DWEBP_BUILD_ANIM_UTILS=OFF \
-DWEBP_BUILD_CWEBP=OFF \
@@ -51,8 +48,8 @@ if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
-DWEBP_BUILD_IMG2WEBP=OFF \
-DWEBP_BUILD_EXTRAS=OFF \
-DBUILD_SHARED_LIBS=ON \
${WEBP_CONFIG_OPTS} ..
time cmake --build . --target install
${WEBP_CONFIG_OPTS}
time cmake --build ${WEBP_BUILD_DIR} --target install
fi
+4 -8
View File
@@ -3,7 +3,7 @@
# Utility script to download and build zlib
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Exit the whole script if any command fails.
@@ -37,15 +37,11 @@ cd ${ZLIB_SRC_DIR}
echo "git checkout ${ZLIB_VERSION} --force"
git checkout ${ZLIB_VERSION} --force
mkdir -p ${ZLIB_BUILD_DIR} && true
cd ${ZLIB_BUILD_DIR}
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
time cmake -DCMAKE_BUILD_TYPE=Release \
time cmake -S . -B ${ZLIB_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${ZLIB_INSTALL_DIR} \
${ZLIB_CONFIG_OPTS} ..
time cmake --build . --config Release --target install
${ZLIB_CONFIG_OPTS}
time cmake --build ${ZLIB_BUILD_DIR} --config Release --target install
fi
# ls -R ${ZLIB_INSTALL_DIR}
+54
View File
@@ -0,0 +1,54 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Important: set -ex causes this whole script to terminate with error if
# any command in it fails. This is crucial for CI tests.
set -e
# Arguments to this script are:
# BUILDDIR_NEW BUILDDIR_OLD LIBRARIES...
BUILDDIR_NEW=$1
shift
BUILDDIR_OLD=$1
shift
LIBS=$*
#
# First, create ABI dumps from both builds
#
ABI_ARGS="-bin-only -skip-cxx -public-headers $PWD/dist/include/OpenImageIO "
echo "ABI_CHECK: PWD=${PWD} "
ls -l $BUILDDIR_NEW
ls -l $BUILDDIR_OLD
for dir in $BUILDDIR_NEW $BUILDDIR_OLD ; do
for lib in $LIBS ; do
abi-dumper $ABI_ARGS ${dir}/lib/${lib}.so -o ${dir}/abi-${lib}.dump
done
done
echo "Saved ABI dumps"
#
# Run the ABI compliance checker, saving the outputs to files
#
for lib in $LIBS ; do
abi-compliance-checker -l $lib -old $BUILDDIR_OLD/abi-$lib.dump -new $BUILDDIR_NEW/abi-$lib.dump | tee ${lib}-abi-results.txt || true
echo -e "\x1b[33;1m"
echo -e "$lib"
fgrep "Binary compatibility:" ${lib}-abi-results.txt
echo -e "\x1b[33;0m"
done
#
# If the "Binary compatibility" summary results say anything other than 100%,
# we fail!
#
for lib in $LIBS ; do
if [[ `fgrep "Binary compatibility:" ${lib}-abi-results.txt | grep -v 100\%` != "" ]] ; then
cp -r compat_reports ${BUILDDIR_NEW}/compat_reports
exit 1
fi
done
+8 -6
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Important: set -ex causes this whole script to terminate with error if
# any command in it fails. This is crucial for CI tests.
set -ex
@@ -23,8 +27,7 @@ if [[ ${GITHUB_ACTIONS} == true ]] ; then
OIIO_CMAKE_FLAGS+=" -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:=ON} -DCMAKE_UNITY_BUILD_MODE=${CMAKE_UNITY_BUILD_MODE:=BATCH}"
fi
pushd build
cmake .. -G "$CMAKE_GENERATOR" \
cmake -S . -B build -G "$CMAKE_GENERATOR" \
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
-DCMAKE_INSTALL_PREFIX="$OpenImageIO_ROOT" \
@@ -36,15 +39,14 @@ cmake .. -G "$CMAKE_GENERATOR" \
$OIIO_CMAKE_FLAGS -DVERBOSE=1
# Save a copy of the generated files for debugging broken CI builds.
mkdir cmake-save || /bin/true
cp -r CMake* *.cmake cmake-save
mkdir build/cmake-save || /bin/true
cp -r build/CMake* build/*.cmake build/cmake-save
: ${BUILDTARGET:=install}
if [[ "$BUILDTARGET" != "none" ]] ; then
echo "Parallel build ${CMAKE_BUILD_PARALLEL_LEVEL} of target ${BUILDTARGET}"
time ${OIIO_CMAKE_BUILD_WRAPPER} cmake --build . --target ${BUILDTARGET} --config ${CMAKE_BUILD_TYPE}
time ${OIIO_CMAKE_BUILD_WRAPPER} cmake --build build --target ${BUILDTARGET} --config ${CMAKE_BUILD_TYPE}
fi
popd
if [[ "${DEBUG_CI:=0}" != "0" ]] ; then
echo "PATH=$PATH"
+4
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Run code coverage analysis
# This assumes that the build occurred with CODECOV=1 and tests have already
# fully run.
+4
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# This script is run when CI system first starts up.
# Since it sets many env variables needed by the caller, it should be run
# with 'source', not in a separate shell.
+4
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Important: set -ex causes this whole script to terminate with error if
# any command in it fails. This is crucial for CI tests.
# (Though we let it run all the way through for code coverage workflows.)
+38 -14
View File
@@ -1,6 +1,11 @@
#!/usr/bin/env bash
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
set -ex
@@ -13,8 +18,12 @@ if [[ "$ASWF_ORG" != "" ]] ; then
#ls /etc/yum.repos.d
sudo yum install -y giflib giflib-devel && true
sudo yum install -y opencv opencv-devel && true
sudo yum install -y ffmpeg ffmpeg-devel && true
if [[ "${USE_OPENCV}" != "0" ]] ; then
sudo yum install -y opencv opencv-devel && true
fi
if [[ "${USE_FFMPEG}" != "0" ]] ; then
sudo yum install -y ffmpeg ffmpeg-devel && true
fi
if [[ "${EXTRA_DEP_PACKAGES}" != "" ]] ; then
time sudo yum install -y ${EXTRA_DEP_PACKAGES}
fi
@@ -39,20 +48,22 @@ if [[ "$ASWF_ORG" != "" ]] ; then
fi
if [[ "$CXX" == "icpc" || "$CC" == "icc" || "$USE_ICC" != "" ]] ; then
# The "current" version of icc 2023.x on the Intel site is build to
# link against a glibc too new for the ASWF CentOS7-based containers
# we run CI on. So we lock down to a specific version of icc 2022.1
# that is known to work.
# Lock down icc to 2022.1 because newer versions hosted on the Intel
# repo require a glibc too new for the ASWF CentOS7-based containers
# we run CI on.
sudo cp src/build-scripts/oneAPI.repo /etc/yum.repos.d
sudo /usr/bin/yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0-3768
# Because multiple (possibly newer) versions of oneAPI may be installed,
# use a config file to specify compiler and tbb versions
# NOTE: oneAPI components have independent version numbering.
sudo /usr/bin/yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0.x86_64
set +e; source /opt/intel/oneapi/setvars.sh --config oneapi_2022.1.0.cfg; set -e
elif [[ "$CXX" == "icpc" || "$CC" == "icc" || "$USE_ICC" != "" || "$CXX" == "icpx" || "$CC" == "icx" || "$USE_ICX" != "" ]] ; then
# Lock down icx to 2023.1 because newer versions hosted on the Intel
# repo require a libstd++ too new for the ASWF containers we run CI on
# because their default install of gcc 9 based toolchain.
sudo cp src/build-scripts/oneAPI.repo /etc/yum.repos.d
sudo yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
sudo yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.1.0.x86_64
# sudo yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
set +e; source /opt/intel/oneapi/setvars.sh; set -e
echo "Verifying installation of Intel(r) oneAPI DPC++/C++ Compiler:"
icpx --version
fi
else
@@ -73,8 +84,12 @@ else
libopencolorio-dev \
libopencv-dev \
libhdf5-dev
time sudo apt-get -q install -y \
qt5-default || /bin/true
if [[ "${QT_VERSION:-5}" == "5" ]] ; then
time sudo apt-get -q install -y \
qt5-default || /bin/true
elif [[ "${QT_VERSION}" == "6" ]] ; then
time sudo apt-get -q install -y qt6-base-dev || /bin/true
fi
if [[ "${EXTRA_DEP_PACKAGES}" != "" ]] ; then
time sudo apt-get -q install -y ${EXTRA_DEP_PACKAGES}
fi
@@ -93,7 +108,9 @@ else
if [[ "$USE_LIBHEIF" != "0" ]] ; then
sudo add-apt-repository ppa:strukturag/libde265 || true
sudo add-apt-repository ppa:strukturag/libheif || true
time sudo apt-get -q install -y libheif-dev || true
time sudo apt-get -q install -y libheif-plugin-aomdec \
libheif-plugin-aomenc libheif-plugin-libde265 \
libheif-plugin-x265 libheif-dev || true
fi
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:$CMAKE_PREFIX_PATH
@@ -125,6 +142,9 @@ else
fi
if [[ "$CMAKE_VERSION" != "" ]] ; then
source src/build-scripts/build_cmake.bash
fi
cmake --version
@@ -177,6 +197,10 @@ if [[ "$PTEX_VERSION" != "" ]] ; then
source src/build-scripts/build_Ptex.bash
fi
if [[ "$ABI_CHECK" != "" ]] ; then
source src/build-scripts/build_abi_tools.bash
fi
if [[ "$USE_ICC" != "" ]] ; then
# We used gcc for the prior dependency builds, but use icc for OIIO itself
echo "which icpc:" $(which icpc)
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# DEP_DIR="$PWD/ext/dist"
+5 -1
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# This script, which assumes it is running on a Mac OSX with Homebrew
# installed, does a "brew install" in all packages reasonably needed by
# OIIO.
@@ -39,7 +43,7 @@ brew install --display-times -q ffmpeg libheif ptex || true
brew install --display-times -q tbb || true
brew install --display-times -q openvdb || true
brew install --display-times -q opencv || true
brew install --display-times -q qt@5
brew install --display-times -q qt${QT_VERSION}
echo ""
echo "After brew installs:"
@@ -1,22 +0,0 @@
#!/usr/bin/env bash
if [[ ! -e ../oiio-images ]] ; then
git clone https://github.com/OpenImageIO/oiio-images.git -b master --depth 1 ../oiio-images
# NOTE: on release branches, this should include `-b RB-x.y`` so that
# updates to the master oiio-images don't break tests in release branches.
fi
# if [[ ! -e ../libtiffpic ]] ; then
# curl -o pics-3.8.0.tar.gz https://download.osgeo.org/libtiff/pics-3.8.0.tar.gz
# tar xf pics-3.8.0.tar.gz -C ..
# fi
if [[ ! -e ../openexr-images ]] ; then
git clone https://github.com/openexr/openexr-images.git --depth 1 ../openexr-images
fi
# if [[ ! -e ../bmpsuite ]] ; then
# mkdir ../bmpsuite
# curl -o bmpsuite.zip http://entropymine.com/jason/bmpsuite/bmpsuite.zip
# unzip bmpsuite.zip -d ../bmpsuite
# fi
+4
View File
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Save the env for use by other stages. Exclude things that we know aren't
# needed.
printenv \
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
add_oiio_plugin (cineoninput.cpp
+2 -2
View File
@@ -1,5 +1,5 @@
// Copyright 2008-present Contributors to the OpenImageIO project.
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenImageIO project.
// SPDX-License-Identifier: Apache-2.0
// https://github.com/OpenImageIO/oiio
#include <cmath>
@@ -511,12 +511,14 @@ void cineon::IndustryHeader::FilmEdgeCode(char *edge, size_t size) const
&& this->perfsOffset == 0xff && this->prefix == 0xffffffff
&& this->count == 0xffffffff)
*edge = 0;
else
snprintf(edge, size, "%02u%02u%02u%06u%04u",
(unsigned int)this->filmManufacturingIdCode,
(unsigned int)this->filmType,
(unsigned int)this->perfsOffset, this->prefix,
this->count);
else {
std::string e = OIIO::Strutil::sprintf(
"%02u%02u%02u%06u%04u",
(unsigned int)this->filmManufacturingIdCode,
(unsigned int)this->filmType,
(unsigned int)this->perfsOffset, this->prefix, this->count);
OIIO::Strutil::safe_strcpy(edge, e, size);
}
}
+4
View File
@@ -1,3 +1,7 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
+1 -1
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Is the named package "enabled" via our disabling convention? If either
+1 -1
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
# https://github.com/OpenImageIO/oiio
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
+25 -44
View File
@@ -1,5 +1,5 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
###########################################################################
@@ -15,13 +15,11 @@
###########################################################################
# Print some basic status about the system and compiler
#
if (VERBOSE)
message (STATUS "CMAKE_SYSTEM_NAME = ${CMAKE_SYSTEM_NAME}")
message (STATUS "CMAKE_SYSTEM_VERSION = ${CMAKE_SYSTEM_VERSION}")
message (STATUS "CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}")
endif ()
message (STATUS "CMAKE_CXX_COMPILER = ${CMAKE_CXX_COMPILER}")
message (STATUS "CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}")
message (VERBOSE "CMAKE_SYSTEM_NAME = ${CMAKE_SYSTEM_NAME}")
message (VERBOSE "CMAKE_SYSTEM_VERSION = ${CMAKE_SYSTEM_VERSION}")
message (VERBOSE "CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}")
message (STATUS "CMAKE_CXX_COMPILER = ${CMAKE_CXX_COMPILER}")
message (STATUS "CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}")
###########################################################################
@@ -44,9 +42,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
execute_process (COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
if (VERBOSE)
message (STATUS "Using gcc ${GCC_VERSION} as the compiler")
endif ()
message (VERBOSE "Using gcc ${GCC_VERSION} as the compiler")
else ()
set (GCC_VERSION 0)
endif ()
@@ -63,26 +59,18 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER MATCHES "[Cc]lan
set (CMAKE_CXX_COMPILER_ID "AppleClang")
set (CMAKE_COMPILER_IS_APPLECLANG 1)
string (REGEX REPLACE ".* version ([0-9]+\\.[0-9]+).*" "\\1" APPLECLANG_VERSION_STRING ${clang_full_version_string})
if (VERBOSE)
message (STATUS "The compiler is Clang: ${CMAKE_CXX_COMPILER_ID} version ${APPLECLANG_VERSION_STRING}")
endif ()
message (VERBOSE "The compiler is Clang: ${CMAKE_CXX_COMPILER_ID} version ${APPLECLANG_VERSION_STRING}")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
set (CMAKE_COMPILER_IS_INTELCLANG 1)
string (REGEX MATCH "[0-9]+(\\.[0-9]+)+" INTELCLANG_VERSION_STRING ${clang_full_version_string})
if (VERBOSE)
message (STATUS "The compiler is Intel Clang: ${CMAKE_CXX_COMPILER_ID} version ${INTELCLANG_VERSION_STRING}")
endif ()
message (VERBOSE "The compiler is Intel Clang: ${CMAKE_CXX_COMPILER_ID} version ${INTELCLANG_VERSION_STRING}")
else ()
string (REGEX REPLACE ".* version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION_STRING ${clang_full_version_string})
if (VERBOSE)
message (STATUS "The compiler is Clang: ${CMAKE_CXX_COMPILER_ID} version ${CLANG_VERSION_STRING}")
endif ()
message (VERBOSE "The compiler is Clang: ${CMAKE_CXX_COMPILER_ID} version ${CLANG_VERSION_STRING}")
endif ()
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Intel")
set (CMAKE_COMPILER_IS_INTEL 1)
if (VERBOSE)
message (STATUS "Using Intel as the compiler")
endif ()
message (VERBOSE "Using Intel as the compiler")
endif ()
@@ -121,11 +109,11 @@ endif ()
# give more fine-grained control for hiding symbols, because sometimes
# dependent libraries may not be well behaved and need extra hiding.
#
set (CXX_VISIBILITY_PRESET "hidden" CACHE STRING "Symbol visibility (hidden or default")
set (CMAKE_CXX_VISIBILITY_PRESET "hidden" CACHE STRING "Symbol visibility (hidden or default")
option (VISIBILITY_INLINES_HIDDEN "Hide symbol visibility of inline functions" ON)
set (VISIBILITY_MAP_FILE "${PROJECT_SOURCE_DIR}/src/build-scripts/hidesymbols.map" CACHE FILEPATH "Visibility map file")
set (C_VISIBILITY_PRESET ${CXX_VISIBILITY_PRESET})
if (${CXX_VISIBILITY_PRESET} STREQUAL "hidden" AND VISIBILITY_MAP_FILE AND
set (CMAKE_C_VISIBILITY_PRESET ${CMAKE_CXX_VISIBILITY_PRESET})
if (${CMAKE_CXX_VISIBILITY_PRESET} STREQUAL "hidden" AND VISIBILITY_MAP_FILE AND
(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) AND
(CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU"))
# Linux/FreeBSD/Hurd: also hide all the symbols of dependent libraries
@@ -160,6 +148,9 @@ if (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG)
# Don't warn about using unknown preprocessor symbols in `#if`
add_compile_options ("-Wno-expansion-to-defined")
endif ()
if (CMAKE_GENERATOR MATCHES "Xcode")
add_compile_options ("-Wno-shorten-64-to-32")
endif ()
endif ()
if (CMAKE_COMPILER_IS_GNUCC AND NOT (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG))
@@ -312,9 +303,7 @@ if (NOT USE_SIMD STREQUAL "")
else ()
string (REPLACE "," ";" SIMD_FEATURE_LIST ${USE_SIMD})
foreach (feature ${SIMD_FEATURE_LIST})
if (VERBOSE)
message (STATUS "SIMD feature: ${feature}")
endif ()
message (VERBOSE "SIMD feature: ${feature}")
if (MSVC OR CMAKE_COMPILER_IS_INTEL)
set (SIMD_COMPILE_FLAGS ${SIMD_COMPILE_FLAGS} "/arch:${feature}")
else ()
@@ -350,7 +339,7 @@ include (CheckLibraryExists)
#
if (NOT MSVC AND NOT APPLE AND NOT ANDROID)
cmake_push_check_state ()
check_cxx_source_runs(
check_cxx_source_compiles(
"#include <atomic>
#include <cstdint>
std::atomic<uint64_t> x {0};
@@ -369,9 +358,7 @@ if (NOT MSVC AND NOT APPLE AND NOT ANDROID)
message (FATAL_ERROR "Compiler needs libatomic, but not found")
endif ()
else ()
if (VERBOSE)
message (STATUS "Compiler supports std::atomic, no libatomic necessary")
endif ()
message (VERBOSE "Compiler supports std::atomic, no libatomic necessary")
endif ()
endif ()
@@ -474,10 +461,8 @@ if (CLANG_TIDY)
find_program(CLANG_TIDY_EXE NAMES "clang-tidy"
DOC "Path to clang-tidy executable")
message (STATUS "CLANG_TIDY_EXE ${CLANG_TIDY_EXE}")
if (CLANG_TIDY_EXE AND NOT ${CMAKE_VERSION} VERSION_LESS 3.6)
set (CMAKE_CXX_CLANG_TIDY
"${CLANG_TIDY_EXE}"
)
if (CLANG_TIDY_EXE)
set (CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXE}")
if (CLANG_TIDY_ARGS)
list (APPEND CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_ARGS})
endif ()
@@ -571,9 +556,7 @@ else ()
set (SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
CACHE STRING "Set the SO version for dynamic libraries")
endif ()
if (VERBOSE)
message(STATUS "Setting SOVERSION to: ${SOVERSION}")
endif ()
message(VERBOSE "Setting SOVERSION to: ${SOVERSION}")
###########################################################################
@@ -635,9 +618,7 @@ else ()
# add the automatically determined parts of the RPATH that
# point to directories outside the build tree to the install RPATH
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
if (VERBOSE)
message (STATUS "CMAKE_INSTALL_RPATH = ${CMAKE_INSTALL_RPATH}")
endif ()
message (VERBOSE "CMAKE_INSTALL_RPATH = ${CMAKE_INSTALL_RPATH}")
endif ()
+35 -28
View File
@@ -1,5 +1,5 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
###########################################################################
@@ -23,7 +23,7 @@ message (STATUS "${ColorReset}")
set (OIIO_LOCAL_DEPS_PATH "${CMAKE_SOURCE_DIR}/ext/dist" CACHE STRING
"Local area for dependencies added to CMAKE_PREFIX_PATH")
list (APPEND CMAKE_PREFIX_PATH ${CMAKE_SOURCE_DIR}/ext/dist)
list (APPEND CMAKE_PREFIX_PATH ${OIIO_LOCAL_DEPS_PATH})
include (ExternalProject)
@@ -61,7 +61,10 @@ message (STATUS "Boost_COMPONENTS = ${Boost_COMPONENTS}")
# cmake output (e.g. boost 1.70.0, cmake <= 3.14). Specifically it fails
# to set the expected variables printed below. So until that's fixed
# force FindBoost.cmake to use the original brute force path.
set (Boost_NO_BOOST_CMAKE ON)
if (NOT DEFINED Boost_NO_BOOST_CMAKE)
set (Boost_NO_BOOST_CMAKE ON)
endif ()
checked_find_package (Boost REQUIRED
VERSION_MIN 1.53
COMPONENTS ${Boost_COMPONENTS}
@@ -78,6 +81,8 @@ endif ()
include_directories (SYSTEM "${Boost_INCLUDE_DIRS}")
link_directories ("${Boost_LIBRARY_DIRS}")
option (OIIO_DISABLE_BOOST_STACKTRACE "Disable use of Boost stacktrace." OFF)
# end Boost setup
###########################################################################
@@ -94,8 +99,8 @@ checked_find_package (TIFF REQUIRED
# IlmBase & OpenEXR
checked_find_package (OpenEXR REQUIRED
VERSION_MIN 2.3
RECOMMEND_MIN 2.4
VERSION_MIN 2.4
RECOMMEND_MIN 3.1
PRINT IMATH_INCLUDES OPENEXR_INCLUDES)
# Force Imath includes to be before everything else to ensure that we have
# the right Imath/OpenEXR version, not some older version in the system
@@ -106,7 +111,7 @@ include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES})
if (MSVC AND NOT LINKSTATIC)
add_definitions (-DOPENEXR_DLL) # Is this needed for new versions?
endif ()
if (OPENEXR_VERSION VERSION_GREATER_EQUAL 3.0)
if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0)
set (OIIO_USING_IMATH 3)
else ()
set (OIIO_USING_IMATH 2)
@@ -118,18 +123,14 @@ set (OPENIMAGEIO_IMATH_TARGETS
# For OpenEXR >= 2.4/2.5 with reliable exported targets
$<TARGET_NAME_IF_EXISTS:IlmBase::Imath>
$<TARGET_NAME_IF_EXISTS:IlmBase::Half>
$<TARGET_NAME_IF_EXISTS:IlmBase::Iex>
# For OpenEXR <= 2.3:
${ILMBASE_LIBRARIES} )
$<TARGET_NAME_IF_EXISTS:IlmBase::Iex> )
set (OPENIMAGEIO_OPENEXR_TARGETS
# For OpenEXR/Imath 3.x:
$<TARGET_NAME_IF_EXISTS:OpenEXR::OpenEXR>
# For OpenEXR >= 2.4/2.5 with reliable exported targets
$<TARGET_NAME_IF_EXISTS:OpenEXR::IlmImf>
$<TARGET_NAME_IF_EXISTS:IlmBase::IlmThread>
$<TARGET_NAME_IF_EXISTS:IlmBase::Iex>
# For OpenEXR <= 2.3:
${OPENEXR_LIBRARIES} )
$<TARGET_NAME_IF_EXISTS:IlmBase::Iex> )
set (OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY "PUBLIC" CACHE STRING
"Should we expose Imath library dependency as PUBLIC or PRIVATE")
set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL
@@ -214,8 +215,7 @@ if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VER
endif ()
checked_find_package (LibRaw
RECOMMEND_MIN 0.18
RECOMMEND_MIN_REASON "for ACES support and better camera metadata"
VERSION_MIN 0.18
PRINT LibRaw_r_LIBRARIES)
if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VERSION_GREATER_EQUAL 17)
message (STATUS "${ColorYellow}WARNING When building for C++17, LibRaw should be 0.20 or higher (found ${LibRaw_VERSION}). You may get errors, depending on the compiler.${ColorReset}")
@@ -253,21 +253,22 @@ checked_find_package (R3DSDK) # RED camera
set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target")
checked_find_package (Nuke)
checked_find_package (OpenGL) # used for iv
# Qt -- used for iv
set (qt5_modules Core Gui Widgets)
if (OPENGL_FOUND)
list (APPEND qt5_modules OpenGL)
endif ()
option (USE_QT "Use Qt if found" ON)
checked_find_package (Qt5 COMPONENTS ${qt5_modules})
if (USE_QT AND NOT Qt5_FOUND AND APPLE)
message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,")
message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH")
if (USE_QT)
checked_find_package (OpenGL) # used for iv
endif ()
if (USE_QT AND OPENGL_FOUND)
checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets)
if (NOT Qt6_FOUND)
checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL)
endif ()
if (NOT Qt5_FOUND AND NOT Qt6_FOUND AND APPLE)
message (STATUS " If you think you installed qt with Homebrew and it still doesn't work,")
message (STATUS " try: export PATH=/usr/local/opt/qt/bin:$PATH")
endif ()
endif ()
###########################################################################
@@ -316,7 +317,7 @@ endmacro()
option (BUILD_FMT_FORCE "Force local download/build of fmt even if installed" OFF)
option (BUILD_MISSING_FMT "Local download/build of fmt if not installed" ON)
option (INTERNALIZE_FMT "Copy fmt headers into <install>/include/OpenImageIO/detail/fmt" ON)
set (BUILD_FMT_VERSION "9.1.0" CACHE STRING "Preferred fmtlib/fmt version, when downloading/building our own")
set (BUILD_FMT_VERSION "10.0.0" CACHE STRING "Preferred fmtlib/fmt version, when downloading/building our own")
macro (find_or_download_fmt)
# If we weren't told to force our own download/build of fmt, look
@@ -349,7 +350,13 @@ macro (find_or_download_fmt)
else ()
set (OIIO_USING_FMT_LOCAL FALSE)
endif ()
checked_find_package (fmt REQUIRED)
checked_find_package (fmt REQUIRED
VERSION_MIN 7.0)
endmacro()
find_or_download_fmt()
if (FMT_VERSION VERSION_EQUAL 90100
AND GCC_VERSION VERSION_GREATER 0.0 AND NOT GCC_VERSION VERSION_GREATER 7.2)
message (WARNING "${ColorRed}fmt 9.1 is known to not work with gcc <= 7.2${ColorReset}")
endif ()
+2 -4
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
# https://github.com/OpenImageIO/oiio
# Macro to add an executable build target. The executable name can be
@@ -55,9 +55,7 @@ macro (fancy_add_executable)
if (CMAKE_UNITY_BUILD AND UNITY_BUILD_MODE STREQUAL GROUP)
set_source_files_properties(${_target_SRC} PROPERTIES
UNITY_GROUP ${_target_NAME})
if (VERBOSE)
message (STATUS "Unity group ${_target_NAME} = ${_target_SRC}")
endif ()
message (VERBOSE "Unity group ${_target_NAME} = ${_target_SRC}")
endif ()
if (_target_NAME_INSTALL_enabled)
install_targets (${_target_NAME})
+4
View File
@@ -1,5 +1,9 @@
# Module to find DCMTK
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
#
# This module will first look into the directories defined by the variables:
# - DCMTK_ROOT, DCMTK_INCLUDE_PATH, DCMTK_LIBRARY_PATH
#
+6 -4
View File
@@ -16,8 +16,8 @@
# BSD license.
#
# Modifications:
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
# https://github.com/OpenImageIO/oiio
if (FFMPEG_INCLUDES AND FFMPEG_LIBRARIES)
@@ -68,12 +68,14 @@ if (FFMPEG_INCLUDES)
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MAJOR "${TMP}")
file(STRINGS "${FFMPEG_INCLUDES}/libavcodec/version.h" TMP
REGEX "^#define LIBAVCODEC_VERSION_MINOR .*$")
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MINOR "${TMP}")
string (REGEX MATCHALL "[0-9]+[.]?[0-9]*" LIBAVCODEC_VERSION_MINOR "${TMP}")
file(STRINGS "${FFMPEG_INCLUDES}/libavcodec/version.h" TMP
REGEX "^#define LIBAVCODEC_VERSION_MICRO .*$")
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MICRO "${TMP}")
set (LIBAVCODEC_VERSION "${LIBAVCODEC_VERSION_MAJOR}.${LIBAVCODEC_VERSION_MINOR}.${LIBAVCODEC_VERSION_MICRO}")
if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.37.100)
if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 60.3.100)
set (FFMPEG_VERSION 6.0)
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.37.100)
set (FFMPEG_VERSION 5.1)
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.18.100)
set (FFMPEG_VERSION 5.0)
+4
View File
@@ -1,3 +1,7 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
# https://github.com/OpenImageIO/oiio
# - Try to find libjpeg-turbo
# Once done, this will define
#
+4
View File
@@ -1,5 +1,9 @@
# Module to find LIBHEIF
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
#
# This module will first look into the directories defined by the variables:
# - Libheif_ROOT, LIBHEIF_INCLUDE_PATH, LIBHEIF_LIBRARY_PATH
#
+4
View File
@@ -1,3 +1,7 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# - CMake find module for Nuke
#
# If requesting a specific release, the Nuke version string must be converted
+4
View File
@@ -1,3 +1,7 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# - Find OpenCV
# Find the OpenCV library
# This module defines
+4
View File
@@ -1,3 +1,7 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Module to find OpenColorIO
#
# This module will first look into the directories hinted by the variables:
+7 -163
View File
@@ -1,9 +1,13 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Module to find OpenEXR and Imath.
#
# I'm afraid this is a mess, due to needing to support a wide range of
# OpenEXR versions.
#
# For OpenEXR & Imath 3.0, this will establish the following imported
# For OpenEXR & Imath 3.x, this will establish the following imported
# targets:
#
# Imath::Imath
@@ -20,14 +24,12 @@
# IlmBase::IlmThread
# OpenEXR::IlmImf
#
# For all versions -- but for OpenEXR < 2.4 the only thing this sets --
# are the following CMake variables:
# For all version, the following CMake variables:
#
# OPENEXR_FOUND true, if found
# OPENEXR_INCLUDES directory where OpenEXR headers are found
# OPENEXR_LIBRARIES libraries for OpenEXR + IlmBase
# OPENEXR_VERSION OpenEXR version (accurate for >= 2.0.0,
# otherwise will just guess 1.6.1)
# OPENEXR_VERSION OpenEXR version
# IMATH_INCLUDES directory where Imath headers are found
# ILMBASE_INCLUDES directory where IlmBase headers are found
# ILMBASE_LIBRARIES libraries just IlmBase
@@ -107,162 +109,4 @@ elseif (TARGET OpenEXR::IlmImf AND TARGET IlmBase::Imath AND
string(REGEX REPLACE "include/OpenEXR$" "include" IMATH_INCLUDES "${IMATH_INCLUDES}")
string(REGEX REPLACE "include/OpenEXR$" "include" OPENEXR_INCLUDES "${OPENEXR_INCLUDES}")
else ()
# OpenEXR 2.x older versions without a config or whose configs we don't
# trust.
set (FOUND_OPENEXR_WITH_CONFIG 0)
# Other standard issue macros
include (FindPackageHandleStandardArgs)
include (SelectLibraryConfigurations)
find_package (ZLIB REQUIRED)
# Link with pthreads if required
find_package (Threads)
if (CMAKE_USE_PTHREADS_INIT)
set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
endif ()
# Attempt to find OpenEXR with pkgconfig
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
if (NOT Ilmbase_ROOT AND NOT ILMBASE_ROOT
AND NOT DEFINED ENV{Ilmbase_ROOT} AND NOT DEFINED ENV{ILMBASE_ROOT})
pkg_check_modules(_ILMBASE QUIET IlmBase>=2.0.0)
endif ()
if (NOT OpenEXR_ROOT AND NOT OPENEXR_ROOT
AND NOT DEFINED ENV{OpenEXR_ROOT} AND NOT DEFINED ENV{OPENEXR_ROOT})
pkg_check_modules(_OPENEXR QUIET OpenEXR>=2.0.0)
endif ()
endif (PKG_CONFIG_FOUND)
# List of likely places to find the headers -- note priority override of
# ${OPENEXR_ROOT}/include.
# ILMBASE is needed in case ilmbase an openexr are installed in separate
# directories, like NixOS does
set (GENERIC_INCLUDE_PATHS
${OPENEXR_ROOT}/include
$ENV{OPENEXR_ROOT}/include
${ILMBASE_ROOT}/include
$ENV{ILMBASE_ROOT}/include
${_ILMBASE_INCLUDEDIR}
${_OPENEXR_INCLUDEDIR}
/usr/local/include
/usr/include
/usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/include
/opt/local/include )
# Find the include file locations.
find_path (ILMBASE_INCLUDE_PATH OpenEXR/IlmBaseConfig.h
HINTS ${ILMBASE_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}
${GENERIC_INCLUDE_PATHS} )
find_path (OPENEXR_INCLUDE_PATH OpenEXR/OpenEXRConfig.h
HINTS ${OPENEXR_INCLUDE_DIR}
${GENERIC_INCLUDE_PATHS} )
# Try to figure out version number
if (DEFINED _OPENEXR_VERSION AND NOT "${_OPENEXR_VERSION}" STREQUAL "")
set (OPENEXR_VERSION "${_OPENEXR_VERSION}")
set (OpenEXR_VERSION "${_OPENEXR_VERSION}")
string (REGEX REPLACE "([0-9]+)\\.[0-9\\.]+" "\\1" OpenEXR_VERSION_MAJOR "${_OPENEXR_VERSION}")
string (REGEX REPLACE "[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" OpenEXR_VERSION_MINOR "${_OPENEXR_VERSION}")
elseif (EXISTS "${OPENEXR_INCLUDE_PATH}/OpenEXR/ImfMultiPartInputFile.h")
# Must be at least 2.0
file(STRINGS "${OPENEXR_INCLUDE_PATH}/OpenEXR/OpenEXRConfig.h" TMP REGEX "^#define OPENEXR_VERSION_STRING .*$")
string (REGEX MATCHALL "[0-9]+[.0-9]+" OpenEXR_VERSION ${TMP})
file(STRINGS "${OPENEXR_INCLUDE_PATH}/OpenEXR/OpenEXRConfig.h" TMP REGEX "^#define OPENEXR_VERSION_MAJOR .*$")
string (REGEX MATCHALL "[0-9]+" OpenEXR_VERSION_MAJOR ${TMP})
file(STRINGS "${OPENEXR_INCLUDE_PATH}/OpenEXR/OpenEXRConfig.h" TMP REGEX "^#define OPENEXR_VERSION_MINOR .*$")
string (REGEX MATCHALL "[0-9]+" OpenEXR_VERSION_MINOR ${TMP})
else ()
# Assume an old one, predates 2.x that had versions
set (OPENEXR_VERSION 1.6.1)
set (OpenEXR_VERSION 1.6.1)
set (OpenEXR_VERSION_MAJOR 1)
set (OpenEXR_VERSION_MINOR 6)
endif ()
# List of likely places to find the libraries -- note priority override of
# ${OPENEXR_ROOT}/lib.
set (GENERIC_LIBRARY_PATHS
${OPENEXR_ROOT}/lib
${ILMBASE_ROOT}/lib
${OPENEXR_INCLUDE_PATH}/../lib
${ILMBASE_INCLUDE_PATH}/../lib
${_ILMBASE_LIBDIR}
${_OPENEXR_LIBDIR}
/usr/local/lib
/usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/usr/lib
/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
/sw/lib
/opt/local/lib
$ENV{PROGRAM_FILES}/OpenEXR/lib/static )
# message (STATUS "Generic lib paths: ${GENERIC_LIBRARY_PATHS}")
# Handle request for static libs by altering CMAKE_FIND_LIBRARY_SUFFIXES.
# We will restore it at the end of this file.
set (_openexr_orig_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
if (OpenEXR_USE_STATIC_LIBS)
if (WIN32)
set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
else ()
set (CMAKE_FIND_LIBRARY_SUFFIXES .a)
endif ()
endif ()
# Look for the libraries themselves, for all the components.
# This is complicated because the OpenEXR libraries may or may not be
# built with version numbers embedded.
set (_openexr_components IlmThread IlmImf Imath Iex Half)
foreach (COMPONENT ${_openexr_components})
string (TOUPPER ${COMPONENT} UPPERCOMPONENT)
# First try with the version embedded
find_library (OPENEXR_${UPPERCOMPONENT}_LIBRARY
NAMES ${COMPONENT}-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}
${COMPONENT}
${COMPONENT}-${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}_d
${COMPONENT}_d
HINTS ${OPENEXR_LIBRARY_DIR} $ENV{OPENEXR_LIBRARY_DIR}
${GENERIC_LIBRARY_PATHS} )
endforeach ()
find_package_handle_standard_args (OpenEXR
REQUIRED_VARS ILMBASE_INCLUDE_PATH OPENEXR_INCLUDE_PATH
OPENEXR_IMATH_LIBRARY OPENEXR_ILMIMF_LIBRARY
OPENEXR_IEX_LIBRARY OPENEXR_HALF_LIBRARY
)
if (OPENEXR_FOUND)
set (OPENEXR_VERSION_MAJOR ${OpenEXR_VERSION_MAJOR})
set (OPENEXR_VERSION_MINOR ${OpenEXR_VERSION_MINOR})
set (Imath_VERSION_MAJOR ${OpenEXR_VERSION_MAJOR})
set (Imath_VERSION_MINOR ${OpenEXR_VERSION_MINOR})
set (ILMBASE_FOUND TRUE)
set (ILMBASE_INCLUDES ${ILMBASE_INCLUDE_PATH})
set (IMATH_INCLUDES ${ILMBASE_INCLUDE_PATH})
set (OPENEXR_INCLUDES ${OPENEXR_INCLUDE_PATH})
set (ILMBASE_INCLUDE_DIR ${ILMBASE_INCLUDE_PATH})
set (IMATH_INCLUDE_DIR ${ILMBASE_INCLUDE_PATH})
set (OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_PATH})
set (ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase")
set (OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} ${ZLIB_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR")
set (FINDOPENEXR_FALLBACK TRUE)
endif ()
mark_as_advanced(
OPENEXR_ILMIMF_LIBRARY
OPENEXR_IMATH_LIBRARY
OPENEXR_IEX_LIBRARY
OPENEXR_HALF_LIBRARY
OPENEXR_VERSION)
# Restore the original CMAKE_FIND_LIBRARY_SUFFIXES
set (CMAKE_FIND_LIBRARY_SUFFIXES ${_openexr_orig_suffixes})
endif ()
+4
View File
@@ -1,3 +1,7 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
# https://github.com/OpenImageIO/oiio
# Module to find OpenJpeg.
#
# This module will first look into the directories defined by the variables:
+2
View File
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# - Find OPENVDB library
# Find the native OPENVDB includes and library
# This module defines
+4
View File
@@ -1,3 +1,7 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# - Try to find R3D SDK
#
# Set R3DSDK_ROOT Environment variable to root of the SDK
+4
View File
@@ -1,5 +1,9 @@
# Find Robinmap
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
#
# Sets the usual variables expected for find_package scripts:
#
# ROBINMAP_INCLUDES - header location
+12 -8
View File
@@ -1,5 +1,9 @@
# Module to find Webp
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
#
# This module will first look into the directories defined by the variables:
# - Webp_ROOT, WEBP_INCLUDE_PATH, WEBP_LIBRARY_PATH
#
@@ -40,18 +44,18 @@ if (WebP_FOUND)
set (WEBP_INCLUDES "${WEBP_INCLUDE_DIR}")
set (WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY})
if (NOT TARGET WebP::WebP)
add_library(WebP::WebP UNKNOWN IMPORTED)
set_target_properties(WebP::WebP PROPERTIES
if (NOT TARGET WebP::webp)
add_library(WebP::webp UNKNOWN IMPORTED)
set_target_properties(WebP::webp PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${WEBP_INCLUDES})
set_property(TARGET WebP::WebP APPEND PROPERTY
set_property(TARGET WebP::webp APPEND PROPERTY
IMPORTED_LOCATION ${WEBP_LIBRARY})
endif ()
if (NOT TARGET WebP::WebPDemux)
add_library(WebP::WebPDemux UNKNOWN IMPORTED)
set_target_properties(WebP::WebPDemux PROPERTIES
if (NOT TARGET WebP::webpdemux)
add_library(WebP::webpdemux UNKNOWN IMPORTED)
set_target_properties(WebP::webpdemux PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${WEBP_INCLUDES})
set_property(TARGET WebP::WebPDemux APPEND PROPERTY
set_property(TARGET WebP::webpdemux APPEND PROPERTY
IMPORTED_LOCATION ${WEBPDEMUX_LIBRARY})
endif ()
endif ()
+4
View File
@@ -1,5 +1,9 @@
# Find fmt library
#
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
#
# Sets the usual variables expected for find_package scripts:
#
# FMT_INCLUDES - header location
+2 -4
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Find the pugixml XML parsing library.
@@ -16,9 +16,7 @@ find_package (pugixml CONFIG)
if (TARGET pugixml::pugixml)
# New pugixml (>= 1.11) has nice config files we can rely on and makes a
# pugixml::pugixml target.
if (VERBOSE)
message (STATUS "Found CONFIG for pugixml (>=1.11)")
endif ()
message (VERBOSE "Found CONFIG for pugixml (>=1.11)")
set (PUGIXML_FOUND true)
set (pugixml_FOUND true)
+1 -1
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio/
#########################################################################
+6 -10
View File
@@ -1,5 +1,5 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
# Python-related options.
@@ -52,11 +52,9 @@ macro (find_python)
if (NOT DEFINED PYTHON_SITE_DIR)
set (PYTHON_SITE_DIR "${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_FOUND}/site-packages/OpenImageIO")
endif ()
if (VERBOSE)
message (STATUS " Python site packages dir ${PYTHON_SITE_DIR}")
message (STATUS " Python to include 'lib' prefix: ${PYLIB_LIB_PREFIX}")
message (STATUS " Python to include SO version: ${PYLIB_INCLUDE_SONAME}")
endif ()
message (VERBOSE " Python site packages dir ${PYTHON_SITE_DIR}")
message (VERBOSE " Python to include 'lib' prefix: ${PYLIB_LIB_PREFIX}")
message (VERBOSE " Python to include SO version: ${PYLIB_INCLUDE_SONAME}")
endmacro()
@@ -114,9 +112,7 @@ macro (setup_python_module)
# This is only needed for SpComp2
if (PYLIB_INCLUDE_SONAME)
if (VERBOSE)
message(STATUS "Setting Py${lib_MODULE} SOVERSION to: ${SOVERSION}")
endif ()
message(VERBOSE "Setting Py${lib_MODULE} SOVERSION to: ${SOVERSION}")
set_target_properties(${target_name} PROPERTIES
VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
SOVERSION ${SOVERSION} )
+27 -15
View File
@@ -1,5 +1,5 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio/
include (CTest)
@@ -125,9 +125,7 @@ macro (oiio_add_tests)
endif()
endforeach ()
if (VERBOSE)
message (STATUS "TESTS: ${_ats_UNPARSED_ARGUMENTS}")
endif ()
message (VERBOSE "TESTS: ${_ats_UNPARSED_ARGUMENTS}")
endif ()
endmacro ()
@@ -141,6 +139,7 @@ macro (oiio_add_all_tests)
# Freestanding tests:
oiio_add_tests (
cmake-consumer
docs-examples-cpp
iinfo igrep
nonwhole-tiles
oiiotool
@@ -186,6 +185,7 @@ macro (oiio_add_all_tests)
texture-stats
texture-threadtimes
texture-env
texture-colorspace
)
oiio_add_tests (${all_texture_tests})
# Duplicate texture tests with batch mode
@@ -209,6 +209,7 @@ macro (oiio_add_all_tests)
# libraries to run correctly.
if (USE_PYTHON AND NOT BUILD_OIIOUTIL_ONLY AND NOT SANITIZE)
oiio_add_tests (
docs-examples-python
python-colorconfig
python-deep
python-imagebuf
@@ -275,12 +276,18 @@ macro (oiio_add_all_tests)
set (all_openexr_tests
openexr-suite openexr-multires openexr-chroma
openexr-v2 openexr-window perchannel oiiotool-deep)
if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.1.10)
# OpenEXR 3.1.10 is the first release where the exr core library
# properly supported all compression types (DWA in particular).
list (APPEND all_openexr_tests openexr-compression)
endif ()
# Run all OpenEXR tests without core library
oiio_add_tests (${all_openexr_tests}
ENVIRONMENT OPENIMAGEIO_OPTIONS=openexr:core=0
IMAGEDIR openexr-images
URL http://github.com/AcademySoftwareFoundation/openexr-images)
# For OpenEXR >= 3.1, be sure to test with the core option on
if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.1)
# For OpenEXR >= 3.1, be sure to test with the core option on
oiio_add_tests (${all_openexr_tests}
SUFFIX ".core"
ENVIRONMENT OPENIMAGEIO_OPTIONS=openexr:core=1
@@ -360,15 +367,19 @@ function (oiio_get_test_data name)
# Arguments: <prefix> <options> <one_value_keywords> <multi_value_keywords> args...
if (IS_DIRECTORY "${OIIO_LOCAL_TESTDATA_ROOT}/${name}"
AND NOT EXISTS "${CMAKE_BINARY_DIR}/testsuite/${name}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
# Just make a link if we can
message (STATUS "Linking ${name} from ${OIIO_LOCAL_TESTDATA_ROOT}/../${name}")
file (CREATE_LINK "${OIIO_LOCAL_TESTDATA_ROOT}/${name}"
"${CMAKE_BINARY_DIR}/testsuite/${name}"
SYMBOLIC COPY_ON_ERROR)
else ()
# Older cmake -- copy
message (STATUS "Copying ${name} from ${OIIO_LOCAL_TESTDATA_ROOT}/../${name}")
set (_ogtd_LINK_RESULT "")
message (STATUS "Linking ${name} from ${OIIO_LOCAL_TESTDATA_ROOT}/${name}")
file (CREATE_LINK "${OIIO_LOCAL_TESTDATA_ROOT}/${name}"
"${CMAKE_BINARY_DIR}/testsuite/${name}"
SYMBOLIC RESULT _ogtd_LINK_RESULT)
# Note: Using 'COPY_ON_ERROR' in the above command should have prevented the need to
# have the manual fall-back below. However, there's been at least one case where a user
# noticed that copying did not happen if creating the link failed (CMake 3.24). We can
# adjust this in the future if CMake behavior improves.
message (VERBOSE "Link result ${_ogtd_LINK_RESULT}")
if (NOT _ogtd_LINK_RESULT EQUAL 0)
# Older cmake or failure to link -- copy
message (STATUS "Copying ${name} from ${OIIO_LOCAL_TESTDATA_ROOT}/${name}")
file (COPY "${OIIO_LOCAL_TESTDATA_ROOT}/${name}"
DESTINATION "${CMAKE_BINARY_DIR}/testsuite")
endif ()
@@ -397,7 +408,8 @@ function (oiio_setup_test_data)
oiio_get_test_data (oiio-images
REPO https://github.com/OpenImageIO/oiio-images.git)
oiio_get_test_data (openexr-images
REPO https://github.com/AcademySoftwareFoundation/openexr-images.git)
REPO https://github.com/AcademySoftwareFoundation/openexr-images.git
BRANCH main)
oiio_get_test_data (fits-images)
oiio_get_test_data (j2kp4files_v1_5)
endfunction ()
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
add_oiio_plugin (ddsinput.cpp)
+6 -2
View File
@@ -1,10 +1,14 @@
// Copyright 2008-present Contributors to the OpenImageIO project.
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenImageIO project.
// SPDX-License-Identifier: Apache-2.0
// https://github.com/OpenImageIO/oiio
#pragma once
// Some documentation for the DDS format:
// https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dx-graphics-dds-pguide
// https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dx-graphics-dds-reference
OIIO_PLUGIN_NAMESPACE_BEGIN
+40 -14
View File
@@ -1,5 +1,5 @@
// Copyright 2008-present Contributors to the OpenImageIO project.
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenImageIO project.
// SPDX-License-Identifier: Apache-2.0
// https://github.com/OpenImageIO/oiio
#include <cmath>
@@ -37,6 +37,7 @@ public:
{
return feature == "ioproxy";
}
bool valid_file(Filesystem::IOProxy* ioproxy) const override;
bool open(const std::string& name, ImageSpec& newspec) override;
bool open(const std::string& name, ImageSpec& spec,
const ImageSpec& config) override;
@@ -101,6 +102,8 @@ private:
/// Helper function: performs the actual pixel decoding.
bool internal_readimg(unsigned char* dst, int w, int h, int d);
static bool validate_signature(uint32_t signature);
};
static TypeDesc::BASETYPE
@@ -114,12 +117,12 @@ GetBaseType(Compression cmp)
static int
GetChannelCount(Compression cmp, bool isNormal)
{
if (isNormal)
return 3;
if (cmp == Compression::DXT5)
return isNormal ? 3 : 4;
if (cmp == Compression::BC5)
return isNormal ? 3 : 2;
if (cmp == Compression::BC4)
return 1;
if (cmp == Compression::BC5)
return 2;
if (cmp == Compression::BC6HU || cmp == Compression::BC6HS)
return 3;
return 4;
@@ -316,6 +319,27 @@ OIIO_PLUGIN_EXPORTS_END
bool
DDSInput::validate_signature(uint32_t signature)
{
return signature == DDS_MAKE4CC('D', 'D', 'S', ' ');
}
bool
DDSInput::valid_file(Filesystem::IOProxy* ioproxy) const
{
if (!ioproxy || ioproxy->mode() != Filesystem::IOProxy::Mode::Read)
return false;
uint32_t magic {};
const size_t numRead = ioproxy->pread(&magic, sizeof(magic), 0);
return numRead == sizeof(magic) && validate_signature(magic);
}
bool
DDSInput::open(const std::string& name, ImageSpec& newspec,
const ImageSpec& config)
@@ -379,7 +403,7 @@ DDSInput::open(const std::string& name, ImageSpec& newspec)
// sanity checks - valid 4CC, correct struct sizes and flags which should
// be always present, regardless of the image type, size etc., also check
// for impossible flag combinations
if (m_dds.fourCC != DDS_MAKE4CC('D', 'D', 'S', ' ') || m_dds.size != 124
if (!validate_signature(m_dds.fourCC) || m_dds.size != 124
|| m_dds.fmt.size != 32 || !(m_dds.caps.flags1 & DDS_CAPS1_TEXTURE)
|| !(m_dds.flags & DDS_CAPS) || !(m_dds.flags & DDS_PIXELFORMAT)
|| (m_dds.caps.flags2 & DDS_CAPS2_VOLUME
@@ -764,13 +788,15 @@ DDSInput::internal_readimg(unsigned char* dst, int w, int h, int d)
int k;
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
k = (y * w + x) * 4;
dst[k + 0] = (unsigned char)((int)dst[k + 0] * 255
/ (int)dst[k + 3]);
dst[k + 1] = (unsigned char)((int)dst[k + 1] * 255
/ (int)dst[k + 3]);
dst[k + 2] = (unsigned char)((int)dst[k + 2] * 255
/ (int)dst[k + 3]);
k = (y * w + x) * 4;
if (dst[k + 3]) {
dst[k + 0] = (unsigned char)((int)dst[k + 0] * 255
/ (int)dst[k + 3]);
dst[k + 1] = (unsigned char)((int)dst[k + 1] * 255
/ (int)dst[k + 3]);
dst[k + 2] = (unsigned char)((int)dst[k + 2] * 255
/ (int)dst[k + 3]);
}
}
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
# Copyright 2008-present Contributors to the OpenImageIO project.
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/OpenImageIO/oiio
if (DCMTK_FOUND)
+2 -2
View File
@@ -1,5 +1,5 @@
// Copyright 2008-present Contributors to the OpenImageIO project.
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenImageIO project.
// SPDX-License-Identifier: Apache-2.0
// https://github.com/OpenImageIO/oiio
#include <OpenImageIO/fmath.h>

Some files were not shown because too many files have changed in this diff Show More