Skip to content

Commit

Permalink
chore(typings): Add typings for Image.dominantColor per #30 and Eya…
Browse files Browse the repository at this point in the history
  • Loading branch information
randytarampi committed Apr 28, 2020
1 parent c87e1da commit 987c10e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,13 @@ export interface Image {
*/
height(): number;

/**
* Return the pixel color that occurs most frequently in an Image. Counted by looking at every `0 + skips`th (every 1, 2nd, 3rd, 4th, etc.) pixel.
*
* @param pixelsToSkip The number of pixels to skip while iterating through the image. Ex. supplying 1 will skip every other pixel, 0 will skip none. The greater the number the less accuracy the result will have.
*/
dominantColor(pixelsToSkip: number): ColorObject;

/**
* Return the color of the pixel at the (left, top) coordinate.
*/
Expand Down

0 comments on commit 987c10e

Please sign in to comment.