downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Imagick::vignetteImage> <Imagick::unsharpMaskImage
Last updated: Fri, 20 May 2011

view this page in

Imagick::valid

(PECL imagick 2.0.0)

Imagick::validComprueba si el elemento actual es válido

Descripción

bool Imagick::valid ( void )
Warning

Esta función no está documentada actualmente, solamente se encuentra disponible la lista de parámetros.

Comprueba si el elemento actual es válido.

Valores devueltos

Devuelve TRUE en caso de éxito.



add a note add a note User Contributed Notes Imagick::valid
hyrumt at mediarain dot com 11-Feb-2010 07:01
We found this method to be of value when checking most image file types. However, it does not appear to be rigorous enough to detect corrupt jpg files. We use the following for jpgs and validate() for everything else.

<?php
   
// check for the existence of the EOI segment header at the end of the file
   
if (0 !== fseek($file, -2, SEEK_END) || "\xFF\xD9" !== fread($file, 2)) {
       
fclose($file);
        return
FALSE;
    }
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites