forked from AcademySoftwareFoundation/OpenImageIO
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
oiiotool --dumpdata:C=name (AcademySoftwareFoundation#3136)
New ":C=name" modifier for --dumpdata will cause the dumped image data to be formatted with the syntax of a C array, that can be dropped right into source code. $ oiiotool --dumpdata:C=foo image.exr // image.exr : 256 x 256, 4 channel, float openexr float foo[256][256][4] = { { /* (0, 0): */ { 0.517036676, 0.261921108, 0.017822538, 0.912108004 }, /* (1, 0): */ { 0.653315008, 0.527794302, 0.359594107, 0.277836263 }, ... }; Without this modifier, --dumpdata will keep the same formatting it always had. This works pretty well for ordinary boring flat, single subimage, non-MIPmap images. The option should probably not be used (or at least is very unpolished) for multi-subimage, MIP-mapped, deep, or other oddball cases (but you probably don't want to shove those into a single C array anyway).
- Loading branch information
Showing
6 changed files
with
97 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters