jellybellydev / image-orientation-fix
使用EXIF数据修复图像方向的PHP库。
v3.2.1
2024-01-05 13:02 UTC
Requires
- php: ^7.4|^8.0
- ext-exif: *
- ext-gd: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpunit/phpunit: ^9.4
README
感谢方法 exif_read_data,使用EXIF数据修复图像方向的PHP库。
图像示例
如何安装
composer require jellybellydev/image-orientation-fix
如何使用
use ImageOrientationFix\ImageOrientationFixer; $iof = new ImageOrientationFixer('foo.jpg'); $iof->fix();
或
use ImageOrientationFix\ImageOrientationFixer; $iof = new ImageOrientationFixer('/path/foo.jpg', '/path/foo_fixed.jpg'); $iof->fix();
贡献
依赖项通过composer管理
$ docker-compose up --build -d
$ docker-compose run php74 composer install
运行phpunit
$ docker-compose run php74 composer test
运行php-cs-fixer
docker-compose run php74 composer cs-fixer
变更日志
请参阅变更日志说明。