jellybellydev / image-orientation-fix
PHP library to fix image orientation by exif data.
Fund package maintenance!
JellyBellyDev
Installs: 9 292
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 5
Forks: 3
Open Issues: 0
Requires
- php: ^7.4|^8.0
- ext-exif: *
- ext-gd: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpunit/phpunit: ^9.4
README
PHP library to fix image orientation by exif data with thanks to method exif_read_data
Image Example
How to install
composer require jellybellydev/image-orientation-fix
How to use
use ImageOrientationFix\ImageOrientationFixer; $iof = new ImageOrientationFixer('foo.jpg'); $iof->fix();
or
use ImageOrientationFix\ImageOrientationFixer; $iof = new ImageOrientationFixer('/path/foo.jpg', '/path/foo_fixed.jpg'); $iof->fix();
Contributing
Dependencies are managed through composer:
$ docker-compose up --build -d
$ docker-compose run php74 composer install
Run phpunit:
$ docker-compose run php74 composer test
Run php-cs-fixer
docker-compose run php74 composer cs-fixer
Changelog
Please refer to the changelog notes.
Credits
Thanks to recurser for the image example