Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 1052

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>imagecopyresampled</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Image functions"
HREF="ref.image.html"><LINK
REL="PREVIOUS"
TITLE="imagecopymergegray"
HREF="function.imagecopymergegray.html"><LINK
REL="NEXT"
TITLE="imagecopyresized"
HREF="function.imagecopyresized.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.imagecopymergegray.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.imagecopyresized.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.imagecopyresampled"
></A
>imagecopyresampled</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN34988"
></A
><P
>    (PHP 4 &#62;= 4.0.6)</P
>imagecopyresampled&nbsp;--&nbsp;Copy and resize part of an image with resampling</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN34991"
></A
><H2
>Description</H2
>int <B
CLASS="methodname"
>imagecopyresampled</B
> ( resource dst_im, resource src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH)<BR
></BR
><P
>&#13;    <B
CLASS="function"
>imagecopyresampled()</B
> copies a rectangular
    portion of one image to another image, smoothly interpolating pixel
    values so that, in particular, reducing the size of an image still
    retains a great deal of clarity.
    <TT
CLASS="parameter"
><I
>Dst_im</I
></TT
> is the destination image,
    <TT
CLASS="parameter"
><I
>src_im</I
></TT
> is the source image identifier.  If
    the source and destination coordinates and width and heights
    differ, appropriate stretching or shrinking of the image fragment
    will be performed.  The coordinates refer to the upper left
    corner.  This function can be used to copy regions within the
    same image (if <TT
CLASS="parameter"
><I
>dst_im</I
></TT
> is the same as
    <TT
CLASS="parameter"
><I
>src_im</I
></TT
>) but if the regions overlap the
    results will be unpredictable.
   </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
     There is a problem due to palette image limitations (255+1 colors).
     Resampling or filtering an image commonly needs more colors than 255, a
     kind of approximation is used to calculate the new resampled pixel and its
     color.  With a palette image we try to allocate a new color, if that
     failed, we choose the closest (in theory) computed color.  This is
     not always the closest visual color. That may produce a weird result, like
     blank (or visually blank) images.  To skip this problem, please use a 
     truecolor image as a destination image, such as one created by 
     <A
HREF="function.imagecreatetruecolor.html"
><B
CLASS="function"
>imagecreatetruecolor()</B
></A
>.
    </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
     <B
CLASS="function"
>imagecopyresampled()</B
> requires GD 2.0.l or greater.
    </P
></BLOCKQUOTE
></DIV
><P
>&#13;    See also <A
HREF="function.imagecopyresized.html"
><B
CLASS="function"
>imagecopyresized()</B
></A
>.
   </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.imagecopymergegray.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.imagecopyresized.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>imagecopymergegray</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.image.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>imagecopyresized</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>