Ver Mensaje Individual
  #5 (permalink)  
Antiguo 24/04/2012, 08:05
alyciashape
 
Fecha de Ingreso: abril-2012
Mensajes: 590
Antigüedad: 12 años
Puntos: 58
Respuesta: PHP y Imagick

Pues antes de eso tengo lo típico claro:

Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<
html>
    <
head>
        <
meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <
title></title>
    </
head>
    <
body

Acabo de hacer otro ejemplo con un script que me he encontrado, lo que copiado y pegado tal cual:
Código PHP:
    <?php
     
    
/* Read the image into the object */
    
$im = new Imagick'strawberry.png' );
     
    
/* Make the image a little smaller, maintain aspect ratio */
    
$im->thumbnailImage200null );
     
    
/* Round corners, web 2.0! */
    
$im->roundCorners5);
     
    
/* Clone the current object */
    
$shadow $im->clone();
     
    
/* Set image background color to black
            (this is the color of the shadow) */
    
$shadow->setImageBackgroundColor( new ImagickPixel'black' ) );
     
    
/* Create the shadow */
    
$shadow->shadowImage8035);
     
    
/* Imagick::shadowImage only creates the shadow.
            That is why the original image is composited over it */
    
$shadow->compositeImage$imImagick::COMPOSITE_OVER0);
     
    
/* Display the image */
    
header"Content-Type: image/png" );
    echo 
$shadow;
     
    
?>
Lo ejecuto tal cual desde el mismo fichero, sin nada antes ni despues. Obtengo el mismo error con los "headers" y la imagen se ve una vez más como ristras de caracteres...

Última edición por alyciashape; 24/04/2012 a las 08:25