# GrapeCity.Documents.Word.EmbeddedImageData.SetImage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Word_EmbeddedImageData_SetImage_" data-uid="GrapeCity.Documents.Word.EmbeddedImageData.SetImage*">SetImage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Word_EmbeddedImageData_SetImage_" data-uid="GrapeCity.Documents.Word.EmbeddedImageData.SetImage*"></a>
<h4 id="GrapeCity_Documents_Word_EmbeddedImageData_SetImage_System_Uri_System_String_" data-uid="GrapeCity.Documents.Word.EmbeddedImageData.SetImage(System.Uri,System.String)">SetImage(Uri, string)</h4>
<div class="markdown level1 summary"><p>Sets the image that is displayed by the picture.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual void SetImage(Uri uri, string contentType)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Sub SetImage(uri As Uri, contentType As String)</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><span class="xref">Uri</span></td>
      <td><span class="parametername">uri</span></td>
      <td><p>The URI to the image file.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">contentType</span></td>
      <td><p>The content type of the image data.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Word_EmbeddedImageData_SetImage_" data-uid="GrapeCity.Documents.Word.EmbeddedImageData.SetImage*"></a>
<h4 id="GrapeCity_Documents_Word_EmbeddedImageData_SetImage_System_IO_Stream_System_String_" data-uid="GrapeCity.Documents.Word.EmbeddedImageData.SetImage(System.IO.Stream,System.String)">SetImage(Stream, string)</h4>
<div class="markdown level1 summary"><p>Sets the image that is displayed by the picture.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetImage(Stream stream, string contentType)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetImage(stream As Stream, contentType As String)</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.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>The stream that contains the image.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">contentType</span></td>
      <td><p>The content type of the image data.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Word_EmbeddedImageData_SetImage_" data-uid="GrapeCity.Documents.Word.EmbeddedImageData.SetImage*"></a>
<h4 id="GrapeCity_Documents_Word_EmbeddedImageData_SetImage_System_Byte___System_String_" data-uid="GrapeCity.Documents.Word.EmbeddedImageData.SetImage(System.Byte[],System.String)">SetImage(byte[], string)</h4>
<div class="markdown level1 summary"><p>Sets the image that is displayed by the picture.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual void SetImage(byte[] bytes, string contentType)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Sub SetImage(bytes As Byte(), contentType As String)</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.byte">byte</a>[]</td>
      <td><span class="parametername">bytes</span></td>
      <td><p>The byte array of the image.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">contentType</span></td>
      <td><p>The content type of the image data.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Word_EmbeddedImageData_SetImage_" data-uid="GrapeCity.Documents.Word.EmbeddedImageData.SetImage*"></a>
<h4 id="GrapeCity_Documents_Word_EmbeddedImageData_SetImage_GrapeCity_Documents_Drawing_Image_" data-uid="GrapeCity.Documents.Word.EmbeddedImageData.SetImage(GrapeCity.Documents.Drawing.Image)">SetImage(Image)</h4>
<div class="markdown level1 summary"><p>Sets the image that is displayed by the picture.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetImage(Image image)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetImage(image As Image)</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><span class="xref">Image</span></td>
      <td><span class="parametername">image</span></td>
      <td><p>The image to set.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
