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

1711 Commits

Author SHA1 Message Date
Oliver Vogel
e7554ec048
Allow png results to be 'grayscale' with 'indexed' option 2024-08-11 13:27:46 +02:00
Oliver Vogel
78534a3b0c
Let gd's PngEncoder encode binary transparency in indexed mode 2024-08-11 13:24:53 +02:00
Oliver Vogel
20dae08304
Merge branch 'develop' into feature/png-encoder-indexed-option 2024-08-11 12:03:19 +02:00
Oliver Vogel
9f5e0624d4
Fix bug in cloner transparency (#1388)
If an image was cloned with cloneEmpty() and a fully transparent color for exampe "rgba(255, 255, 255, 0)" the turned out as white background when encoding formats with only binary transparency like GIF.

This patch sets the background color as fully transparent if it has an alpha channel value is below `0.5`.
2024-08-11 12:02:30 +02:00
Oliver Vogel
31779d0263
Add ability to read instances of EncodedImaged::class (#1386)
* Implement EncodedImageObjectDecoder::class
* Add tests for EncodedImageObjectDecoder::class
2024-08-11 11:43:54 +02:00
Oliver Vogel
4a614ddfb8
Implement new method ColorInterface::isClear() (#1387) 2024-08-11 11:41:38 +02:00
Oliver Vogel
6196ff1eb9
Fix bug when loading png greyscale type
turn image into rgb if colorspace if other than CMYK, RGB, HSL or HSV.
this prevents working on greyscale colorspace images when loading from
PNG color type greyscale format.
2024-08-11 11:38:33 +02:00
Oliver Vogel
568444c939
Change logic of encoding indexed PNG format 2024-08-11 11:19:47 +02:00
Oliver Vogel
5d5cf355e4
Add ko-fi support badge 2024-08-10 08:42:28 +02:00
Oliver Vogel
de7fb02efa
Update FUNDING.yml 2024-08-09 16:23:28 +02:00
Oliver Vogel
5e9b4aa681
Rename method 2024-08-05 16:54:09 +02:00
Oliver Vogel
839bc6a3c6
Refactor code 2024-08-05 16:38:16 +02:00
Oliver Vogel
50feb11dce
Refactor code 2024-08-04 08:44:52 +02:00
Oliver Vogel
68479181fc
Reactivate blending color methods on ImageInterface 2024-08-04 08:41:09 +02:00
Oliver Vogel
2adc3b45de
Fix blending problem in GD's PngEncoder 2024-08-03 17:07:53 +02:00
Oliver Vogel
63990a8fb3
Add tests for PNG indexed options 2024-08-03 11:15:29 +02:00
Oliver Vogel
2ee997d98f
Add method to detect PNG color types 2024-08-03 11:04:30 +02:00
Oliver Vogel
460b205687
Rename class 2024-08-03 11:03:32 +02:00
Oliver Vogel
66040006f3
Implement 'indexed' option in PNG encoders 2024-08-03 11:01:03 +02:00
Oliver Vogel
ce4d2bc75c
Set imagick image formats to uppercase 2024-07-28 08:42:12 +02:00
Oliver Vogel
6daaedf7ed
Add non-standard mime type image/x-heic 2024-07-10 13:49:46 +02:00
P.H. Knot
5451ff9f90
Allow animated WEBP's (#1375)
* Don't merge layers when image is animated
* Update src/Drivers/Imagick/Encoders/WebpEncoder.php

---------

Co-authored-by: Oliver Vogel <oliver@olivervogel.com>
3.7.2
2024-07-05 15:35:01 +02:00
Oliver Vogel
115d2ad3be
Rewrite return type 2024-07-03 17:19:15 +02:00
Oliver Vogel
3b7f6a0cde
Remove redundant code 2024-07-03 17:18:36 +02:00
Oliver Vogel
75ab2c2225
Refactor format detection 2024-07-03 17:16:10 +02:00
Oliver Vogel
f130eb0985
Add Format::tryCreate() 2024-07-03 17:16:10 +02:00
Philippe Lonchampt
4bc03a2304
Handle non-standard but still in use image/x-jpeg mimetype as JPEG (#1372)
* Handle non-standard but still in use image/x-jpeg mimetype as JPEG

* Fix test
2024-07-02 17:53:07 +02:00
Oliver Vogel
137bdb356a
Avoid unnecessary exif_read_data calls (#1371)
EXIF data extraction makes only sense for JPEG and TIFF format. This
patch checks the format and calls exif_read_data only for appropriate
formats.

Previously, the function was also called with formats that can not
contain EXIF data. This resulted in warnings.
3.7.1
2024-06-29 09:51:20 +02:00
Oliver Vogel
c7fb60e6c9
Change format of GitHub issue templates 2024-06-26 17:52:00 +02:00
Oliver Vogel
f3a38975db
Rewrite exception messages for methods in AbstractDecoder 2024-06-26 17:38:27 +02:00
Oliver Vogel
bbf0f9f821
Change signature of internal methods
The following internal methods now return enum MediaType instead of
string.

Intervention\Image\AbstractDecoder::getMediaTypeByFilePath()
Intervention\Image\AbstractDecoder::getMediaTypeByBinary()
2024-06-26 17:13:30 +02:00
Oliver Vogel
c199536eac
Refactor InputHandler decoder resolving
Makes it possible that decoders of InputHandler do not necessarily
have to have a driver-specific version of "Inter". If the decoder
class cannot be resolved by the driver and is therefore not
available, it is simply ignored and the next decoder will be tried.
2024-06-23 17:15:42 +02:00
Oliver Vogel
bb0e9284a3
Add missing docbock 2024-06-23 11:15:04 +02:00
Oliver Vogel
470b5bfdd8
Add imagesetthickness on GD's draw modifiers
Make sure that no border is drawn for background colors
2024-06-16 10:44:59 +02:00
Oliver Vogel
6bfd3dd1d4
Fix typos 3.7.0 2024-06-13 18:34:59 +02:00
Oliver Vogel
9fe7980bdc
Fix bug when centering non-latin characters (#1366) 2024-06-13 14:36:55 +02:00
Oliver Vogel
ed6ddf4aa7
Fix discarded alpha channel of watermark in PlaceModifier (#1368) 2024-06-12 17:10:49 +02:00
Oliver Vogel
13c166d104
Throw exception if font file is not found 2024-06-11 16:15:55 +02:00
Oliver Vogel
27512eedb3 Change typehints
Change the typing. “callable” is too general, as classes are also
included here. “Closure” is actually sufficient, but “callable” was left
in the outer interface so as not to create a breaking change. In the
underlying factories, however, only “Closure” is still possible.
2024-06-09 12:04:36 +02:00
Oliver Vogel
36ca199d1b Add init method to DrawableFactoryInterface::class 2024-06-09 12:04:36 +02:00
Oliver Vogel
d3a044e883 Adapt type hints in ImageInterface 2024-06-09 12:04:36 +02:00
Oliver Vogel
0b47ee8fd0 Add DrawableInterface::setPosition() 2024-06-09 12:04:36 +02:00
Oliver Vogel
1da1339a2c Let draw methods accept object & callback input 2024-06-09 12:04:36 +02:00
Oliver Vogel
410d98002a
Add Drawable improvements & preparation for future features
* Add DrawableFactoryInterface
* Add universal Drawable factory class
* Add x/y setter methods to PointInterface
* Replace Point::class type hints by PointInterface::class
2024-06-09 10:49:00 +02:00
gammalogic
56a92c7144 Added change requests from @olivervogel 2024-06-09 07:55:52 +02:00
gammalogic
216f4cffb4 Add bezier curve drawing tool 2024-06-09 07:55:52 +02:00
Oliver Vogel
6d0d0b2002
Fix bug in DrawPolygonModifier of imagick driver 2024-06-08 10:28:52 +02:00
Oliver Vogel
3cc3cdb269
Add @throws keyword 2024-06-06 19:26:26 +02:00
Oliver Vogel
e405753b85
Merge branch 'main' into develop 2024-06-06 19:23:00 +02:00
Oliver Vogel
d428433aa7
Merge pull request #1361 from Intervention/hotfix/cover-modifier-size
Fix bug in cover modifiers
3.6.5
2024-06-06 19:15:24 +02:00