; 
    my $cr = PDL-&gt;wpiccan(&#39;PNG&#39;);   # is PNG format allowed
    if(! $cr ) { print &quot;Error (write): Png not allowed!\n&quot;; return 0; }
    PDL::IO::Pic::wpic($img,$png, {FORMAT =&gt; &#39;PNG&#39;}); # write image
 }</code></pre>

<h2 id="A.-bit_planes-bit_plane-data-type">A. @bit_planes = bit_plane($data,$type);</h2>

<p>Separates image <code>$data</code> in its <code>@bit_planes</code>. The <code>$type</code> can be &#39;raw&#39;|&#39;msb&#39;|&#39;lsb&#39;. This function takes only a