返回顶部
o

oiiotoolOIIO工具

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.1
安全检测
已通过
279
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

oiiotool

oiiotool 技能

使用OpenImageIO的oiiotool进行命令行图像处理。这是VFX、CGI、游戏开发和摄影领域用于格式转换、色彩管理、合成和批量图像操作的行业标准工具。

安装

bash
pip install openimageio

这将同时安装oiiotool命令行工具和OpenImageIO Python模块。

验证安装:
bash
oiiotool --version
oiiotool --list-formats

OCIO / ACES 配置

oiiotool使用OpenColorIO进行色彩管理。自OCIO 2.2+起,内置ACES配置可用——无需下载配置文件:

bash

使用内置ACES CG配置(推荐大多数用户使用)


export OCIO=ocio://cg-config-latest

或在每个命令中指定

oiiotool --colorconfig ocio://cg-config-latest input.exr ...

可用的内置配置:

  • - ocio://cg-config-latest — 面向CG的配置(不含相机色彩空间,精简)。推荐使用。
  • ocio://studio-config-latest — 完整工作室配置(包含相机色彩空间)。
  • ocio://cg-config-v4.0.0aces-v2.0ocio-v2.5 — 锁定到特定版本。

对于使用自定义配置的制作工作室:
bash
export OCIO=/path/to/studio_config.ocio

查看可用配置:
bash
oiiotool --colorconfiginfo

核心概念:基于栈的处理

oiiotool在栈上从左到右处理命令:

  • - 命名文件会将其推入
  • 命令弹出输入,处理,并推入结果
  • -o将栈顶内容写入文件

bash

读取 -> 处理 -> 写入


oiiotool input.exr --resize 1920x1080 -o output.png

两张图像 -> 合成 -> 写入

oiiotool fg.exr bg.exr --over -o comp.exr

文件信息与元数据

bash

基本信息(分辨率、通道、格式)


oiiotool --info input.exr

详细信息(所有元数据)

oiiotool --info -v input.exr

像素统计(每个通道的最小值、最大值、平均值、标准差)

oiiotool --stats input.exr

使用正则表达式过滤元数据

oiiotool --info -v --metamatch camera|lens input.exr

格式转换

支持的格式:EXR、TIFF、PNG、JPEG、DPX、HDR(Radiance)、BMP、TGA、GIF、WebP、JPEG2000、PSD、ICO、FITS等。

bash

简单转换(从扩展名推断格式)


oiiotool input.exr -o output.png
oiiotool input.dpx -o output.tiff
oiiotool input.hdr -o output.exr

控制输出位深度

oiiotool input.exr -d uint8 -o output.png # 8位 oiiotool input.exr -d uint16 -o output.png # 16位 oiiotool input.exr -d half -o output.exr # 16位浮点(半精度) oiiotool input.exr -d float -o output.tiff # 32位浮点

JPEG质量

oiiotool input.exr -d uint8 --compression jpeg:95 -o output.jpg

EXR压缩类型

oiiotool input.exr --compression zip -o output.exr # 无损,通用性好 oiiotool input.exr --compression piz -o output.exr # 无损,最适合噪点/CG图像 oiiotool input.exr --compression zips -o output.exr # 无损,扫描线模式 oiiotool input.exr --compression dwaa:45 -o output.exr # 有损,文件极小

分块EXR与扫描线EXR

oiiotool input.exr --tile 64 64 -o output.exr oiiotool input.exr --scanline -o output.exr

从高位深度转换到8位时添加抖动(减少条带效应)

oiiotool input.exr -d uint8 --dither -o output.png

制作技巧:选择性通道读取

对于大型多通道EXR(beauty + depth + normals + crypto),只读取所需通道以节省内存和时间:

bash

只读取R、G、B通道(跳过depth、normals、cryptomatte等)


oiiotool -i:ch=R,G,B input.exr -o output.png

结合转换和色彩管理

oiiotool -i:ch=R,G,B input.exr --resize 1024x0 --colorconvert ACES2065-1 Rec.1886 Rec.709 - Display --compression jpeg:90 -o output.jpg

这在制作中至关重要,因为EXR文件可能有50多个通道,每个文件数百MB。

色彩管理(OCIO)

色彩空间转换

bash

在命名色彩空间之间转换


oiiotool input.exr --colorconvert ACEScg sRGB - Texture -o output.png
oiiotool input.exr --colorconvert linear srgb -o output.png
oiiotool input.exr --tocolorspace sRGB - Texture -o output.png

设置假定的输入色彩空间(不改变像素)

oiiotool input.png --iscolorspace srgb --tocolorspace linear -o linear.exr

ACES显示变换(色调映射)

查看HDR内容的正确方法。应用ACES参考渲染变换(RRT)+ 输出设备变换(ODT)以获得正确的高光衰减:

bash

sRGB显示器(最常用于网页/审阅)


oiiotool input.exr --ociodisplay sRGB - Display ACES 1.0 - SDR Video -d uint8 -o output.png

Rec.709广播

oiiotool input.exr --ociodisplay Rec.1886 Rec.709 - Display ACES 1.0 - SDR Video -d uint8 -o output.png

DCI-P3影院

oiiotool input.exr --ociodisplay P3-D65 - Display ACES 1.0 - SDR Cinema -d uint8 -o output.png

HDR(1000尼特,PQ)

oiiotool input.exr --ociodisplay Rec.2100-PQ - Display ACES 1.1 - HDR Video (1000 nits & Rec.2020 lim) -d uint16 -o output.png

无色调映射(线性到显示,无RRT——适用于比较原始值)

oiiotool input.exr --ociodisplay sRGB - Display Un-tone-mapped -d uint8 -o output.png

何时使用显示变换与colorconvert: 将HDR场景参考数据转换为显示观看时使用--ociodisplay(应用色调映射)。在工作色彩空间之间转换时使用--colorconvert(无色调映射,保持线性)。

OCIO外观与文件变换

bash

应用OCIO外观(例如,ACES色域压缩)


oiiotool input.exr --ociolook ACES 1.3 Reference Gamut Compression -o output.exr

应用基于文件的变换(3D LUT、CDL、CLF)

oiiotool input.exr --ociofiletransform my_grade.cube -o output.exr

逆变换

oiiotool input.exr --ociofiletransform:inverse=1 my_grade.cube -o output.exr

手动矩阵色彩转换

当没有OCIO或需要特定的3x3矩阵时:

bash

ACEScg到线性sRGB(逗号分隔,行优先)


oiiotool input.exr --ccmatrix 1.70505,-0.62179,-0.08326,-0.13026,1.14080,-0.01055,-0.02400,-0.12897,1.15297 -o output.exr

曝光调整

EXR存储线性光值。以档为单位的曝光是2的幂:

bash

降低曝光(变暗)——揭示HDR高光


oiiotool input.exr --mulc 0.0625 -o output.exr # -4档
oiiotool input.exr --mulc 0.0078125 -o output.exr # -7档

提高曝光(变亮)——揭示阴影

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 oiiotool-1776195202 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 oiiotool-1776195202 技能

通过命令行安装

skillhub install oiiotool-1776195202

下载

⬇ 下载 oiiotool v0.1.1(免费)

文件大小: 18.35 KB | 发布时间: 2026-4-15 11:45

v0.1.1 最新 2026-4-15 11:45
- Added metadata field for Clawdbot requirements, specifying dependencies on `oiiotool` and `python3`.
- No other functional or documentation changes.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部