<?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 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.image2wbmp.php',
    1 => 'image2wbmp',
    2 => 'Вивід зображення в браузер чи файл.',
  ),
  'up' => 
  array (
    0 => 'ref.image.php',
    1 => 'Функції GD та Image',
  ),
  'prev' => 
  array (
    0 => 'function.image-type-to-mime-type.php',
    1 => 'image_type_to_mime_type',
  ),
  'next' => 
  array (
    0 => 'function.imageaffine.php',
    1 => 'imageaffine',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/image/functions/image2wbmp.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.image2wbmp" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">image2wbmp</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">image2wbmp</span> &mdash; <span class="dc-title">Вивід зображення в браузер чи файл.</span></p>

 </div>

 <div id="function.image2wbmp-refsynopsisdiv">
  <div class="warning"><strong class="warning">Увага</strong><p class="simpara">Ця функція
<em>ЗАСТАРІЛА</em>, починаючи з PHP 7.3.0, та
<em>ВИЛУЧЕНА</em> в PHP 8.0.0. Вкрай не рекомендується на неї
покладатися.</p></div>
 </div>

 <div class="refsect1 description" id="refsect1-function.image2wbmp-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>image2wbmp</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$image</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$filename</code><span class="initializer"> = ?</span></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$foreground</code><span class="initializer"> = ?</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>image2wbmp()</strong></span> outputs or save a <abbr title="Wireless Bitmap">WBMP</abbr>
   version of the given <code class="parameter">image</code>. 
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.image2wbmp-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">image</code></dt>
     <dd>
      <p class="para">
       An image resource, returned by one of the image creation functions,
       such as <span class="function"><a href="function.imagecreatetruecolor.php" class="function">imagecreatetruecolor()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">filename</code></dt>
     <dd>
      <p class="para">
       Path to the saved file. If not given, the raw image stream will be
       output directly.
      </p>
     </dd>
    
    
     <dt><code class="parameter">foreground</code></dt>
     <dd>
      <p class="para">
       You can set the foreground color with this parameter by setting an
       identifier obtained from <span class="function"><a href="function.imagecolorallocate.php" class="function">imagecolorallocate()</a></span>.
       The default foreground color is black.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.image2wbmp-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
  <div class="caution"><strong class="caution">Застереження</strong><p class="simpara">Проте, якщо libgd не може вивести зображення, ця функція повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>.</p></div>
 </div>

 <div class="refsect1 examples" id="refsect1-function.image2wbmp-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 <span class="function"><strong>image2wbmp()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$file </span><span style="color: #007700">= </span><span style="color: #DD0000">'php.png'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$image </span><span style="color: #007700">= </span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">$file</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-Type: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">image_type_to_mime_type</span><span style="color: #007700">(</span><span style="color: #0000BB">IMAGETYPE_WBMP</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">image2wbmp</span><span style="color: #007700">(</span><span style="color: #0000BB">$image</span><span style="color: #007700">); </span><span style="color: #FF8000">// output the stream directly<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


 <div class="refsect1 seealso" id="refsect1-function.image2wbmp-seealso">
  <h3 class="title">Прогляньте також</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.imagewbmp.php" class="function" rel="rdfs-seeAlso">imagewbmp()</a> - Вивід зображення в браузер чи файл.</span></li>
  </ul>
 </div>

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