# CSJ2K.j2k.codestream.writer.HeaderEncoder.writeCOD

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_codestream_writer_HeaderEncoder_writeCOD_" data-uid="CSJ2K.j2k.codestream.writer.HeaderEncoder.writeCOD*">writeCOD Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_codestream_writer_HeaderEncoder_writeCOD_" data-uid="CSJ2K.j2k.codestream.writer.HeaderEncoder.writeCOD*"></a>
<h4 id="CSJ2K_j2k_codestream_writer_HeaderEncoder_writeCOD_System_Boolean_System_Int32_" data-uid="CSJ2K.j2k.codestream.writer.HeaderEncoder.writeCOD(System.Boolean,System.Int32)">writeCOD(bool, int)</h4>
<div class="markdown level1 summary"><p>Writes COD marker segment. COD is a functional marker segment
containing the code style default (coding style, decomposition,
layering) used for compressing all the components in an image.</p>
<pre><code>       &lt;p&gt;The values can be overriden for an individual component by a COC
       marker in either the main or the tile header.&lt;/p&gt;
</code></pre>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected virtual void writeCOD(bool mh, int tileIdx)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overridable Sub writeCOD(mh As Boolean, tileIdx As Integer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">mh</span></td>
      <td><p>Flag indicating whether this marker belongs to the main
header</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">tileIdx</span></td>
      <td><p>Tile index if the marker belongs to a tile-part header</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="CSJ2K_j2k_codestream_writer_HeaderEncoder_writeCOD_System_Boolean_System_Int32__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="CSJ2K.j2k.codestream.writer.HeaderEncoder.writeCOC.html#CSJ2K_j2k_codestream_writer_HeaderEncoder_writeCOC_System_Boolean_System_Int32_System_Int32_">writeCOC</a>(<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a>)</div>
</div>
</div>
