<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.image.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.imagedestroy.php',
    1 => 'imagedestroy',
    2 => 'L&ouml;scht ein Bild',
  ),
  'up' => 
  array (
    0 => 'ref.image.php',
    1 => 'GD- und Image-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.imagedashedline.php',
    1 => 'imagedashedline',
  ),
  'next' => 
  array (
    0 => 'function.imageellipse.php',
    1 => 'imageellipse',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/image/functions/imagedestroy.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imagedestroy" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imagedestroy</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imagedestroy</span> &mdash; <span class="dc-title">Löscht ein Bild</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.imagedestroy-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imagedestroy</strong></span>(<span class="methodparam"><span class="type"><a href="class.gdimage.php" class="type GdImage">GdImage</a></span> <code class="parameter">$image</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <blockquote class="note"><p><strong class="note">Hinweis</strong>: 
 <p class="para">
  Diese Funktion hat keine Auswirkung. Vor PHP 8.0.0 wurde sie verwendet, um die Ressource zu schließen.
 </p>
</p></blockquote>

  <p class="para">
   Vor PHP 8.0.0 gibt <span class="function"><strong>imagedestroy()</strong></span> den durch die
   <code class="parameter">image</code>-Ressource belegten Speicher wieder frei. Seit
   PHP 8.0.0 verwendet die GD-Erweiterung Objekte anstelle von Ressourcen, und
   Objekte können nicht explizit geschlossen werden.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.imagedestroy-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">image</code></dt><dd><p class="para">Ein <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span>-Objekt, das von einer der Funktionen zur Bilderzeugung, z. B.
<span class="function"><a href="function.imagecreatetruecolor.php" class="function">imagecreatetruecolor()</a></span>, zurückgegeben wurde.</p></dd>
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.imagedestroy-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imagedestroy-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       Diese Funktion ist jetzt ein <abbr>NOP</abbr>.
      </td>
     </tr>

     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">image</code> erwartet nun eine
  <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span>-Instanz; vorher wurde eine gültige
  <code class="literal">gd</code>-<span class="type">Ressource</span> erwartet.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.imagedestroy-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 Verwendung von <span class="function"><strong>imagedestroy()</strong></span> vor PHP 8.0.0</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// erzeuge ein 100 x 100 Bild<br /></span><span style="color: #0000BB">$im </span><span style="color: #007700">= </span><span style="color: #0000BB">imagecreatetruecolor</span><span style="color: #007700">(</span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// verändere oder speichere das Bild<br /><br />// gibt den durch das Bild belegten Speicher frei<br /></span><span style="color: #0000BB">imagedestroy</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


</div><?php manual_footer($setup); ?>