doutui4649
doutui4649
2014-03-15 12:33

识别图像是横向还是纵向

  • image-processing
  • image
  • php

How can I recognize if image stored in same folder as PHP script is landscape or portrait ? I need to implement it to this function:

if ($dir = @opendir($folder))
{
    while ($file = readdir($dir))
    {
        if (in_array(strtolower(FileExt($file)), $extensions))
        {
            if (!is_dir($file))
            {
                if (isLandsape($file))
                {
                    $files[] = $file;
                }
            }
        }
    }

    closedir($dir);
}
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐