Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jellybellydev/imageorientationfix
PHP library to fix image orientation by exif data.
https://github.com/jellybellydev/imageorientationfix
auto-rotate exif exif-data hacktoberfest image-orientation landscape php php-library portrait
Last synced: about 11 hours ago
JSON representation
PHP library to fix image orientation by exif data.
- Host: GitHub
- URL: https://github.com/jellybellydev/imageorientationfix
- Owner: JellyBellyDev
- License: mit
- Created: 2014-02-07T07:06:12.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2024-10-08T07:53:12.000Z (about 1 month ago)
- Last Synced: 2024-11-14T19:06:18.947Z (1 day ago)
- Topics: auto-rotate, exif, exif-data, hacktoberfest, image-orientation, landscape, php, php-library, portrait
- Language: PHP
- Homepage:
- Size: 3.7 MB
- Stars: 17
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ImageOrientationFix
PHP library to fix image orientation by exif data with thanks to method [exif_read_data](http://it2.php.net/manual/en/function.exif-read-data.php)
[![Gitbub actions](https://github.com/JellyBellyDev/ImageOrientationFix/workflows/Build/badge.svg)](https://github.com/JellyBellyDev/ImageOrientationFix/actions)
[![Latest Stable Version](https://poser.pugx.org/jellybellydev/image-orientation-fix/v/stable)](https://packagist.org/packages/jellybellydev/image-orientation-fix)
[![PHP Version Require](http://poser.pugx.org/jellybellydev/image-orientation-fix/require/php)](https://packagist.org/packages/jellybellydev/image-orientation-fix)
[![Total Downloads](https://poser.pugx.org/jellybellydev/image-orientation-fix/downloads)](https://packagist.org/packages/jellybellydev/image-orientation-fix)
[![composer.lock](https://poser.pugx.org/jellybellydev/image-orientation-fix/composerlock)](https://packagist.org/packages/jellybellydev/image-orientation-fix)
[![License](https://poser.pugx.org/jellybellydev/image-orientation-fix/license)](https://packagist.org/packages/jellybellydev/image-orientation-fix)
[![codecov](https://codecov.io/gh/JellyBellyDev/ImageOrientationFix/branch/master/graph/badge.svg)](https://codecov.io/gh/JellyBellyDev/ImageOrientationFix)## Image Example
![after](images/after_and_before.png)
## How to install
```bash
composer require jellybellydev/image-orientation-fix
```## How to use
```php
use ImageOrientationFix\ImageOrientationFixer;$iof = new ImageOrientationFixer('foo.jpg');
$iof->fix();
```
or
```php
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
``` bash
docker-compose run php74 composer cs-fixer
```## Changelog
Please refer to the [changelog notes](CHANGELOG.md).
## Credits
Thanks to [recurser](https://github.com/recurser) for the [image example](https://github.com/recurser/exif-orientation-examples)