-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added solarize to MagickImage (#100)
- Loading branch information
1 parent
bcb3113
commit a249a3a
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright Dirk Lemstra https://github.com/dlemstra/magick-wasm. | ||
// Licensed under the Apache License, Version 2.0. | ||
|
||
import { MagickColor } from '../../src/magick-color'; | ||
import { MagickColors } from '../../src/magick-colors'; | ||
import { TestImages } from '../test-images'; | ||
|
||
describe('MagickImage#solarize', () => { | ||
it('should solarize the image', () => { | ||
TestImages.Builtin.logo.use(image => { | ||
image.solarize(); | ||
expect(image).toHavePixelWithColor(125, 125, MagickColors.Black); | ||
expect(image).toHavePixelWithColor(122, 143, new MagickColor('#007f7f')); | ||
expect(image).toHavePixelWithColor(435, 240, new MagickColor('#2e6935')); | ||
}); | ||
}); | ||
}); |