This commit is contained in:
2026-06-14 19:09:18 +01:00
parent 14bd1a9271
commit 13fa90a0e9
3958 changed files with 999286 additions and 4 deletions
@@ -0,0 +1,188 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.16.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>KTX Tools Reference: ktx extract</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="ktx_logo_200.png"/></td>
<td id="projectalign">
<div id="projectname">KTX Tools Reference<span id="projectnumber">&#160;0.0.0</span>
</div>
<div id="projectbrief">Libraries and tools to create and read KTX image texture files.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.16.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(function(){initNavTree('ktx_extract.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div><div class="header">
<div class="headertitle"><div class="title">ktx extract </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Extract selected images from a KTX2 file.</p>
<h1 class="doxsection"><a class="anchor" id="ktx_extract_synopsis"></a>
SYNOPSIS</h1>
<p>ktx extract [option...] <em>input-file</em> <em>output-path</em> </p>
<h1 class="doxsection"><a class="anchor" id="ktx_extract_description"></a>
DESCRIPTION</h1>
<p><b>ktx</b> <b>extract</b> can extract one or multiple images from the KTX2 file specified as the <em>input-file</em> argument and, based on the format, save them as Raw, EXR or PNG image files to the <em>output-path</em>. If the <em>input-file</em> is '-' the file will be read from the stdin. If the <em>output-path</em> is '-' the output file will be written to the stdout. If the input file is invalid the first encountered validation error is displayed to the stderr and the command exits with the relevant non-zero status code.</p>
<p>The <em>output-path</em> is interpreted as output filepath for single and output directory for multi-image extracts. When extracting multiple images with either '&ndash;all' or any of the 'all' args the following naming is used for each output file: </p><pre>output-path/output_level{}_face{}_layer{}_depth{}.extension</pre><ul>
<li>Where the <em>_level{}</em> part is only present if the source texture has more than 1 level</li>
<li>Where the <em>_face{}</em> part is only present if the source texture is cubemap or cubemap array (Cubemap)</li>
<li>Where the <em>_layer{}</em> part is only present if the source texture is an array texture (Array)</li>
<li>Where the <em>_depth{}</em> part is only present if the source texture baseDepth is more than 1 (3D)</li>
<li>Where the <em>{}</em> is replaced with the numeric index of the given component starting from 0</li>
<li>Where the <em>extension</em> part is "raw", "png" or "exr" based on the export format<br />
Note: The inclusion of the optional parts are determined by the source texture regardless of which images are requested.</li>
</ul>
<p>For non-raw exports the output image format is chosen to be the smallest related lossless format:</p><ul>
<li>_UNORM formats exported as PNG with RGB/RGBA 8/16 bit</li>
<li>_SINT/_UINT formats exported as EXR with R/RG/RGB/RGBA Half/Float/UInt</li>
<li>_SFLOAT/_UFLOAT formats exported as EXR with R/RG/RGB/RGBA Half/Float/UInt</li>
<li>D16_UNORM exported as PNG with luminance (Gray) 16 bit</li>
<li>Other Depth/Stencil formats exported as EXR with D/S/DS Half/Float</li>
</ul>
<h1 class="doxsection"><a class="anchor" id="ktx_extract_options"></a>
OPTIONS</h1>
<p>The following options are available: </p><dl>
<dt>--transcode &lt;target&gt; </dt>
<dd>Transcode the texture to the target format before executing the extract. Requires the input file to be transcodable (it must be either BasisLZ supercompressed or has UASTC color model in the DFD). This option matches the functionality of the <a class="el" href="ktx_transcode.html" title="ktx transcode">ktx transcode</a> command. If the target option is not set the r8, rg8, rgb8 or rgba8 target will be selected based on the number of channels in the input texture. Block compressed transcode targets can only be saved in raw format. Case-insensitive. Possible options are: etc-rgb | etc-rgba | eac-r11 | eac-rg11 | bc1 | bc3 | bc4 | bc5 | bc7 | astc | r8 | rg8 | rgb8 | rgba8. etc-rgb is ETC1; etc-rgba, eac-r11 and eac-rg11 are ETC2. </dd>
</dl>
<dl>
<dt>--uri &lt;uri&gt; </dt>
<dd>KTX Fragment URI. <a href="https://registry.khronos.org/KTX/specs/2.0/ktx-frag.html">https://registry.khronos.org/KTX/specs/2.0/ktx-frag.html</a> </dd>
<dt>--level [0-9]+ | all </dt>
<dd>Level to extract. When 'all' is used every level is exported. Defaults to 0. </dd>
<dt>--layer [0-9]+ | all </dt>
<dd>Layer to extract. When 'all' is used every layer is exported. Defaults to 0. </dd>
<dt>--face [0-9]+ | all </dt>
<dd>Face to extract. When 'all' is used every face is exported. Defaults to 0. </dd>
<dt>--depth [0-9]+ | all </dt>
<dd>Depth slice to extract. When 'all' is used every depth is exported. Defaults to 0. </dd>
<dt>--all </dt>
<dd>Extract every image slice from the texture. </dd>
<dt>--raw </dt>
<dd>Extract the raw image data without any conversion. </dd>
</dl>
<dl>
<dt>-h, --help </dt>
<dd>Print this usage message and exit. </dd>
<dt>-v, --version </dt>
<dd>Print the version number of this program and exit. </dd>
</dl>
<h1 class="doxsection"><a class="anchor" id="ktx_extract_exitstatus"></a>
EXIT STATUS</h1>
<ul>
<li>0 - Success</li>
<li>1 - Command line error</li>
<li>2 - IO failure</li>
<li>3 - Invalid input file</li>
<li>4 - Runtime or library error</li>
<li>5 - Not supported state or operation</li>
<li>6 - Requested feature is not yet implemented </li>
</ul>
<h1 class="doxsection"><a class="anchor" id="ktx_extract_history"></a>
HISTORY</h1>
<dl class="section user"><dt>Version 4.0</dt><dd><ul>
<li>Initial version</li>
</ul>
</dd></dl>
<h1 class="doxsection"><a class="anchor" id="ktx_extract_author"></a>
AUTHOR</h1>
<ul>
<li>Mátyás Császár [Vader], RasterGrid www.rastergrid.com</li>
<li>Daniel Rákos, RasterGrid www.rastergrid.com </li>
</ul>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<div id="page-nav" class="page-nav-panel">
<div id="page-nav-resize-handle"></div>
<div id="page-nav-tree">
<div id="page-nav-contents">
</div><!-- page-nav-contents -->
</div><!-- page-nav-tree -->
</div><!-- page-nav -->
</div><!-- container -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated on <span class="timestamp"></span> for KTX Tools Reference by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.16.1 </li>
</ul>
</div>
</body>
</html>