mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Deprecate crop, embed, ignoreAspectRatio, max, min, withoutEnlargement.
These become options of the resize operation instead. #1135
This commit is contained in:
@@ -6,6 +6,15 @@ Requires libvips v8.7.0.
|
||||
|
||||
#### v0.21.0 - TBD
|
||||
|
||||
* Deprecate the following resize-related functions:
|
||||
`crop`, `embed`, `ignoreAspectRatio`, `max`, `min` and `withoutEnlargement`.
|
||||
Access to these is now via options passed to the `resize` function.
|
||||
For example:
|
||||
`embed('north')` is now `resize(width, height, { fit: 'contain', position: 'north' })`,
|
||||
`crop('attention')` is now `resize(width, height, { fit: 'cover', position: 'attention' })`,
|
||||
`max().withoutEnlargement()` is now `resize(width, height, { fit: 'inside', withoutEnlargement: true })`.
|
||||
[#1135](https://github.com/lovell/sharp/issues/1135)
|
||||
|
||||
* Drop Node 4 support.
|
||||
[#1212](https://github.com/lovell/sharp/issues/1212)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user