index.d.ts 776 B

12345678910111213141516171819202122232425262728293031323334
  1. import { Jimp, ImageCallback } from '@jimp/core';
  2. interface CropClass {
  3. crop(x: number, y: number, w: number, h: number, cb?: ImageCallback<this>): this;
  4. cropQuiet(
  5. x: number,
  6. y: number,
  7. w: number,
  8. h: number,
  9. cb?: ImageCallback<this>
  10. ): this;
  11. autocrop(tolerance?: number, cb?: ImageCallback<this>): this;
  12. autocrop(cropOnlyFrames?: boolean, cb?: ImageCallback<this>): this;
  13. autocrop(
  14. tolerance?: number,
  15. cropOnlyFrames?: boolean,
  16. cb?: ImageCallback<this>
  17. ): this;
  18. autocrop(
  19. options: {
  20. tolerance?: number;
  21. cropOnlyFrames?: boolean;
  22. cropSymmetric?: boolean;
  23. leaveBorder?: number;
  24. },
  25. cb?: ImageCallback<this>
  26. ): this;
  27. }
  28. interface Crop {
  29. class: CropClass
  30. }
  31. export default function(): Crop;