Tema: Subir Imagen
Ver Mensaje Individual
  #7 (permalink)  
Antiguo 16/02/2008, 23:34
Avatar de elfran222
elfran222
 
Fecha de Ingreso: junio-2006
Mensajes: 550
Antigüedad: 17 años, 10 meses
Puntos: 7
Re: Subir Imagen

Continuación upload.php
Código:
        // -----------
        $handle->image_reflection_height = '50%';
        $handle->image_text    = "verot.net\nclass\nupload";
        $handle->image_text_background = '#000000'; 
        $handle->image_text_padding    = 10;
        $handle->image_text_line_spacing = 10; 
        TestProcess($handle, 'text label and 50% reflection', "\$foo->image_text            = \"verot.net\\nclass\\nupload\";\n\$foo->image_text_background = '#000000';\n\$foo->image_text_padding    = 10;\n\$foo->image_text_line_spacing = 10;\n\$foo->image_reflection_height = '50%';");

        // -----------
        $handle->image_convert         = 'jpg';
        $handle->image_reflection_height = '40px';
        $handle->image_reflection_space = 10;
        TestProcess($handle, '40px reflection and 10 pixels space, into JPEG', "\$foo->image_convert         = 'jpg';\n\$foo->image_reflection_height = '40px';\n\$foo->image_reflection_space = 10;");

        // -----------
        $handle->image_reflection_height = 60;
        $handle->image_reflection_space = -40;
        TestProcess($handle, '60px reflection and -40 pixels space', "\$foo->image_reflection_height = 60;\n\$foo->image_reflection_space = -40;");

        // -----------
        $handle->image_reflection_height = 50;
        $handle->image_reflection_opacity = 100;
        TestProcess($handle, '50px reflection and 100% opacity', "\$foo->image_reflection_height = 50;\n\$foo->image_reflection_opacity = 100;");

        // -----------
        $handle->image_reflection_height = 50;
        $handle->image_reflection_opacity = 20;
        TestProcess($handle, '50px reflection and 20% opacity', "\$foo->image_reflection_height = 50;\n\$foo->image_reflection_opacity = 20;");
        // -----------
        $handle->image_reflection_height = '50%';
        $handle->image_default_color = '#000000';
        TestProcess($handle, '50% reflection, black background', "\$foo->image_reflection_height = '50%';\n\$foo->image_default_color    = '#000000';");

        // -----------
        $handle->image_convert         = 'gif';
        $handle->image_reflection_height = '50%';
        $handle->image_default_color = '#FF00FF';
        TestProcess($handle, '50% reflection, pink background, into GIF', "\$foo->image_convert         = 'gif';\n\$foo->image_reflection_height = '50%';\n\$foo->image_default_color    = '#000000';");

        // -----------
        $handle->image_watermark       = "watermark.png"; 
        TestProcess($handle, 'overlayed watermark (alpha transparent PNG)', "\$foo->image_watermark       = 'watermark.png';");

        // -----------
        $handle->image_watermark       = "watermark.png"; 
        $handle->image_watermark_position = 'R'; 
        TestProcess($handle, 'overlayed watermark, right position', "\$foo->image_watermark       = 'watermark.png';\n\$foo->image_watermark_position = 'R;");

        // -----------
        $handle->image_watermark       = "watermark.png"; 
        $handle->image_watermark_x     = 10; 
        $handle->image_watermark_y     = 10; 
        $handle->image_greyscale       = true;
        TestProcess($handle, 'watermark on greyscale pic, absolute position', "\$foo->image_watermark       = 'watermark.png';\n\$foo->image_watermark_x     = 10;\n\$foo->image_watermark_y     = 10;\n\$foo->image_greyscale       = true;");

        // -----------
        $handle->image_convert         = 'jpg';
        $handle->jpeg_size             = 3072; 
        TestProcess($handle, 'desired JPEG size set to 3KB', "\$foo->image_convert         = 'jpg';\n\$foo->jpeg_size             = 3072;");

        // -----------
        $handle->image_convert         = 'jpg';
        $handle->jpeg_quality          = 10; 
        TestProcess($handle, 'JPG quality set to 10%', "\$foo->image_convert         = 'jpg';\n\$foo->jpeg_quality          = 10;");

        // -----------
        $handle->image_convert         = 'jpg';
        $handle->jpeg_quality          = 80; 
        TestProcess($handle, 'JPG quality set to 80%', "\$foo->image_convert         = 'jpg';\n\$foo->jpeg_quality          = 80;");

        
    } else {
        // if we are here, the local file failed for some reasons
        echo '<fieldset>';
        echo '  <legend>local file error</legend>';
        echo '  Error: ' . $handle->error . '';
        echo '</fieldset>';
    }

    
}


echo '<p><a href="index.html">do another test</a></p>';

echo '<pre>';
echo($handle->log);
echo '</pre>';

?> 
</body>

</html>