docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class OiioWrapper

    Class containing bindings for IO operations using OpenImageIO library

    Inheritance
    object
    OiioWrapper
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.Bindings.OpenImageIO
    Assembly: Unity.Bindings.OpenImageIO.Editor.dll
    Syntax
    public class OiioWrapper

    Methods

    FreeAllocatedMemory(SubImagesList)

    Frees the memory allocated for the SubImagesList passed.

    Declaration
    public static extern int FreeAllocatedMemory(OiioWrapper.SubImagesList list)
    Parameters
    Type Name Description
    OiioWrapper.SubImagesList list

    SubImagesList representing information to clear.

    Returns
    Type Description
    int

    Zero (0) if successful.

    IntPtrToManagedArray<T>(IntPtr, uint)

    Reads an IntPtr into an Array of structs of length arrayCount.

    Declaration
    public static T[] IntPtrToManagedArray<T>(IntPtr pointerToArr, uint arrayCount) where T : struct
    Parameters
    Type Name Description
    IntPtr pointerToArr

    IntPtr pointing to the data to read.

    uint arrayCount

    Number of items in the array.

    Returns
    Type Description
    T[]

    An array of type T structs.

    Type Parameters
    Name Description
    T

    Type of struct for the array.

    ReadImage(FixedString4096Bytes)

    Reads an image from its file name.

    Declaration
    public static extern OiioWrapper.SubImagesList ReadImage(FixedString4096Bytes filePath)
    Parameters
    Type Name Description
    FixedString4096Bytes filePath

    Path of the file to read.

    Returns
    Type Description
    OiioWrapper.SubImagesList

    A SubImagesList with the information of the file.

    Tex2DFromImageHeader(ImageHeader)

    Reads an ImageHeader and returns it as a Texture2D.

    Declaration
    public static Texture2D Tex2DFromImageHeader(OiioWrapper.ImageHeader subImgHeader)
    Parameters
    Type Name Description
    OiioWrapper.ImageHeader subImgHeader

    ImageHeader describing image to read.

    Returns
    Type Description
    Texture2D

    A Texture2D based on the passed ImageHeader.

    Exceptions
    Type Condition
    Exception

    Throws if number of channels is not supported.

    WriteImage(FixedString4096Bytes, uint, ImageHeader*)

    Writes an image to the specified file name.

    Declaration
    public static extern int WriteImage(FixedString4096Bytes filePath, uint nImages, OiioWrapper.ImageHeader* headers)
    Parameters
    Type Name Description
    FixedString4096Bytes filePath

    Path of the file to write.

    uint nImages

    Number of sub-images in this file.

    ImageHeader* headers

    Pointer to ImageHeaders for the file to write.

    Returns
    Type Description
    int

    An integer representing the return code

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)