(image: I)
| 2 | import tinyColor from "tinycolor2"; |
| 3 | |
| 4 | export function clone<I extends JimpClass>(image: I): I { |
| 5 | const newBitmap = { |
| 6 | width: image.bitmap.width, |
| 7 | height: image.bitmap.height, |
| 8 | data: Buffer.from(image.bitmap.data), |
| 9 | }; |
| 10 | |
| 11 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 12 | return new (image.constructor as any)(newBitmap); |
| 13 | } |
| 14 | |
| 15 | export function scan<I extends JimpClass>( |
| 16 | image: I, |
no outgoing calls
no test coverage detected
searching dependent graphs…