# GrapeCity.Documents.Pdf.ImageOptions

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Pdf_ImageOptions" data-uid="GrapeCity.Documents.Pdf.ImageOptions" class="text-break">ImageOptions Class
</h1>
  <div class="markdown level0 summary"><p>Represents options controlling how native images are processed when inserted in a PDF file.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">ImageOptions</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Pdf.html">GrapeCity.Documents.Pdf</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Pdf.dll</h6>
  <h5 id="GrapeCity_Documents_Pdf_ImageOptions_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ImageOptions</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class ImageOptions</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Pdf_ImageOptions__ctor" data-uid="GrapeCity.Documents.Pdf.ImageOptions.#ctor">
          <a class="xref" href="GrapeCity.Documents.Pdf.ImageOptions.-ctor.html#GrapeCity_Documents_Pdf_ImageOptions__ctor">ImageOptions()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Pdf_ImageOptions_AlphaThreshold" data-uid="GrapeCity.Documents.Pdf.ImageOptions.AlphaThreshold">
          <a class="xref" href="GrapeCity.Documents.Pdf.ImageOptions.AlphaThreshold.html#GrapeCity_Documents_Pdf_ImageOptions_AlphaThreshold">AlphaThreshold</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the alpha threshold value.
If all pixels of an image with the alpha channel have alpha values greater than or equal to this value,
the alpha channel will not be saved, thus making the image and the whole PDF smaller.
The default is 0xFF (i.e. all transparency is preserved).
This property is ignored if <a class="xref" href="GrapeCity.Documents.Pdf.ImageOptions.SaveAllImagesAsJpeg.html#GrapeCity_Documents_Pdf_ImageOptions_SaveAllImagesAsJpeg">SaveAllImagesAsJpeg</a> is true.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Pdf_ImageOptions_CompressColors" data-uid="GrapeCity.Documents.Pdf.ImageOptions.CompressColors">
          <a class="xref" href="GrapeCity.Documents.Pdf.ImageOptions.CompressColors.html#GrapeCity_Documents_Pdf_ImageOptions_CompressColors">CompressColors</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether to apply a slight compression to color values.
Unlike JPEG, this preserves transparency while still reducing the image size.
The default is false.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Pdf_ImageOptions_Format" data-uid="GrapeCity.Documents.Pdf.ImageOptions.Format">
          <a class="xref" href="GrapeCity.Documents.Pdf.ImageOptions.Format.html#GrapeCity_Documents_Pdf_ImageOptions_Format">Format</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the format to use when saving images.
This property does not affect images added as <a class="xref" href="GrapeCity.Documents.Pdf.RawImage.html">RawImage</a>.</p>
<p>The default is <a class="xref" href="GrapeCity.Documents.Pdf.ImageOptions.ImageFormat.html#GrapeCity_Documents_Pdf_ImageOptions_ImageFormat_Auto">Auto</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Pdf_ImageOptions_JpegQuality" data-uid="GrapeCity.Documents.Pdf.ImageOptions.JpegQuality">
          <a class="xref" href="GrapeCity.Documents.Pdf.ImageOptions.JpegQuality.html#GrapeCity_Documents_Pdf_ImageOptions_JpegQuality">JpegQuality</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the JPEG image quality, in percent.
This value must be between 0 (lowest quality, maximum compression) to 100 (highest quality, no compression).
The default is 75.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Pdf_ImageOptions_SaveAllImagesAsJpeg" data-uid="GrapeCity.Documents.Pdf.ImageOptions.SaveAllImagesAsJpeg">
          <a class="xref" href="GrapeCity.Documents.Pdf.ImageOptions.SaveAllImagesAsJpeg.html#GrapeCity_Documents_Pdf_ImageOptions_SaveAllImagesAsJpeg">SaveAllImagesAsJpeg</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether all images should be converted to JPEG format
when added to the PDF. The default is false.
Note that any transparency (if present in the original image) is lost if this property is set to true.
This property does not affect images added as <a class="xref" href="GrapeCity.Documents.Pdf.RawImage.html">RawImage</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Pdf_ImageOptions_AssignFrom_GrapeCity_Documents_Pdf_ImageOptions_" data-uid="GrapeCity.Documents.Pdf.ImageOptions.AssignFrom(GrapeCity.Documents.Pdf.ImageOptions)">
          <a class="xref" href="GrapeCity.Documents.Pdf.ImageOptions.AssignFrom.html#GrapeCity_Documents_Pdf_ImageOptions_AssignFrom_GrapeCity_Documents_Pdf_ImageOptions_">AssignFrom(ImageOptions)</a>
        </td>
        <td class="markdown level1 summary"><p>Copies all property values from another object.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Pdf_ImageOptions_Reset" data-uid="GrapeCity.Documents.Pdf.ImageOptions.Reset">
          <a class="xref" href="GrapeCity.Documents.Pdf.ImageOptions.Reset.html#GrapeCity_Documents_Pdf_ImageOptions_Reset">Reset()</a>
        </td>
        <td class="markdown level1 summary"><p>Resets all properties to their default values.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
