[PR #130] [MERGED] Image Processor geometry refactor. #295

Closed
opened 2026-02-25 22:35:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/flyimg/flyimg/pull/130
Author: @baamenabar
Created: 9/10/2017
Status: Merged
Merged: 9/18/2017
Merged by: @baamenabar

Base: masterHead: im-geometry-refactor


📝 Commits (9)

  • e18722e Added test cases to ImageMetaInfo class unit test suite.
  • f669a97 [WIP] First steps into refactoring the geometry calculations. Adding tests.
  • e8547f6 Merge branch 'master' into im-geometry-refactor
  • 9e7bd58 Separated method for very basic, most common resizing operations.
  • 14270c9 Preventing resized images from being expanded if preserve-natural-size is active
  • 4b6348e Added behaviour to resize with crop option. Most test passing now.
  • 725947c Updated and added tests cases for expanding images without stretching. Added cases for partial croping to the sides or top and bottom.
  • a82836f Initial cleanup after refactor, moved ImageMetaInfo one level up
  • 9e4c19f Cleanup of the tests code. Code climate finds it too repetitive.

📊 Changes

6 files changed (+356 additions, -46 deletions)

View changed files

📝 src/Core/Entity/Image/InputImage.php (+6 -1)
📝 src/Core/Entity/ImageMetaInfo.php (+1 -1)
📝 src/Core/Entity/OptionsBag.php (+34 -0)
📝 src/Core/Processor/ImageProcessor.php (+161 -35)
📝 tests/Core/Entity/ImageMetaInfoTest.php (+2 -3)
📝 tests/Core/Processor/ImageProcessorTest.php (+152 -6)

📄 Description

this is just the first steps, the failing tests, I'll start the actual refactor after this.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/flyimg/flyimg/pull/130 **Author:** [@baamenabar](https://github.com/baamenabar) **Created:** 9/10/2017 **Status:** ✅ Merged **Merged:** 9/18/2017 **Merged by:** [@baamenabar](https://github.com/baamenabar) **Base:** `master` ← **Head:** `im-geometry-refactor` --- ### 📝 Commits (9) - [`e18722e`](https://github.com/flyimg/flyimg/commit/e18722e4eea6a893d3367c1134da68ff139dd912) Added test cases to ImageMetaInfo class unit test suite. - [`f669a97`](https://github.com/flyimg/flyimg/commit/f669a971b5bc0fa54b9452a0491093683367a256) [WIP] First steps into refactoring the geometry calculations. Adding tests. - [`e8547f6`](https://github.com/flyimg/flyimg/commit/e8547f6096e29aaa38671c475e97d5aaf6798170) Merge branch 'master' into im-geometry-refactor - [`9e7bd58`](https://github.com/flyimg/flyimg/commit/9e7bd58c0c91b3c3994974a9bb03477c6e6992f2) Separated method for very basic, most common resizing operations. - [`14270c9`](https://github.com/flyimg/flyimg/commit/14270c9cede33ab27b17a3ec8efaf7c5d93cdfbc) Preventing resized images from being expanded if preserve-natural-size is active - [`4b6348e`](https://github.com/flyimg/flyimg/commit/4b6348ebdfd4aabea82f4c08dcb9358576951ea3) Added behaviour to resize with crop option. Most test passing now. - [`725947c`](https://github.com/flyimg/flyimg/commit/725947c246e9b208f82035931eb9d002cb7ee0ee) Updated and added tests cases for expanding images without stretching. Added cases for partial croping to the sides or top and bottom. - [`a82836f`](https://github.com/flyimg/flyimg/commit/a82836f1b4e0d053cfc0e2a4da099d61d65cdf6e) Initial cleanup after refactor, moved ImageMetaInfo one level up - [`9e4c19f`](https://github.com/flyimg/flyimg/commit/9e4c19f9fd9da60b24b94d264edd87d35a4998cf) Cleanup of the tests code. Code climate finds it too repetitive. ### 📊 Changes **6 files changed** (+356 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Entity/Image/InputImage.php` (+6 -1) 📝 `src/Core/Entity/ImageMetaInfo.php` (+1 -1) 📝 `src/Core/Entity/OptionsBag.php` (+34 -0) 📝 `src/Core/Processor/ImageProcessor.php` (+161 -35) 📝 `tests/Core/Entity/ImageMetaInfoTest.php` (+2 -3) 📝 `tests/Core/Processor/ImageProcessorTest.php` (+152 -6) </details> ### 📄 Description this is just the first steps, the failing tests, I'll start the actual refactor after this. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 22:35:00 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flyimg#295
No description provided.