Forum Replies Created

Viewing 1 replies (of 1 total)
  • O erro ocorre pelo fato do exif_read_data() somente aceitar jpg|bmp|tiff.
    para corrigir substitua por:
    `//exts valids to exif_read_data
    $arr_read_data = array(“jpg”, “tiff”, “bmp”);

    if (in_array(pathinfo($file, PATHINFO_EXTENSION), $arr_read_data)) {

    //exif_read_data acept only jpg | tiff | bmp
    $exif = exif_read_data( $file );

    //rotate images to display oreintation
    if( !empty( $exif[‘Orientation’] ) ) {
    switch( $exif[‘Orientation’] ) {
    case 8:
    $newimage = imagerotate( $newimage,90,0 );
    break;
    case 3:
    $newimage = imagerotate( $newimage,180,0 );
    break;
    case 6:
    $newimage = imagerotate( $newimage,-90,0 );
    break;
    }
    }
    }

Viewing 1 replies (of 1 total)