1
0
mirror of https://github.com/Intervention/image.git synced 2025-01-17 12:18:14 +01:00

550 Commits

Author SHA1 Message Date
Oliver Vogel
c261654599
Refactor encoder tests 2024-03-26 15:17:02 +01:00
Oliver Vogel
f035f7d516
Trim Modifier (#1322)
Co-authored-by: Sibin Grasic <sibin.grasic@oblak.studio>
2024-03-25 19:46:16 +01:00
Oliver Vogel
7f4ff15d51
Improve Driver Specializing Process (#1315)
Streamline driver specializing process of analyzers, modifers, encoders and decoders.
2024-03-23 08:08:41 +01:00
Oliver Vogel
88c24d178e
Soften the test check for FontProcessorTest
As slightly different results can occur in different environments
with results of imageftbbox and roundings, a range is checked
instead of a fixed value.
2024-03-10 11:59:18 +01:00
Oliver Vogel
ed310770a5
Change font size in GD FontProcessorTest 2024-03-10 11:49:22 +01:00
Oliver Vogel
16df40cef9
Add tests for FontFactory stroke & wrap methods 2024-03-10 11:37:01 +01:00
Oliver Vogel
2b659a6863
Add test for Font::class stroke functions 2024-03-10 11:34:59 +01:00
Oliver Vogel
0d8df3801e
Add tests for AbstractFontProcessor 2024-03-10 11:28:12 +01:00
Oliver Vogel
159fba5662
Add font processor tests 2024-03-10 11:06:35 +01:00
Oliver Vogel
03281ba995
Rename test functions 2024-03-10 10:13:45 +01:00
Oliver Vogel
67fde5f87e
Restructure test folders & refactor test traits 2024-03-10 10:00:06 +01:00
Oliver Vogel
2e9f91c311
Centralize duplicate code 2024-03-08 16:22:59 +01:00
Oliver Vogel
a673763e14
Add text stroke outline effect
Adds the possibility to draw text with an outline stroke effect. The color and width of the outline can be specified.

During development, it was noticed that Imagick can handle the effect natively, but always draws it in the middle of the border. As there is currently no option to change this, the same trick was used that was already used for the implementation with the GD library.

This "compound" method first draws the outline several times with an offset before the actual text is placed over it.

However, this has the disadvantage that no transparent colors can be used if the stroke/outline effect is active as the would superimpose each other.

---------

Co-authored-by: MaximusLight <maximuslight7@gmail.com>
Co-authored-by: Oliver Vogel <oliver@olivervogel.com>
Co-authored-by: Amowogbaje Gideon <amowogbajegideon@gmail.com>
2024-03-02 12:37:29 +01:00
Oliver Vogel
17ff3337dd
Implement ColorInterface::isTransparent() 2024-03-02 11:29:28 +01:00
Oliver Vogel
7eb16e1aa5
Add tests for importing colors into foreign color spaces 2024-03-02 11:17:12 +01:00
Oliver Vogel
f83f37e551
Fix merge conflicts 2024-02-29 15:16:14 +01:00
Oliver Vogel
dcc95b8299
PHPUnit 10 Migration (#1302)
* Bump PHPUnit dependencies

* Set return type of base TestCase methods

From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type:

- `setUpBeforeClass()`
- `setUp()`
- `assertPreConditions()`
- `assertPostConditions()`
- `tearDown()`
- `tearDownAfterClass()`
- `onNotSuccessfulTest()`

[1]: https://phpunit.de/announcements/phpunit-8.html

* Ignore PHPUnit cache folder

* Adopt PHP attributes in test classes

* Declare data providers as `static`

* Add return types to test methods

* Define test classes as `final`

* Migrate phpunit.xml to phpunit 10

* Correct phpunit attribute class name

* Rename base test class

* Restructure test folders

* Fix test image paths

* Only set rules for php files in .editorconfig

* Remove php unit flag in local test env

---------

Co-authored-by: Shift <shift@laravelshift.com>
2024-02-28 16:16:23 +01:00
Oliver Vogel
795b794ee8
Reduce the differences in text rendering with drivers
Reduce the differences in text rendering with drivers
2024-02-03 16:13:44 +01:00
Oliver Vogel
684f5e6eb6
Implement text wrapping 2024-02-03 14:51:17 +01:00
Oliver Vogel
ac7389fa96
Refactor font processing 2024-02-03 13:15:52 +01:00
Oliver Vogel
cfebf59334
Refactor group use 2024-01-31 16:36:14 +01:00
Oliver Vogel
875b2690cd
Remove unused aliases 2024-01-30 19:46:47 +01:00
Oliver Vogel
1357b61993
Remove unused variables 2024-01-30 19:24:42 +01:00
Oliver Vogel
9015739860
Rename files to match namespaces & class names 2024-01-30 16:48:10 +01:00
Oliver Vogel
1aa8869e50
Refactor TextBlockTest 2024-01-28 16:58:58 +01:00
Oliver Vogel
8494cc91e3
Add test 2024-01-27 20:34:18 +01:00
Oliver Vogel
f4641342c3
Add tests 2024-01-27 20:19:25 +01:00
Oliver Vogel
2b99dd439c
Add tests 2024-01-27 20:11:51 +01:00
Oliver Vogel
7e08e37319
Merge branch 'feature/decoding-optimization' into develop 2024-01-27 18:43:12 +01:00
Oliver Vogel
5a3e8fd7bd
Add color processor tests 2024-01-27 18:40:28 +01:00
Oliver Vogel
05cf4fdaa5
Add tests 2024-01-27 18:30:03 +01:00
Oliver Vogel
19578de8d4
Move media type detection methods to abstract class 2024-01-27 17:58:55 +01:00
Oliver Vogel
6dcc450eee
Fix bug & add tests 2024-01-27 17:45:00 +01:00
Oliver Vogel
58ba4bb817
Add tests 2024-01-27 17:27:13 +01:00
Oliver Vogel
7e92af0c66
Add test 2024-01-27 14:03:51 +01:00
Oliver Vogel
defbbefcf2
Add test 2024-01-27 13:54:58 +01:00
Oliver Vogel
63e8b9ff80
Add test 2024-01-27 13:48:29 +01:00
Oliver Vogel
f807ae818a
Add tests 2024-01-27 13:19:56 +01:00
Oliver Vogel
38566044f9
Add test for image rotation adjustment 2024-01-27 12:13:51 +01:00
Oliver Vogel
64592ea399
Add tests 2024-01-27 11:22:28 +01:00
Oliver Vogel
56a064d867
Add tests for Image::blendTransparency() 2024-01-27 11:07:06 +01:00
Oliver Vogel
03a59283c3
Refactor image decoding process of GD driver 2024-01-27 10:34:04 +01:00
Oliver Vogel
884d4a476a
Add opacity parameter to PlaceModifier 2024-01-19 09:34:48 +01:00
Oliver Vogel
d356930d73 Include line length check in code standards 2024-01-18 14:13:54 +01:00
Oliver Vogel
5f7b98772a Fix bitmap detection in tests 2024-01-16 16:49:24 +01:00
Oliver Vogel
86ab920897 Declare strict types project wide 2024-01-16 12:01:29 +01:00
Oliver Vogel
93885988e1 Remove Collection::pushEach() 2024-01-16 11:18:00 +01:00
Oliver Vogel
828e3a204e Add tests 2024-01-16 10:49:38 +01:00
Oliver Vogel
f305cbd3bc Add @covers information to doc blocks 2024-01-16 10:22:24 +01:00
Oliver Vogel
c2d1e848be Add tests 2024-01-16 10:00:51 +01:00