Skip to content

Instantly share code, notes, and snippets.

@antoinepairet
Created September 29, 2015 12:36
Show Gist options
  • Save antoinepairet/679ad02a77d657581a21 to your computer and use it in GitHub Desktop.
Save antoinepairet/679ad02a77d657581a21 to your computer and use it in GitHub Desktop.
LWIP node 4.1.1 Win 7 32 bits - Tests crash randomly (https://github.com/kant2002/lwip/commit/ad6a8612b97a13c3994b8b4284fdbae33439f5e3)
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (203ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (185ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (145ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (136ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (145ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (136ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (1004ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (626ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (630ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (374ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (663ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (383ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (866ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
 should succeed
grayscale image with alpha
 should succeed
rgb image
 should succeed
rgb image with alpha
 should succeed
lwip.create
500X500, [255,0,0,50]
 should succeed
500X500, [0,255,0]
 should succeed
500X500, no color specified
 should succeed
lwip.writeFile
jpeg
with type unspecified
params unspecified
 should succeed
params specified q=20
 should succeed
params specified q=0
 should succeed
with type specified
params unspecified
 should succeed
params specified
 should succeed
png
with type unspecified
params unspecified
 should succeed
params specified - no compression, not interlaced
 should succeed
params specified - no compression, interlaced
 should succeed
params specified - fast compression, not interlaced
 should succeed
params specified - fast compression, interlaced
 should succeed
params specified - high compression, not interlaced
 should succeed (148ms)
params specified - high compression, interlaced
 should succeed (139ms)
with type specified
params unspecified
 should succeed
gif
with type unspecified
params unspecified
 should succeed
params specified - 256, not interlaced, not transparent, 50
 should succeed
params specified - 99, interlaced, not transparent, 50
 should succeed
params specified - 256, not interlaced, transparent, 30
 should succeed
params specified - 16, interlaced, transparent, 88
 should succeed
with type specified
params unspecified
 should succeed
lwip.resize
1000X1330
unspecified interpolation
 image should have the correct size (989ms)
lanczos interpolation
 image should have the correct size (989ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
100X100
unspecified interpolation
 image should have the correct size
lwip.scale
width 150%, height 120%
unspecified interpolation
 image should have the correct size (326ms)
lanczos interpolation
 image should have the correct size (334ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
width and height 25%
unspecified interpolation
 image should have the correct size
lwip.rotate
right angles
90 degs
 should succeed
180 degs
 should succeed
270 degs
 should succeed
360 degs
 should succeed
450 degs
 should succeed
-90 degs
 should succeed
-180 degs
 should succeed
arbitrary angles and fills
33 degs, unspecified fill
 should succeed
-33 degs, "yellow" fill
 should succeed
45 degs, [50,100,300,75] fill
 should succeed
-5 degs, {r:200,g:110,b:220} fill
 should succeed
-5 degs, {r:200,g:110,b:220,a:50} fill
 should succeed
lwip.crop
rectangle from center
100X100
 image should have the correct size
200X100
 image should have the correct size
rectangle coordinates
10,10,100,100
 image should have the correct size
lwip.blur
SD=1
 should succeed
SD=5.5
 should succeed
SD=20
 should succeed
lwip.mirror (/flip)
around one axis
x
 should succeed
y
 should succeed
around two axes
xy
 should succeed
yx
 should succeed
lwip.pad
left-1, top-3, right-5, bottom-8, color-green
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[120,50,200]
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[20,150,20,80]
 image should have the correct size
left-5, top-15, right-25, bottom-40, color-{r:120,g:50,b:200}
 image should have the correct size
lwip.border
19 pixels, green
 image should have the correct size
9 pixels, [100,200,25]
 image should have the correct size
4 pixels, {r:100,g:200,b:25}
 image should have the correct size
lwip.sharpen
amp=0
 should succeed
amp=5.5
 should succeed
amp=99
 should succeed
amp=-5.5
 should succeed
amp=-99
 should succeed
lwip.saturate
delta=0
 should succeed
delta=0.8
 should succeed
delta=-1
 should succeed
lwip.lighten
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.darken
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.hue
shift=0
 should succeed
shift=50.5
 should succeed
shift=-50
 should succeed
shift=500
 should succeed
shift=-500
 should succeed
lwip.hslaAdjust
hs=0, sd=0, ld=0, ad=0
 should succeed
hs=50, sd=0.3, ld=0.4, ad=0.5
 should succeed
hs=-50, sd=-0.3, ld=-0.4, ad=-1
 should succeed
lwip.fade
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
delta=1
 should succeed
delta=-1
 should succeed
lwip.opacify
 should succeed
lwip.paste
background transparent, front opaque
 should see flipped image
background opaque, front transparent
 should see normal image
background opaque, front 50%
 should see blended image
background 50%, front opaque
 should see flipped image
background 50%, front 50%
 should see blended transparent image
front scaled 50% in middle
 should see small front in middle of back
lwip.setPixel
red pixel at 0,0
 pixel should have the correct color
red pixel at 100,100
 pixel should have the correct color
lwip.contain
800X100, no color, unspecified interpolation
 image should have the correct size
100X800, no color, lanczos interpolation
 image should have the correct size
100X400, gray, unspecified interpolation
 image should have the correct size
400X100, gray, lanczos interpolation
 image should have the correct size
lwip.cover
800X300, unspecified interpolation
 image should have the correct size (423ms)
300X800, lanczos interpolation
 image should have the correct size (811ms)
lwip.setMetadata
set png metadata
 should set metadata and be able to read metadata
 should not set metadata if setMetadata is not called
 should throw error if non-string metadata is set
 should remove metadata if called with null parameter
 can reset metadata on image with existing metadata
simultaneous operations locks
image.resize lock
 should lock image
image.scale lock
 should lock image
image.rotate lock
 should lock image
image.crop lock
 should lock image
image.blur lock
 should lock image
image.sharpen lock
 should lock image
image.mirror lock
 should lock image
image.border lock
 should lock image
image.pad lock
 should lock image
image.saturate lock
 should lock image
image.lighten lock
 should lock image
image.darken lock
 should lock image
image.hue lock
 should lock image
image.fade lock
 should lock image
image.opacify lock
 should lock image
image.hslaAdjust lock
 should lock image
image.setPixel lock
 should lock image
image.paste lock
 should lock image
image.contain lock
 should lock image
image.cover lock
 should lock image
failed ops lock release
image.resize release
 should release image lock
image.scale release
 should release image lock
image.rotate release
 should release image lock
image.crop release
 should release image lock
image.blur release
 should release image lock
image.sharpen release
 should release image lock
image.mirror release
 should release image lock
image.border release
 should release image lock
image.pad release
 should release image lock
image.saturate release
 should release image lock
image.lighten release
 should release image lock
image.darken release
 should release image lock
image.hue release
 should release image lock
image.fade release
 should release image lock
image.opacify release
 should release image lock
image.hslaAdjust release
 should release image lock
image.setPixel release
 should release image lock
image.paste release
 should release image lock
image.contain release
 should release image lock
image.cover release
 should release image lock
clone correct behavior
image.clone
 should clone the image at the correct state
extract correct behavior
image.extract
 should extract the sub-image at the correct state
image.batch
exec
same batch twice in parallel
 should throw an error
toBuffer
jpeg
quality 0
 should succeed
quality 100
 should succeed
png
non interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (141ms)
interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (162ms)
gif
non interlaced
no transparency
 should succeed (714ms)
with transparency
 should succeed (349ms)
interlaced
no transparency
 should succeed
with transparency
 should succeed (317ms)
writeFile
jpeg
quality 0
 should succeed
quality 100
 should succeed (175ms)
png
non interlaced
no compression
 should succeed
fast compression
 should succeed (290ms)
high compression
 should succeed (231ms)
interlaced
no compression
 should succeed (453ms)
fast compression
 should succeed
high compression
 should succeed (450ms)
gif
non interlaced
no transparency
 should succeed
with transparency
 should succeed (1034ms)
interlaced
no transparency
 should succeed
with transparency
 should succeed (525ms)
stress tests
open image 300 times (in parallel) and save to disk as jpeg
 should succeed (2710ms)
open image 100 times (in parallel) and save to disk as png (high compression, interlaced)
 should succeed (7206ms)
open image 300 times (in parallel) and save to disk as png (fast compression, not interlaced)
 should succeed (4423ms)
open image 300 times (in parallel) and save to disk as gif (128 colors, not interlaced, transparent)
 should succeed (3218ms)
7 random manipulations for 50 images (in parallel)
 should succeed (14044ms)
rotate an image 30 times (up to 90degs) (1)
 should succeed (5514ms)
rotate an image 30 times (up to 90degs) (2)
 should succeed (5997ms)
25 random manipulations on one image (1)
 should succeed (1629ms)
25 random manipulations on one image (2)
1) should succeed
444 passing (2m)
1 failing
1) stress tests 25 random manipulations on one image (2) should succeed:
Error: Unable to resize image
at Error (native)
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (236ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (194ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (163ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (148ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (164ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (147ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (1057ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (656ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (614ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (384ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (596ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (353ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (788ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
 should succeed
grayscale image with alpha
 should succeed
rgb image
 should succeed
rgb image with alpha
 should succeed
lwip.create
500X500, [255,0,0,50]
 should succeed
500X500, [0,255,0]
 should succeed
500X500, no color specified
 should succeed
lwip.writeFile
jpeg
with type unspecified
params unspecified
 should succeed
params specified q=20
 should succeed
params specified q=0
 should succeed
with type specified
params unspecified
 should succeed
params specified
 should succeed
png
with type unspecified
params unspecified
 should succeed
params specified - no compression, not interlaced
 should succeed
params specified - no compression, interlaced
 should succeed
params specified - fast compression, not interlaced
 should succeed
params specified - fast compression, interlaced
 should succeed
params specified - high compression, not interlaced
 should succeed (157ms)
params specified - high compression, interlaced
 should succeed (138ms)
with type specified
params unspecified
 should succeed
gif
with type unspecified
params unspecified
 should succeed
params specified - 256, not interlaced, not transparent, 50
 should succeed
params specified - 99, interlaced, not transparent, 50
 should succeed
params specified - 256, not interlaced, transparent, 30
 should succeed
params specified - 16, interlaced, transparent, 88
 should succeed
with type specified
params unspecified
 should succeed
lwip.resize
1000X1330
unspecified interpolation
 image should have the correct size (1012ms)
lanczos interpolation
 image should have the correct size (988ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
100X100
unspecified interpolation
 image should have the correct size
lwip.scale
width 150%, height 120%
unspecified interpolation
 image should have the correct size (324ms)
lanczos interpolation
 image should have the correct size (328ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
width and height 25%
unspecified interpolation
 image should have the correct size
lwip.rotate
right angles
90 degs
 should succeed
180 degs
 should succeed
270 degs
 should succeed
360 degs
 should succeed
450 degs
 should succeed
-90 degs
 should succeed
-180 degs
 should succeed
arbitrary angles and fills
33 degs, unspecified fill
 should succeed
-33 degs, "yellow" fill
 should succeed
45 degs, [50,100,300,75] fill
 should succeed
-5 degs, {r:200,g:110,b:220} fill
 should succeed
-5 degs, {r:200,g:110,b:220,a:50} fill
 should succeed
lwip.crop
rectangle from center
100X100
 image should have the correct size
200X100
 image should have the correct size
rectangle coordinates
10,10,100,100
 image should have the correct size
lwip.blur
SD=1
 should succeed
SD=5.5
 should succeed
SD=20
 should succeed
lwip.mirror (/flip)
around one axis
x
 should succeed
y
 should succeed
around two axes
xy
 should succeed
yx
 should succeed
lwip.pad
left-1, top-3, right-5, bottom-8, color-green
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[120,50,200]
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[20,150,20,80]
 image should have the correct size
left-5, top-15, right-25, bottom-40, color-{r:120,g:50,b:200}
 image should have the correct size
lwip.border
19 pixels, green
 image should have the correct size
9 pixels, [100,200,25]
 image should have the correct size
4 pixels, {r:100,g:200,b:25}
 image should have the correct size
lwip.sharpen
amp=0
 should succeed
amp=5.5
 should succeed
amp=99
 should succeed
amp=-5.5
 should succeed
amp=-99
 should succeed
lwip.saturate
delta=0
 should succeed
delta=0.8
 should succeed
delta=-1
 should succeed
lwip.lighten
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.darken
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.hue
shift=0
 should succeed
shift=50.5
 should succeed
shift=-50
 should succeed
shift=500
 should succeed
shift=-500
 should succeed
lwip.hslaAdjust
hs=0, sd=0, ld=0, ad=0
 should succeed
hs=50, sd=0.3, ld=0.4, ad=0.5
 should succeed
hs=-50, sd=-0.3, ld=-0.4, ad=-1
 should succeed
lwip.fade
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
delta=1
 should succeed
delta=-1
 should succeed
lwip.opacify
 should succeed
lwip.paste
background transparent, front opaque
 should see flipped image
background opaque, front transparent
 should see normal image
background opaque, front 50%
 should see blended image
background 50%, front opaque
 should see flipped image
background 50%, front 50%
 should see blended transparent image
front scaled 50% in middle
 should see small front in middle of back
lwip.setPixel
red pixel at 0,0
 pixel should have the correct color
red pixel at 100,100
 pixel should have the correct color
lwip.contain
800X100, no color, unspecified interpolation
 image should have the correct size
100X800, no color, lanczos interpolation
 image should have the correct size
100X400, gray, unspecified interpolation
 image should have the correct size
400X100, gray, lanczos interpolation
 image should have the correct size
lwip.cover
800X300, unspecified interpolation
 image should have the correct size (414ms)
300X800, lanczos interpolation
 image should have the correct size (807ms)
lwip.setMetadata
set png metadata
 should set metadata and be able to read metadata
 should not set metadata if setMetadata is not called
 should throw error if non-string metadata is set
 should remove metadata if called with null parameter
 can reset metadata on image with existing metadata
simultaneous operations locks
image.resize lock
 should lock image
image.scale lock
 should lock image
image.rotate lock
 should lock image
image.crop lock
 should lock image
image.blur lock
 should lock image
image.sharpen lock
 should lock image
image.mirror lock
 should lock image
image.border lock
 should lock image
image.pad lock
 should lock image
image.saturate lock
 should lock image
image.lighten lock
 should lock image
image.darken lock
 should lock image
image.hue lock
 should lock image
image.fade lock
 should lock image
image.opacify lock
 should lock image
image.hslaAdjust lock
 should lock image
image.setPixel lock
 should lock image
image.paste lock
 should lock image
image.contain lock
 should lock image
image.cover lock
 should lock image
failed ops lock release
image.resize release
 should release image lock
image.scale release
 should release image lock
image.rotate release
 should release image lock
image.crop release
 should release image lock
image.blur release
 should release image lock
image.sharpen release
 should release image lock
image.mirror release
 should release image lock
image.border release
 should release image lock
image.pad release
 should release image lock
image.saturate release
 should release image lock
image.lighten release
 should release image lock
image.darken release
 should release image lock
image.hue release
 should release image lock
image.fade release
 should release image lock
image.opacify release
 should release image lock
image.hslaAdjust release
 should release image lock
image.setPixel release
 should release image lock
image.paste release
 should release image lock
image.contain release
 should release image lock
image.cover release
 should release image lock
clone correct behavior
image.clone
 should clone the image at the correct state
extract correct behavior
image.extract
 should extract the sub-image at the correct state
image.batch
exec
same batch twice in parallel
 should throw an error
toBuffer
jpeg
quality 0
 should succeed
quality 100
 should succeed
png
non interlaced
no compression
 should succeed (434ms)
fast compression
 should succeed (490ms)
high compression
 should succeed (431ms)
interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed
gif
non interlaced
no transparency
 should succeed
with transparency
 should succeed
interlaced
no transparency
 should succeed (212ms)
with transparency
 should succeed
writeFile
jpeg
quality 0
 should succeed (970ms)
quality 100
 should succeed (708ms)
png
non interlaced
no compression
 should succeed (102ms)
fast compression
 should succeed (108ms)
high compression
 should succeed (137ms)
interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (298ms)
gif
non interlaced
no transparency
 should succeed
with transparency
 should succeed
interlaced
no transparency
 should succeed
with transparency
 should succeed
stress tests
open image 300 times (in parallel) and save to disk as jpeg
 should succeed (2476ms)
open image 100 times (in parallel) and save to disk as png (high compression, interlaced)
 should succeed (7077ms)
open image 300 times (in parallel) and save to disk as png (fast compression, not interlaced)
 should succeed (4479ms)
open image 300 times (in parallel) and save to disk as gif (128 colors, not interlaced, transparent)
 should succeed (2902ms)
7 random manipulations for 50 images (in parallel)
 should succeed (12866ms)
rotate an image 30 times (up to 90degs) (1)
 should succeed (7528ms)
rotate an image 30 times (up to 90degs) (2)
 should succeed (5763ms)
25 random manipulations on one image (1)
 should succeed (1590ms)
25 random manipulations on one image (2)
 should succeed (3954ms)
445 passing (1m)
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (196ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (193ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (145ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (137ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (145ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (139ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (1076ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (686ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (641ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (373ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (628ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (371ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (850ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
 should succeed
grayscale image with alpha
 should succeed
rgb image
 should succeed
rgb image with alpha
 should succeed
lwip.create
500X500, [255,0,0,50]
 should succeed
500X500, [0,255,0]
 should succeed
500X500, no color specified
 should succeed
lwip.writeFile
jpeg
with type unspecified
params unspecified
 should succeed
params specified q=20
 should succeed
params specified q=0
 should succeed
with type specified
params unspecified
 should succeed
params specified
 should succeed
png
with type unspecified
params unspecified
 should succeed
params specified - no compression, not interlaced
 should succeed
params specified - no compression, interlaced
 should succeed
params specified - fast compression, not interlaced
 should succeed
params specified - fast compression, interlaced
 should succeed
params specified - high compression, not interlaced
 should succeed (162ms)
params specified - high compression, interlaced
 should succeed (140ms)
with type specified
params unspecified
 should succeed
gif
with type unspecified
params unspecified
 should succeed
params specified - 256, not interlaced, not transparent, 50
 should succeed
params specified - 99, interlaced, not transparent, 50
 should succeed
params specified - 256, not interlaced, transparent, 30
 should succeed
params specified - 16, interlaced, transparent, 88
 should succeed
with type specified
params unspecified
 should succeed
lwip.resize
1000X1330
unspecified interpolation
 image should have the correct size (1032ms)
lanczos interpolation
 image should have the correct size (1070ms)
cubic interpolation
 image should have the correct size (104ms)
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
100X100
unspecified interpolation
 image should have the correct size
lwip.scale
width 150%, height 120%
unspecified interpolation
 image should have the correct size (408ms)
lanczos interpolation
 image should have the correct size (357ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
width and height 25%
unspecified interpolation
 image should have the correct size
lwip.rotate
right angles
90 degs
 should succeed
180 degs
 should succeed
270 degs
 should succeed
360 degs
 should succeed
450 degs
 should succeed
-90 degs
 should succeed
-180 degs
 should succeed
arbitrary angles and fills
33 degs, unspecified fill
 should succeed
-33 degs, "yellow" fill
 should succeed
45 degs, [50,100,300,75] fill
 should succeed
-5 degs, {r:200,g:110,b:220} fill
 should succeed
-5 degs, {r:200,g:110,b:220,a:50} fill
 should succeed
lwip.crop
rectangle from center
100X100
 image should have the correct size
200X100
 image should have the correct size
rectangle coordinates
10,10,100,100
 image should have the correct size
lwip.blur
SD=1
 should succeed
SD=5.5
 should succeed
SD=20
 should succeed
lwip.mirror (/flip)
around one axis
x
 should succeed
y
 should succeed
around two axes
xy
 should succeed
yx
 should succeed
lwip.pad
left-1, top-3, right-5, bottom-8, color-green
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[120,50,200]
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[20,150,20,80]
 image should have the correct size
left-5, top-15, right-25, bottom-40, color-{r:120,g:50,b:200}
 image should have the correct size
lwip.border
19 pixels, green
 image should have the correct size
9 pixels, [100,200,25]
 image should have the correct size
4 pixels, {r:100,g:200,b:25}
 image should have the correct size
lwip.sharpen
amp=0
 should succeed
amp=5.5
 should succeed
amp=99
 should succeed
amp=-5.5
 should succeed
amp=-99
 should succeed
lwip.saturate
delta=0
 should succeed
delta=0.8
 should succeed
delta=-1
 should succeed
lwip.lighten
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.darken
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.hue
shift=0
 should succeed
shift=50.5
 should succeed
shift=-50
 should succeed
shift=500
 should succeed
shift=-500
 should succeed
lwip.hslaAdjust
hs=0, sd=0, ld=0, ad=0
 should succeed
hs=50, sd=0.3, ld=0.4, ad=0.5
 should succeed
hs=-50, sd=-0.3, ld=-0.4, ad=-1
 should succeed
lwip.fade
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
delta=1
 should succeed
delta=-1
 should succeed
lwip.opacify
 should succeed
lwip.paste
background transparent, front opaque
 should see flipped image
background opaque, front transparent
 should see normal image
background opaque, front 50%
 should see blended image
background 50%, front opaque
 should see flipped image
background 50%, front 50%
 should see blended transparent image
front scaled 50% in middle
 should see small front in middle of back
lwip.setPixel
red pixel at 0,0
 pixel should have the correct color
red pixel at 100,100
 pixel should have the correct color
lwip.contain
800X100, no color, unspecified interpolation
 image should have the correct size
100X800, no color, lanczos interpolation
 image should have the correct size
100X400, gray, unspecified interpolation
 image should have the correct size
400X100, gray, lanczos interpolation
 image should have the correct size
lwip.cover
800X300, unspecified interpolation
 image should have the correct size (462ms)
300X800, lanczos interpolation
 image should have the correct size (919ms)
lwip.setMetadata
set png metadata
 should set metadata and be able to read metadata
 should not set metadata if setMetadata is not called
 should throw error if non-string metadata is set
 should remove metadata if called with null parameter
 can reset metadata on image with existing metadata
simultaneous operations locks
image.resize lock
 should lock image
image.scale lock
 should lock image
image.rotate lock
 should lock image
image.crop lock
 should lock image
image.blur lock
 should lock image
image.sharpen lock
 should lock image
image.mirror lock
 should lock image
image.border lock
 should lock image
image.pad lock
 should lock image
image.saturate lock
 should lock image
image.lighten lock
 should lock image
image.darken lock
 should lock image
image.hue lock
 should lock image
image.fade lock
 should lock image
image.opacify lock
 should lock image
image.hslaAdjust lock
 should lock image
image.setPixel lock
 should lock image
image.paste lock
 should lock image
image.contain lock
 should lock image
image.cover lock
 should lock image
failed ops lock release
image.resize release
 should release image lock
image.scale release
 should release image lock
image.rotate release
 should release image lock
image.crop release
 should release image lock
image.blur release
 should release image lock
image.sharpen release
 should release image lock
image.mirror release
 should release image lock
image.border release
 should release image lock
image.pad release
 should release image lock
image.saturate release
 should release image lock
image.lighten release
 should release image lock
image.darken release
 should release image lock
image.hue release
 should release image lock
image.fade release
 should release image lock
image.opacify release
 should release image lock
image.hslaAdjust release
 should release image lock
image.setPixel release
 should release image lock
image.paste release
 should release image lock
image.contain release
 should release image lock
image.cover release
 should release image lock
clone correct behavior
image.clone
 should clone the image at the correct state
extract correct behavior
image.extract
 should extract the sub-image at the correct state
image.batch
exec
same batch twice in parallel
 should throw an error
toBuffer
jpeg
quality 0
 should succeed
quality 100
 should succeed
png
non interlaced
no compression
 should succeed
fast compression
 should succeed (574ms)
high compression
 should succeed
interlaced
no compression
 should succeed
fast compression
 should succeed (417ms)
high compression
 should succeed (221ms)
gif
non interlaced
no transparency
 should succeed (1715ms)
with transparency
 should succeed
interlaced
no transparency
 should succeed
with transparency
 should succeed
writeFile
jpeg
quality 0
 should succeed (124ms)
quality 100
 should succeed (579ms)
png
non interlaced
no compression
 should succeed (220ms)
fast compression
 should succeed (766ms)
high compression
 should succeed (205ms)
interlaced
no compression
 should succeed (123ms)
fast compression
 should succeed (640ms)
high compression
 should succeed
gif
non interlaced
no transparency
 should succeed (137ms)
with transparency
 should succeed
interlaced
no transparency
 should succeed
with transparency
 should succeed
stress tests
open image 300 times (in parallel) and save to disk as jpeg
 should succeed (2783ms)
open image 100 times (in parallel) and save to disk as png (high compression, interlaced)
 should succeed (7827ms)
open image 300 times (in parallel) and save to disk as png (fast compression, not interlaced)
 should succeed (4792ms)
open image 300 times (in parallel) and save to disk as gif (128 colors, not interlaced, transparent)
 should succeed (3132ms)
7 random manipulations for 50 images (in parallel)
1) should succeed
rotate an image 30 times (up to 90degs) (1)
 should succeed (10729ms)
rotate an image 30 times (up to 90degs) (2)
 should succeed (5790ms)
25 random manipulations on one image (1)
 should succeed (24688ms)
25 random manipulations on one image (2)
 should succeed (2992ms)
444 passing (2m)
1 failing
1) stress tests 7 random manipulations for 50 images (in parallel) should succeed:
Error: Unable to resize image
at Error (native)
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (208ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (243ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (190ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (176ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (166ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (144ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (1102ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (717ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (637ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (364ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (662ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (371ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (849ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
 should succeed
grayscale image with alpha
 should succeed
rgb image
 should succeed
rgb image with alpha
 should succeed
lwip.create
500X500, [255,0,0,50]
 should succeed
500X500, [0,255,0]
 should succeed
500X500, no color specified
 should succeed
lwip.writeFile
jpeg
with type unspecified
params unspecified
 should succeed
params specified q=20
 should succeed
params specified q=0
 should succeed
with type specified
params unspecified
 should succeed
params specified
 should succeed
png
with type unspecified
params unspecified
 should succeed
params specified - no compression, not interlaced
 should succeed
params specified - no compression, interlaced
 should succeed
params specified - fast compression, not interlaced
 should succeed
params specified - fast compression, interlaced
 should succeed
params specified - high compression, not interlaced
 should succeed (153ms)
params specified - high compression, interlaced
 should succeed (145ms)
with type specified
params unspecified
 should succeed
gif
with type unspecified
params unspecified
 should succeed
params specified - 256, not interlaced, not transparent, 50
 should succeed
params specified - 99, interlaced, not transparent, 50
 should succeed
params specified - 256, not interlaced, transparent, 30
 should succeed
params specified - 16, interlaced, transparent, 88
 should succeed
with type specified
params unspecified
 should succeed
lwip.resize
1000X1330
unspecified interpolation
 image should have the correct size (1053ms)
lanczos interpolation
 image should have the correct size (1063ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
100X100
unspecified interpolation
 image should have the correct size
lwip.scale
width 150%, height 120%
unspecified interpolation
 image should have the correct size (334ms)
lanczos interpolation
 image should have the correct size (332ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
width and height 25%
unspecified interpolation
 image should have the correct size
lwip.rotate
right angles
90 degs
 should succeed
180 degs
 should succeed
270 degs
 should succeed
360 degs
 should succeed
450 degs
 should succeed
-90 degs
 should succeed
-180 degs
 should succeed
arbitrary angles and fills
33 degs, unspecified fill
 should succeed
-33 degs, "yellow" fill
 should succeed
45 degs, [50,100,300,75] fill
 should succeed
-5 degs, {r:200,g:110,b:220} fill
 should succeed
-5 degs, {r:200,g:110,b:220,a:50} fill
 should succeed
lwip.crop
rectangle from center
100X100
 image should have the correct size
200X100
 image should have the correct size
rectangle coordinates
10,10,100,100
 image should have the correct size
lwip.blur
SD=1
 should succeed
SD=5.5
 should succeed
SD=20
 should succeed
lwip.mirror (/flip)
around one axis
x
 should succeed
y
 should succeed
around two axes
xy
 should succeed
yx
 should succeed
lwip.pad
left-1, top-3, right-5, bottom-8, color-green
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[120,50,200]
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[20,150,20,80]
 image should have the correct size
left-5, top-15, right-25, bottom-40, color-{r:120,g:50,b:200}
 image should have the correct size
lwip.border
19 pixels, green
 image should have the correct size
9 pixels, [100,200,25]
 image should have the correct size
4 pixels, {r:100,g:200,b:25}
 image should have the correct size
lwip.sharpen
amp=0
 should succeed
amp=5.5
 should succeed
amp=99
 should succeed
amp=-5.5
 should succeed
amp=-99
 should succeed
lwip.saturate
delta=0
 should succeed
delta=0.8
 should succeed
delta=-1
 should succeed
lwip.lighten
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.darken
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.hue
shift=0
 should succeed
shift=50.5
 should succeed
shift=-50
 should succeed
shift=500
 should succeed
shift=-500
 should succeed
lwip.hslaAdjust
hs=0, sd=0, ld=0, ad=0
 should succeed
hs=50, sd=0.3, ld=0.4, ad=0.5
 should succeed
hs=-50, sd=-0.3, ld=-0.4, ad=-1
 should succeed
lwip.fade
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
delta=1
 should succeed
delta=-1
 should succeed
lwip.opacify
 should succeed
lwip.paste
background transparent, front opaque
 should see flipped image
background opaque, front transparent
 should see normal image
background opaque, front 50%
 should see blended image
background 50%, front opaque
 should see flipped image
background 50%, front 50%
 should see blended transparent image
front scaled 50% in middle
 should see small front in middle of back
lwip.setPixel
red pixel at 0,0
 pixel should have the correct color
red pixel at 100,100
 pixel should have the correct color
lwip.contain
800X100, no color, unspecified interpolation
 image should have the correct size
100X800, no color, lanczos interpolation
 image should have the correct size
100X400, gray, unspecified interpolation
 image should have the correct size
400X100, gray, lanczos interpolation
 image should have the correct size
lwip.cover
800X300, unspecified interpolation
 image should have the correct size (408ms)
300X800, lanczos interpolation
 image should have the correct size (806ms)
lwip.setMetadata
set png metadata
 should set metadata and be able to read metadata
 should not set metadata if setMetadata is not called
 should throw error if non-string metadata is set
 should remove metadata if called with null parameter
 can reset metadata on image with existing metadata
simultaneous operations locks
image.resize lock
 should lock image
image.scale lock
 should lock image
image.rotate lock
 should lock image
image.crop lock
 should lock image
image.blur lock
 should lock image
image.sharpen lock
 should lock image
image.mirror lock
 should lock image
image.border lock
 should lock image
image.pad lock
 should lock image
image.saturate lock
 should lock image
image.lighten lock
 should lock image
image.darken lock
 should lock image
image.hue lock
 should lock image
image.fade lock
 should lock image
image.opacify lock
 should lock image
image.hslaAdjust lock
 should lock image
image.setPixel lock
 should lock image
image.paste lock
 should lock image
image.contain lock
 should lock image
image.cover lock
 should lock image
failed ops lock release
image.resize release
 should release image lock
image.scale release
 should release image lock
image.rotate release
 should release image lock
image.crop release
 should release image lock
image.blur release
 should release image lock
image.sharpen release
 should release image lock
image.mirror release
 should release image lock
image.border release
 should release image lock
image.pad release
 should release image lock
image.saturate release
 should release image lock
image.lighten release
 should release image lock
image.darken release
 should release image lock
image.hue release
 should release image lock
image.fade release
 should release image lock
image.opacify release
 should release image lock
image.hslaAdjust release
 should release image lock
image.setPixel release
 should release image lock
image.paste release
 should release image lock
image.contain release
 should release image lock
image.cover release
 should release image lock
clone correct behavior
image.clone
 should clone the image at the correct state
extract correct behavior
image.extract
 should extract the sub-image at the correct state
image.batch
exec
same batch twice in parallel
 should throw an error
toBuffer
jpeg
quality 0
 should succeed
quality 100
 should succeed (191ms)
png
non interlaced
no compression
 should succeed (5894ms)
fast compression
 should succeed (568ms)
high compression
 should succeed
interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (161ms)
gif
non interlaced
no transparency
 should succeed
with transparency
 should succeed
interlaced
no transparency
 should succeed (324ms)
with transparency
 should succeed
writeFile
jpeg
quality 0
 should succeed
quality 100
 should succeed
png
non interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed
interlaced
no compression
 should succeed
fast compression
 should succeed (139ms)
high compression
 should succeed (963ms)
gif
non interlaced
no transparency
 should succeed (195ms)
with transparency
 should succeed (271ms)
interlaced
no transparency
 should succeed
with transparency
 should succeed (1064ms)
stress tests
open image 300 times (in parallel) and save to disk as jpeg
 should succeed (2547ms)
open image 100 times (in parallel) and save to disk as png (high compression, interlaced)
 should succeed (7479ms)
open image 300 times (in parallel) and save to disk as png (fast compression, not interlaced)
 should succeed (4971ms)
open image 300 times (in parallel) and save to disk as gif (128 colors, not interlaced, transparent)
 should succeed (3234ms)
7 random manipulations for 50 images (in parallel)
 should succeed (17450ms)
rotate an image 30 times (up to 90degs) (1)
 should succeed (6166ms)
rotate an image 30 times (up to 90degs) (2)
 should succeed (6588ms)
25 random manipulations on one image (1)
 should succeed (4292ms)
25 random manipulations on one image (2)
 should succeed (1723ms)
445 passing (1m)
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (196ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (182ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (145ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (136ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (144ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (137ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (999ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (615ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (585ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (346ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (591ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (345ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (898ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
 should succeed
grayscale image with alpha
 should succeed
rgb image
 should succeed
rgb image with alpha
 should succeed
lwip.create
500X500, [255,0,0,50]
 should succeed
500X500, [0,255,0]
 should succeed
500X500, no color specified
 should succeed
lwip.writeFile
jpeg
with type unspecified
params unspecified
 should succeed
params specified q=20
 should succeed
params specified q=0
 should succeed
with type specified
params unspecified
 should succeed
params specified
 should succeed
png
with type unspecified
params unspecified
 should succeed
params specified - no compression, not interlaced
 should succeed
params specified - no compression, interlaced
 should succeed
params specified - fast compression, not interlaced
 should succeed
params specified - fast compression, interlaced
 should succeed
params specified - high compression, not interlaced
 should succeed (159ms)
params specified - high compression, interlaced
 should succeed (150ms)
with type specified
params unspecified
 should succeed
gif
with type unspecified
params unspecified
 should succeed
params specified - 256, not interlaced, not transparent, 50
 should succeed
params specified - 99, interlaced, not transparent, 50
 should succeed
params specified - 256, not interlaced, transparent, 30
 should succeed
params specified - 16, interlaced, transparent, 88
 should succeed
with type specified
params unspecified
 should succeed
lwip.resize
1000X1330
unspecified interpolation
 image should have the correct size (1067ms)
lanczos interpolation
 image should have the correct size (1031ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
100X100
unspecified interpolation
 image should have the correct size
lwip.scale
width 150%, height 120%
unspecified interpolation
 image should have the correct size (372ms)
lanczos interpolation
 image should have the correct size (347ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
width and height 25%
unspecified interpolation
 image should have the correct size
lwip.rotate
right angles
90 degs
 should succeed
180 degs
 should succeed
270 degs
 should succeed
360 degs
 should succeed
450 degs
 should succeed
-90 degs
 should succeed
-180 degs
 should succeed
arbitrary angles and fills
33 degs, unspecified fill
 should succeed
-33 degs, "yellow" fill
 should succeed
45 degs, [50,100,300,75] fill
 should succeed
-5 degs, {r:200,g:110,b:220} fill
 should succeed
-5 degs, {r:200,g:110,b:220,a:50} fill
 should succeed
lwip.crop
rectangle from center
100X100
 image should have the correct size
200X100
 image should have the correct size
rectangle coordinates
10,10,100,100
 image should have the correct size
lwip.blur
SD=1
 should succeed
SD=5.5
 should succeed
SD=20
 should succeed
lwip.mirror (/flip)
around one axis
x
 should succeed
y
 should succeed
around two axes
xy
 should succeed
yx
 should succeed
lwip.pad
left-1, top-3, right-5, bottom-8, color-green
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[120,50,200]
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[20,150,20,80]
 image should have the correct size
left-5, top-15, right-25, bottom-40, color-{r:120,g:50,b:200}
 image should have the correct size
lwip.border
19 pixels, green
 image should have the correct size
9 pixels, [100,200,25]
 image should have the correct size
4 pixels, {r:100,g:200,b:25}
 image should have the correct size
lwip.sharpen
amp=0
 should succeed
amp=5.5
 should succeed
amp=99
 should succeed
amp=-5.5
 should succeed
amp=-99
 should succeed
lwip.saturate
delta=0
 should succeed
delta=0.8
 should succeed
delta=-1
 should succeed
lwip.lighten
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.darken
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.hue
shift=0
 should succeed
shift=50.5
 should succeed
shift=-50
 should succeed
shift=500
 should succeed
shift=-500
 should succeed
lwip.hslaAdjust
hs=0, sd=0, ld=0, ad=0
 should succeed
hs=50, sd=0.3, ld=0.4, ad=0.5
 should succeed
hs=-50, sd=-0.3, ld=-0.4, ad=-1
 should succeed
lwip.fade
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
delta=1
 should succeed
delta=-1
 should succeed
lwip.opacify
 should succeed
lwip.paste
background transparent, front opaque
 should see flipped image
background opaque, front transparent
 should see normal image
background opaque, front 50%
 should see blended image
background 50%, front opaque
 should see flipped image
background 50%, front 50%
 should see blended transparent image
front scaled 50% in middle
 should see small front in middle of back
lwip.setPixel
red pixel at 0,0
 pixel should have the correct color
red pixel at 100,100
 pixel should have the correct color
lwip.contain
800X100, no color, unspecified interpolation
 image should have the correct size
100X800, no color, lanczos interpolation
 image should have the correct size
100X400, gray, unspecified interpolation
 image should have the correct size
400X100, gray, lanczos interpolation
 image should have the correct size
lwip.cover
800X300, unspecified interpolation
 image should have the correct size (403ms)
300X800, lanczos interpolation
 image should have the correct size (817ms)
lwip.setMetadata
set png metadata
 should set metadata and be able to read metadata
 should not set metadata if setMetadata is not called
 should throw error if non-string metadata is set
 should remove metadata if called with null parameter
 can reset metadata on image with existing metadata
simultaneous operations locks
image.resize lock
 should lock image
image.scale lock
 should lock image
image.rotate lock
 should lock image
image.crop lock
 should lock image
image.blur lock
 should lock image
image.sharpen lock
 should lock image
image.mirror lock
 should lock image
image.border lock
 should lock image
image.pad lock
 should lock image
image.saturate lock
 should lock image
image.lighten lock
 should lock image
image.darken lock
 should lock image
image.hue lock
 should lock image
image.fade lock
 should lock image
image.opacify lock
 should lock image
image.hslaAdjust lock
 should lock image
image.setPixel lock
 should lock image
image.paste lock
 should lock image
image.contain lock
 should lock image
image.cover lock
 should lock image
failed ops lock release
image.resize release
 should release image lock
image.scale release
 should release image lock
image.rotate release
 should release image lock
image.crop release
 should release image lock
image.blur release
 should release image lock
image.sharpen release
 should release image lock
image.mirror release
 should release image lock
image.border release
 should release image lock
image.pad release
 should release image lock
image.saturate release
 should release image lock
image.lighten release
 should release image lock
image.darken release
 should release image lock
image.hue release
 should release image lock
image.fade release
 should release image lock
image.opacify release
 should release image lock
image.hslaAdjust release
 should release image lock
image.setPixel release
 should release image lock
image.paste release
 should release image lock
image.contain release
 should release image lock
image.cover release
 should release image lock
clone correct behavior
image.clone
 should clone the image at the correct state
extract correct behavior
image.extract
 should extract the sub-image at the correct state
image.batch
exec
same batch twice in parallel
 should throw an error
toBuffer
jpeg
quality 0
 should succeed
quality 100
 should succeed (140ms)
png
non interlaced
no compression
 should succeed
fast compression
 should succeed (213ms)
high compression
 should succeed
interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (312ms)
gif
non interlaced
no transparency
 should succeed (159ms)
with transparency
 should succeed
interlaced
no transparency
 should succeed
with transparency
 should succeed
writeFile
jpeg
quality 0
 should succeed
quality 100
 should succeed
png
non interlaced
no compression
 should succeed
fast compression
 should succeed (502ms)
high compression
 should succeed
interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (434ms)
gif
non interlaced
no transparency
 should succeed (186ms)
with transparency
 should succeed
interlaced
no transparency
 should succeed (599ms)
with transparency
 should succeed
stress tests
open image 300 times (in parallel) and save to disk as jpeg
 should succeed (2475ms)
open image 100 times (in parallel) and save to disk as png (high compression, interlaced)
 should succeed (7225ms)
open image 300 times (in parallel) and save to disk as png (fast compression, not interlaced)
 should succeed (4188ms)
open image 300 times (in parallel) and save to disk as gif (128 colors, not interlaced, transparent)
 should succeed (2880ms)
7 random manipulations for 50 images (in parallel)
 should succeed (16346ms)
rotate an image 30 times (up to 90degs) (1)
 should succeed (6176ms)
rotate an image 30 times (up to 90degs) (2)
 should succeed (6251ms)
25 random manipulations on one image (1)
 should succeed (1704ms)
25 random manipulations on one image (2)
 should succeed (2528ms)
445 passing (1m)
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (195ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (181ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (146ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (135ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (143ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (136ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (1017ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (616ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (585ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (350ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (583ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (346ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (786ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
 should succeed
grayscale image with alpha
 should succeed
rgb image
 should succeed
rgb image with alpha
 should succeed
lwip.create
500X500, [255,0,0,50]
 should succeed
500X500, [0,255,0]
 should succeed
500X500, no color specified
 should succeed
lwip.writeFile
jpeg
with type unspecified
params unspecified
 should succeed
params specified q=20
 should succeed
params specified q=0
 should succeed
with type specified
params unspecified
 should succeed
params specified
 should succeed
png
with type unspecified
params unspecified
 should succeed
params specified - no compression, not interlaced
 should succeed
params specified - no compression, interlaced
 should succeed
params specified - fast compression, not interlaced
 should succeed
params specified - fast compression, interlaced
 should succeed
params specified - high compression, not interlaced
 should succeed (145ms)
params specified - high compression, interlaced
 should succeed (138ms)
with type specified
params unspecified
 should succeed
gif
with type unspecified
params unspecified
 should succeed
params specified - 256, not interlaced, not transparent, 50
 should succeed
params specified - 99, interlaced, not transparent, 50
 should succeed
params specified - 256, not interlaced, transparent, 30
 should succeed
params specified - 16, interlaced, transparent, 88
 should succeed
with type specified
params unspecified
 should succeed
lwip.resize
1000X1330
unspecified interpolation
 image should have the correct size (986ms)
lanczos interpolation
 image should have the correct size (984ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
100X100
unspecified interpolation
 image should have the correct size
lwip.scale
width 150%, height 120%
unspecified interpolation
 image should have the correct size (323ms)
lanczos interpolation
 image should have the correct size (322ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
width and height 25%
unspecified interpolation
 image should have the correct size
lwip.rotate
right angles
90 degs
 should succeed
180 degs
 should succeed
270 degs
 should succeed
360 degs
 should succeed
450 degs
 should succeed
-90 degs
 should succeed
-180 degs
 should succeed
arbitrary angles and fills
33 degs, unspecified fill
 should succeed
-33 degs, "yellow" fill
 should succeed
45 degs, [50,100,300,75] fill
 should succeed
-5 degs, {r:200,g:110,b:220} fill
 should succeed
-5 degs, {r:200,g:110,b:220,a:50} fill
 should succeed
lwip.crop
rectangle from center
100X100
 image should have the correct size
200X100
 image should have the correct size
rectangle coordinates
10,10,100,100
 image should have the correct size
lwip.blur
SD=1
 should succeed
SD=5.5
 should succeed
SD=20
 should succeed
lwip.mirror (/flip)
around one axis
x
 should succeed
y
 should succeed
around two axes
xy
 should succeed
yx
 should succeed
lwip.pad
left-1, top-3, right-5, bottom-8, color-green
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[120,50,200]
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[20,150,20,80]
 image should have the correct size
left-5, top-15, right-25, bottom-40, color-{r:120,g:50,b:200}
 image should have the correct size
lwip.border
19 pixels, green
 image should have the correct size
9 pixels, [100,200,25]
 image should have the correct size
4 pixels, {r:100,g:200,b:25}
 image should have the correct size
lwip.sharpen
amp=0
 should succeed
amp=5.5
 should succeed
amp=99
 should succeed
amp=-5.5
 should succeed
amp=-99
 should succeed
lwip.saturate
delta=0
 should succeed
delta=0.8
 should succeed
delta=-1
 should succeed
lwip.lighten
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.darken
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.hue
shift=0
 should succeed
shift=50.5
 should succeed
shift=-50
 should succeed
shift=500
 should succeed
shift=-500
 should succeed
lwip.hslaAdjust
hs=0, sd=0, ld=0, ad=0
 should succeed
hs=50, sd=0.3, ld=0.4, ad=0.5
 should succeed
hs=-50, sd=-0.3, ld=-0.4, ad=-1
 should succeed
lwip.fade
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
delta=1
 should succeed
delta=-1
 should succeed
lwip.opacify
 should succeed
lwip.paste
background transparent, front opaque
 should see flipped image
background opaque, front transparent
 should see normal image
background opaque, front 50%
 should see blended image
background 50%, front opaque
 should see flipped image
background 50%, front 50%
 should see blended transparent image
front scaled 50% in middle
 should see small front in middle of back
lwip.setPixel
red pixel at 0,0
 pixel should have the correct color
red pixel at 100,100
 pixel should have the correct color
lwip.contain
800X100, no color, unspecified interpolation
 image should have the correct size
100X800, no color, lanczos interpolation
 image should have the correct size
100X400, gray, unspecified interpolation
 image should have the correct size
400X100, gray, lanczos interpolation
 image should have the correct size
lwip.cover
800X300, unspecified interpolation
 image should have the correct size (413ms)
300X800, lanczos interpolation
 image should have the correct size (805ms)
lwip.setMetadata
set png metadata
 should set metadata and be able to read metadata
 should not set metadata if setMetadata is not called
 should throw error if non-string metadata is set
 should remove metadata if called with null parameter
 can reset metadata on image with existing metadata
simultaneous operations locks
image.resize lock
 should lock image
image.scale lock
 should lock image
image.rotate lock
 should lock image
image.crop lock
 should lock image
image.blur lock
 should lock image
image.sharpen lock
 should lock image
image.mirror lock
 should lock image
image.border lock
 should lock image
image.pad lock
 should lock image
image.saturate lock
 should lock image
image.lighten lock
 should lock image
image.darken lock
 should lock image
image.hue lock
 should lock image
image.fade lock
 should lock image
image.opacify lock
 should lock image
image.hslaAdjust lock
 should lock image
image.setPixel lock
 should lock image
image.paste lock
 should lock image
image.contain lock
 should lock image
image.cover lock
 should lock image
failed ops lock release
image.resize release
 should release image lock
image.scale release
 should release image lock
image.rotate release
 should release image lock
image.crop release
 should release image lock
image.blur release
 should release image lock
image.sharpen release
 should release image lock
image.mirror release
 should release image lock
image.border release
 should release image lock
image.pad release
 should release image lock
image.saturate release
 should release image lock
image.lighten release
 should release image lock
image.darken release
 should release image lock
image.hue release
 should release image lock
image.fade release
 should release image lock
image.opacify release
 should release image lock
image.hslaAdjust release
 should release image lock
image.setPixel release
 should release image lock
image.paste release
 should release image lock
image.contain release
 should release image lock
image.cover release
 should release image lock
clone correct behavior
image.clone
 should clone the image at the correct state
extract correct behavior
image.extract
 should extract the sub-image at the correct state
image.batch
exec
same batch twice in parallel
 should throw an error
toBuffer
jpeg
quality 0
 should succeed (919ms)
quality 100
 should succeed
png
non interlaced
no compression
 should succeed (794ms)
fast compression
 should succeed
high compression
 should succeed (403ms)
interlaced
no compression
 should succeed
fast compression
 should succeed (109ms)
high compression
 should succeed
gif
non interlaced
no transparency
 should succeed (881ms)
with transparency
 should succeed
interlaced
no transparency
 should succeed
with transparency
 should succeed
writeFile
jpeg
quality 0
 should succeed (482ms)
quality 100
 should succeed
png
non interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (141ms)
interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (126ms)
gif
non interlaced
no transparency
 should succeed (146ms)
with transparency
 should succeed (534ms)
interlaced
no transparency
 should succeed
with transparency
 should succeed (429ms)
stress tests
open image 300 times (in parallel) and save to disk as jpeg
 should succeed (2615ms)
open image 100 times (in parallel) and save to disk as png (high compression, interlaced)
 should succeed (6648ms)
open image 300 times (in parallel) and save to disk as png (fast compression, not interlaced)
 should succeed (4503ms)
open image 300 times (in parallel) and save to disk as gif (128 colors, not interlaced, transparent)
 should succeed (3247ms)
7 random manipulations for 50 images (in parallel)
 should succeed (13601ms)
rotate an image 30 times (up to 90degs) (1)
 should succeed (5196ms)
rotate an image 30 times (up to 90degs) (2)
 should succeed (5644ms)
25 random manipulations on one image (1)
 should succeed (3625ms)
25 random manipulations on one image (2)
 should succeed (3192ms)
445 passing (1m)
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (216ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (218ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (171ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (147ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (170ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (169ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (1136ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (703ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (657ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (389ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (667ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (403ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (990ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
 should succeed
grayscale image with alpha
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (211ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (183ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (145ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (136ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (148ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (147ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (1093ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (700ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (651ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (377ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (770ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (368ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (813ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
 should succeed
grayscale image with alpha
 should succeed
rgb image
 should succeed
rgb image with alpha
 should succeed
lwip.create
500X500, [255,0,0,50]
 should succeed
500X500, [0,255,0]
 should succeed
500X500, no color specified
 should succeed
lwip.writeFile
jpeg
with type unspecified
params unspecified
 should succeed
params specified q=20
 should succeed
params specified q=0
 should succeed
with type specified
params unspecified
 should succeed
params specified
 should succeed
png
with type unspecified
params unspecified
 should succeed
params specified - no compression, not interlaced
 should succeed
params specified - no compression, interlaced
 should succeed
params specified - fast compression, not interlaced
 should succeed
params specified - fast compression, interlaced
 should succeed
params specified - high compression, not interlaced
 should succeed (152ms)
params specified - high compression, interlaced
 should succeed (143ms)
with type specified
params unspecified
 should succeed
gif
with type unspecified
params unspecified
 should succeed
params specified - 256, not interlaced, not transparent, 50
 should succeed
params specified - 99, interlaced, not transparent, 50
 should succeed
params specified - 256, not interlaced, transparent, 30
 should succeed
params specified - 16, interlaced, transparent, 88
 should succeed
with type specified
params unspecified
 should succeed
lwip.resize
1000X1330
unspecified interpolation
 image should have the correct size (1067ms)
lanczos interpolation
 image should have the correct size (1083ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
100X100
unspecified interpolation
 image should have the correct size
lwip.scale
width 150%, height 120%
unspecified interpolation
 image should have the correct size (369ms)
lanczos interpolation
 image should have the correct size (344ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
width and height 25%
unspecified interpolation
 image should have the correct size
lwip.rotate
right angles
90 degs
 should succeed
180 degs
 should succeed
270 degs
 should succeed
360 degs
 should succeed
450 degs
 should succeed
-90 degs
 should succeed
-180 degs
 should succeed
arbitrary angles and fills
33 degs, unspecified fill
 should succeed
-33 degs, "yellow" fill
 should succeed
45 degs, [50,100,300,75] fill
 should succeed
-5 degs, {r:200,g:110,b:220} fill
 should succeed
-5 degs, {r:200,g:110,b:220,a:50} fill
 should succeed
lwip.crop
rectangle from center
100X100
 image should have the correct size
200X100
 image should have the correct size
rectangle coordinates
10,10,100,100
 image should have the correct size
lwip.blur
SD=1
 should succeed
SD=5.5
 should succeed
SD=20
 should succeed
lwip.mirror (/flip)
around one axis
x
 should succeed
y
 should succeed
around two axes
xy
 should succeed
yx
 should succeed
lwip.pad
left-1, top-3, right-5, bottom-8, color-green
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[120,50,200]
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[20,150,20,80]
 image should have the correct size
left-5, top-15, right-25, bottom-40, color-{r:120,g:50,b:200}
 image should have the correct size
lwip.border
19 pixels, green
 image should have the correct size
9 pixels, [100,200,25]
 image should have the correct size
4 pixels, {r:100,g:200,b:25}
 image should have the correct size
lwip.sharpen
amp=0
 should succeed
amp=5.5
 should succeed
amp=99
 should succeed
amp=-5.5
 should succeed
amp=-99
 should succeed
lwip.saturate
delta=0
 should succeed
delta=0.8
 should succeed
delta=-1
 should succeed
lwip.lighten
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.darken
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.hue
shift=0
 should succeed
shift=50.5
 should succeed
shift=-50
 should succeed
shift=500
 should succeed
shift=-500
 should succeed
lwip.hslaAdjust
hs=0, sd=0, ld=0, ad=0
 should succeed
hs=50, sd=0.3, ld=0.4, ad=0.5
 should succeed
hs=-50, sd=-0.3, ld=-0.4, ad=-1
 should succeed
lwip.fade
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
delta=1
 should succeed
delta=-1
 should succeed
lwip.opacify
 should succeed
lwip.paste
background transparent, front opaque
 should see flipped image
background opaque, front transparent
 should see normal image
background opaque, front 50%
 should see blended image
background 50%, front opaque
 should see flipped image
background 50%, front 50%
 should see blended transparent image
front scaled 50% in middle
 should see small front in middle of back
lwip.setPixel
red pixel at 0,0
 pixel should have the correct color
red pixel at 100,100
 pixel should have the correct color
lwip.contain
800X100, no color, unspecified interpolation
 image should have the correct size
100X800, no color, lanczos interpolation
 image should have the correct size
100X400, gray, unspecified interpolation
 image should have the correct size
400X100, gray, lanczos interpolation
 image should have the correct size
lwip.cover
800X300, unspecified interpolation
 image should have the correct size (438ms)
300X800, lanczos interpolation
 image should have the correct size (864ms)
lwip.setMetadata
set png metadata
 should set metadata and be able to read metadata
 should not set metadata if setMetadata is not called
 should throw error if non-string metadata is set
 should remove metadata if called with null parameter
 can reset metadata on image with existing metadata
simultaneous operations locks
image.resize lock
 should lock image
image.scale lock
 should lock image
image.rotate lock
 should lock image
image.crop lock
 should lock image
image.blur lock
 should lock image
image.sharpen lock
 should lock image
image.mirror lock
 should lock image
image.border lock
 should lock image
image.pad lock
 should lock image
image.saturate lock
 should lock image
image.lighten lock
 should lock image
image.darken lock
 should lock image
image.hue lock
 should lock image
image.fade lock
 should lock image
image.opacify lock
 should lock image
image.hslaAdjust lock
 should lock image
image.setPixel lock
 should lock image
image.paste lock
 should lock image
image.contain lock
 should lock image
image.cover lock
 should lock image
failed ops lock release
image.resize release
 should release image lock
image.scale release
 should release image lock
image.rotate release
 should release image lock
image.crop release
 should release image lock
image.blur release
 should release image lock
image.sharpen release
 should release image lock
image.mirror release
 should release image lock
image.border release
 should release image lock
image.pad release
 should release image lock
image.saturate release
 should release image lock
image.lighten release
 should release image lock
image.darken release
 should release image lock
image.hue release
 should release image lock
image.fade release
 should release image lock
image.opacify release
 should release image lock
image.hslaAdjust release
 should release image lock
image.setPixel release
 should release image lock
image.paste release
 should release image lock
image.contain release
 should release image lock
image.cover release
 should release image lock
clone correct behavior
image.clone
 should clone the image at the correct state
extract correct behavior
image.extract
 should extract the sub-image at the correct state
image.batch
exec
same batch twice in parallel
 should throw an error
toBuffer
jpeg
quality 0
 should succeed
quality 100
 should succeed (736ms)
png
non interlaced
no compression
 should succeed (101ms)
fast compression
 should succeed (1275ms)
high compression
 should succeed (416ms)
interlaced
no compression
 should succeed (399ms)
fast compression
 should succeed (551ms)
high compression
 should succeed (1568ms)
gif
non interlaced
no transparency
 should succeed
with transparency
 should succeed
interlaced
no transparency
 should succeed (914ms)
with transparency
 should succeed (141ms)
writeFile
jpeg
quality 0
 should succeed
quality 100
 should succeed
png
non interlaced
no compression
 should succeed (442ms)
fast compression
 should succeed
high compression
 should succeed (220ms)
interlaced
no compression
 should succeed
fast compression
 should succeed (289ms)
high compression
 should succeed
gif
non interlaced
no transparency
 should succeed
with transparency
 should succeed
interlaced
no transparency
 should succeed (617ms)
with transparency
 should succeed (266ms)
stress tests
open image 300 times (in parallel) and save to disk as jpeg
 should succeed (2316ms)
open image 100 times (in parallel) and save to disk as png (high compression, interlaced)
 should succeed (6696ms)
open image 300 times (in parallel) and save to disk as png (fast compression, not interlaced)
 should succeed (4066ms)
open image 300 times (in parallel) and save to disk as gif (128 colors, not interlaced, transparent)
 should succeed (2734ms)
7 random manipulations for 50 images (in parallel)
 should succeed (16823ms)
rotate an image 30 times (up to 90degs) (1)
 should succeed (5609ms)
rotate an image 30 times (up to 90degs) (2)
 should succeed (6460ms)
25 random manipulations on one image (1)
 should succeed (2489ms)
25 random manipulations on one image (2)
 should succeed (9516ms)
445 passing (1m)
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (225ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (196ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (147ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (159ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (150ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (147ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (1072ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (671ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (631ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (361ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (601ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (349ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (777ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
 should succeed
grayscale image with alpha
 should succeed
rgb image
 should succeed
rgb image with alpha
 should succeed
lwip.create
500X500, [255,0,0,50]
 should succeed
500X500, [0,255,0]
 should succeed
500X500, no color specified
 should succeed
lwip.writeFile
jpeg
with type unspecified
params unspecified
 should succeed
params specified q=20
 should succeed
params specified q=0
 should succeed
with type specified
params unspecified
 should succeed
params specified
 should succeed
png
with type unspecified
params unspecified
 should succeed
params specified - no compression, not interlaced
 should succeed
params specified - no compression, interlaced
 should succeed
params specified - fast compression, not interlaced
 should succeed
params specified - fast compression, interlaced
 should succeed
params specified - high compression, not interlaced
 should succeed (141ms)
params specified - high compression, interlaced
 should succeed (129ms)
with type specified
params unspecified
 should succeed
gif
with type unspecified
params unspecified
 should succeed
params specified - 256, not interlaced, not transparent, 50
 should succeed
params specified - 99, interlaced, not transparent, 50
 should succeed
params specified - 256, not interlaced, transparent, 30
 should succeed
params specified - 16, interlaced, transparent, 88
 should succeed
with type specified
params unspecified
 should succeed
lwip.resize
1000X1330
unspecified interpolation
 image should have the correct size (990ms)
lanczos interpolation
 image should have the correct size (990ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
100X100
unspecified interpolation
 image should have the correct size
lwip.scale
width 150%, height 120%
unspecified interpolation
 image should have the correct size (325ms)
lanczos interpolation
 image should have the correct size (326ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
width and height 25%
unspecified interpolation
 image should have the correct size
lwip.rotate
right angles
90 degs
 should succeed
180 degs
 should succeed
270 degs
 should succeed
360 degs
 should succeed
450 degs
 should succeed
-90 degs
 should succeed
-180 degs
 should succeed
arbitrary angles and fills
33 degs, unspecified fill
 should succeed
-33 degs, "yellow" fill
 should succeed
45 degs, [50,100,300,75] fill
 should succeed
-5 degs, {r:200,g:110,b:220} fill
 should succeed
-5 degs, {r:200,g:110,b:220,a:50} fill
 should succeed
lwip.crop
rectangle from center
100X100
 image should have the correct size
200X100
 image should have the correct size
rectangle coordinates
10,10,100,100
 image should have the correct size
lwip.blur
SD=1
 should succeed
SD=5.5
 should succeed
SD=20
 should succeed
lwip.mirror (/flip)
around one axis
x
 should succeed
y
 should succeed
around two axes
xy
 should succeed
yx
 should succeed
lwip.pad
left-1, top-3, right-5, bottom-8, color-green
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[120,50,200]
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[20,150,20,80]
 image should have the correct size
left-5, top-15, right-25, bottom-40, color-{r:120,g:50,b:200}
 image should have the correct size
lwip.border
19 pixels, green
 image should have the correct size
9 pixels, [100,200,25]
 image should have the correct size
4 pixels, {r:100,g:200,b:25}
 image should have the correct size
lwip.sharpen
amp=0
 should succeed
amp=5.5
 should succeed
amp=99
 should succeed
amp=-5.5
 should succeed
amp=-99
 should succeed
lwip.saturate
delta=0
 should succeed
delta=0.8
 should succeed
delta=-1
 should succeed
lwip.lighten
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.darken
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.hue
shift=0
 should succeed
shift=50.5
 should succeed
shift=-50
 should succeed
shift=500
 should succeed
shift=-500
 should succeed
lwip.hslaAdjust
hs=0, sd=0, ld=0, ad=0
 should succeed
hs=50, sd=0.3, ld=0.4, ad=0.5
 should succeed
hs=-50, sd=-0.3, ld=-0.4, ad=-1
 should succeed
lwip.fade
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
delta=1
 should succeed
delta=-1
 should succeed
lwip.opacify
 should succeed
lwip.paste
background transparent, front opaque
 should see flipped image
background opaque, front transparent
 should see normal image
background opaque, front 50%
 should see blended image
background 50%, front opaque
 should see flipped image
background 50%, front 50%
 should see blended transparent image
front scaled 50% in middle
 should see small front in middle of back
lwip.setPixel
red pixel at 0,0
 pixel should have the correct color
red pixel at 100,100
 pixel should have the correct color
lwip.contain
800X100, no color, unspecified interpolation
 image should have the correct size
100X800, no color, lanczos interpolation
 image should have the correct size
100X400, gray, unspecified interpolation
 image should have the correct size
400X100, gray, lanczos interpolation
 image should have the correct size
lwip.cover
800X300, unspecified interpolation
 image should have the correct size (413ms)
300X800, lanczos interpolation
 image should have the correct size (838ms)
lwip.setMetadata
set png metadata
 should set metadata and be able to read metadata
 should not set metadata if setMetadata is not called
 should throw error if non-string metadata is set
 should remove metadata if called with null parameter
 can reset metadata on image with existing metadata
simultaneous operations locks
image.resize lock
 should lock image
image.scale lock
 should lock image
image.rotate lock
 should lock image
image.crop lock
 should lock image
image.blur lock
 should lock image
image.sharpen lock
 should lock image
image.mirror lock
 should lock image
image.border lock
 should lock image
image.pad lock
 should lock image
image.saturate lock
 should lock image
image.lighten lock
 should lock image
image.darken lock
 should lock image
image.hue lock
 should lock image
image.fade lock
 should lock image
image.opacify lock
 should lock image
image.hslaAdjust lock
 should lock image
image.setPixel lock
 should lock image
image.paste lock
 should lock image
image.contain lock
 should lock image
image.cover lock
 should lock image
failed ops lock release
image.resize release
 should release image lock
image.scale release
 should release image lock
image.rotate release
 should release image lock
image.crop release
 should release image lock
image.blur release
 should release image lock
image.sharpen release
 should release image lock
image.mirror release
 should release image lock
image.border release
 should release image lock
image.pad release
 should release image lock
image.saturate release
 should release image lock
image.lighten release
 should release image lock
image.darken release
 should release image lock
image.hue release
 should release image lock
image.fade release
 should release image lock
image.opacify release
 should release image lock
image.hslaAdjust release
 should release image lock
image.setPixel release
 should release image lock
image.paste release
 should release image lock
image.contain release
 should release image lock
image.cover release
 should release image lock
clone correct behavior
image.clone
 should clone the image at the correct state
extract correct behavior
image.extract
 should extract the sub-image at the correct state
image.batch
exec
same batch twice in parallel
 should throw an error
toBuffer
jpeg
quality 0
 should succeed (479ms)
quality 100
 should succeed (895ms)
png
non interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (159ms)
interlaced
no compression
 should succeed (145ms)
fast compression
 should succeed (294ms)
high compression
 should succeed (163ms)
gif
non interlaced
no transparency
 should succeed
with transparency
 should succeed
interlaced
no transparency
 should succeed (540ms)
with transparency
 should succeed
writeFile
jpeg
quality 0
 should succeed
quality 100
 should succeed
png
non interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (1065ms)
interlaced
no compression
 should succeed (457ms)
fast compression
 should succeed
high compression
 should succeed (137ms)
gif
non interlaced
no transparency
 should succeed
with transparency
 should succeed
interlaced
no transparency
 should succeed
with transparency
 should succeed (136ms)
stress tests
open image 300 times (in parallel) and save to disk as jpeg
 should succeed (3366ms)
open image 100 times (in parallel) and save to disk as png (high compression, interlaced)
 should succeed (7694ms)
open image 300 times (in parallel) and save to disk as png (fast compression, not interlaced)
 should succeed (4367ms)
open image 300 times (in parallel) and save to disk as gif (128 colors, not interlaced, transparent)
 should succeed (3092ms)
7 random manipulations for 50 images (in parallel)
 should succeed (10610ms)
rotate an image 30 times (up to 90degs) (1)
 should succeed (8649ms)
rotate an image 30 times (up to 90degs) (2)
 should succeed (6174ms)
25 random manipulations on one image (1)
 should succeed (4291ms)
25 random manipulations on one image (2)
 should succeed (3289ms)
445 passing (1m)
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (195ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (185ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (145ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (137ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (146ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (135ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (1007ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (620ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (588ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (347ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (586ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (351ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (796ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
 should succeed
grayscale image with alpha
 should succeed
rgb image
 should succeed
rgb image with alpha
 should succeed
lwip.create
500X500, [255,0,0,50]
 should succeed
500X500, [0,255,0]
 should succeed
500X500, no color specified
 should succeed
lwip.writeFile
jpeg
with type unspecified
params unspecified
 should succeed
params specified q=20
 should succeed
params specified q=0
 should succeed
with type specified
params unspecified
 should succeed
params specified
 should succeed
png
with type unspecified
params unspecified
 should succeed
params specified - no compression, not interlaced
 should succeed
params specified - no compression, interlaced
 should succeed
params specified - fast compression, not interlaced
 should succeed
params specified - fast compression, interlaced
 should succeed
params specified - high compression, not interlaced
 should succeed (143ms)
params specified - high compression, interlaced
 should succeed (137ms)
with type specified
params unspecified
 should succeed
gif
with type unspecified
params unspecified
 should succeed
params specified - 256, not interlaced, not transparent, 50
 should succeed
params specified - 99, interlaced, not transparent, 50
 should succeed
params specified - 256, not interlaced, transparent, 30
 should succeed
params specified - 16, interlaced, transparent, 88
 should succeed
with type specified
params unspecified
 should succeed
lwip.resize
1000X1330
unspecified interpolation
 image should have the correct size (991ms)
lanczos interpolation
 image should have the correct size (988ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
100X100
unspecified interpolation
 image should have the correct size
lwip.scale
width 150%, height 120%
unspecified interpolation
 image should have the correct size (323ms)
lanczos interpolation
 image should have the correct size (324ms)
cubic interpolation
 image should have the correct size
nearest-neighbor interpolation
 image should have the correct size
moving-average interpolation
 image should have the correct size
linear interpolation
 image should have the correct size
grid interpolation
 image should have the correct size
width and height 25%
unspecified interpolation
 image should have the correct size
lwip.rotate
right angles
90 degs
 should succeed
180 degs
 should succeed
270 degs
 should succeed
360 degs
 should succeed
450 degs
 should succeed
-90 degs
 should succeed
-180 degs
 should succeed
arbitrary angles and fills
33 degs, unspecified fill
 should succeed
-33 degs, "yellow" fill
 should succeed
45 degs, [50,100,300,75] fill
 should succeed
-5 degs, {r:200,g:110,b:220} fill
 should succeed
-5 degs, {r:200,g:110,b:220,a:50} fill
 should succeed
lwip.crop
rectangle from center
100X100
 image should have the correct size
200X100
 image should have the correct size
rectangle coordinates
10,10,100,100
 image should have the correct size
lwip.blur
SD=1
 should succeed
SD=5.5
 should succeed
SD=20
 should succeed
lwip.mirror (/flip)
around one axis
x
 should succeed
y
 should succeed
around two axes
xy
 should succeed
yx
 should succeed
lwip.pad
left-1, top-3, right-5, bottom-8, color-green
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[120,50,200]
 image should have the correct size
left-10, top-30, right-50, bottom-80, color-[20,150,20,80]
 image should have the correct size
left-5, top-15, right-25, bottom-40, color-{r:120,g:50,b:200}
 image should have the correct size
lwip.border
19 pixels, green
 image should have the correct size
9 pixels, [100,200,25]
 image should have the correct size
4 pixels, {r:100,g:200,b:25}
 image should have the correct size
lwip.sharpen
amp=0
 should succeed
amp=5.5
 should succeed
amp=99
 should succeed
amp=-5.5
 should succeed
amp=-99
 should succeed
lwip.saturate
delta=0
 should succeed
delta=0.8
 should succeed
delta=-1
 should succeed
lwip.lighten
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.darken
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
lwip.hue
shift=0
 should succeed
shift=50.5
 should succeed
shift=-50
 should succeed
shift=500
 should succeed
shift=-500
 should succeed
lwip.hslaAdjust
hs=0, sd=0, ld=0, ad=0
 should succeed
hs=50, sd=0.3, ld=0.4, ad=0.5
 should succeed
hs=-50, sd=-0.3, ld=-0.4, ad=-1
 should succeed
lwip.fade
delta=0
 should succeed
delta=0.5
 should succeed
delta=-0.5
 should succeed
delta=1
 should succeed
delta=-1
 should succeed
lwip.opacify
 should succeed
lwip.paste
background transparent, front opaque
 should see flipped image
background opaque, front transparent
 should see normal image
background opaque, front 50%
 should see blended image
background 50%, front opaque
 should see flipped image
background 50%, front 50%
 should see blended transparent image
front scaled 50% in middle
 should see small front in middle of back
lwip.setPixel
red pixel at 0,0
 pixel should have the correct color
red pixel at 100,100
 pixel should have the correct color
lwip.contain
800X100, no color, unspecified interpolation
 image should have the correct size
100X800, no color, lanczos interpolation
 image should have the correct size
100X400, gray, unspecified interpolation
 image should have the correct size
400X100, gray, lanczos interpolation
 image should have the correct size
lwip.cover
800X300, unspecified interpolation
 image should have the correct size (410ms)
300X800, lanczos interpolation
 image should have the correct size (797ms)
lwip.setMetadata
set png metadata
 should set metadata and be able to read metadata
 should not set metadata if setMetadata is not called
 should throw error if non-string metadata is set
 should remove metadata if called with null parameter
 can reset metadata on image with existing metadata
simultaneous operations locks
image.resize lock
 should lock image
image.scale lock
 should lock image
image.rotate lock
 should lock image
image.crop lock
 should lock image
image.blur lock
 should lock image
image.sharpen lock
 should lock image
image.mirror lock
 should lock image
image.border lock
 should lock image
image.pad lock
 should lock image
image.saturate lock
 should lock image
image.lighten lock
 should lock image
image.darken lock
 should lock image
image.hue lock
 should lock image
image.fade lock
 should lock image
image.opacify lock
 should lock image
image.hslaAdjust lock
 should lock image
image.setPixel lock
 should lock image
image.paste lock
 should lock image
image.contain lock
 should lock image
image.cover lock
 should lock image
failed ops lock release
image.resize release
 should release image lock
image.scale release
 should release image lock
image.rotate release
 should release image lock
image.crop release
 should release image lock
image.blur release
 should release image lock
image.sharpen release
 should release image lock
image.mirror release
 should release image lock
image.border release
 should release image lock
image.pad release
 should release image lock
image.saturate release
 should release image lock
image.lighten release
 should release image lock
image.darken release
 should release image lock
image.hue release
 should release image lock
image.fade release
 should release image lock
image.opacify release
 should release image lock
image.hslaAdjust release
 should release image lock
image.setPixel release
 should release image lock
image.paste release
 should release image lock
image.contain release
 should release image lock
image.cover release
 should release image lock
clone correct behavior
image.clone
 should clone the image at the correct state
extract correct behavior
image.extract
 should extract the sub-image at the correct state
image.batch
exec
same batch twice in parallel
 should throw an error
toBuffer
jpeg
quality 0
 should succeed
quality 100
 should succeed
png
non interlaced
no compression
 should succeed (583ms)
fast compression
 should succeed (404ms)
high compression
 should succeed (1147ms)
interlaced
no compression
 should succeed (260ms)
fast compression
 should succeed
high compression
 should succeed (3643ms)
gif
non interlaced
no transparency
 should succeed
with transparency
 should succeed
interlaced
no transparency
 should succeed
with transparency
 should succeed
writeFile
jpeg
quality 0
 should succeed
quality 100
 should succeed (876ms)
png
non interlaced
no compression
 should succeed (104ms)
fast compression
 should succeed
high compression
 should succeed (500ms)
interlaced
no compression
 should succeed
fast compression
 should succeed
high compression
 should succeed (212ms)
gif
non interlaced
no transparency
 should succeed
with transparency
 should succeed (475ms)
interlaced
no transparency
 should succeed
with transparency
 should succeed
stress tests
open image 300 times (in parallel) and save to disk as jpeg
 should succeed (2488ms)
open image 100 times (in parallel) and save to disk as png (high compression, interlaced)
 should succeed (7469ms)
open image 300 times (in parallel) and save to disk as png (fast compression, not interlaced)
 should succeed (4739ms)
open image 300 times (in parallel) and save to disk as gif (128 colors, not interlaced, transparent)
 should succeed (2972ms)
7 random manipulations for 50 images (in parallel)
 should succeed (25709ms)
rotate an image 30 times (up to 90degs) (1)
 should succeed (5118ms)
rotate an image 30 times (up to 90degs) (2)
 should succeed (5651ms)
25 random manipulations on one image (1)
 should succeed (5231ms)
25 random manipulations on one image (2)
1) should succeed
444 passing (2m)
1 failing
1) stress tests 25 random manipulations on one image (2) should succeed:
Error: Unable to resize image
at Error (native)
> lwip@0.0.7 test C:\Users\apairet\sources_windows\lwip
> mocha --opts tests/mocha.opts tests
lwip.open arguments validation
invalid source
with type
 should throw an error
without type
 should throw an error
path
without extension and no type
 should throw an error
with unknown extension and no type
 should throw an error
with invalid type
 should throw an error
with invalid type (raw buffer properties)
 should throw an error
buffer
without type
 should throw an error
with invalid type
 should throw an error
pixelbuffer
without raw buffer properties
 should throw an error
without width
 should throw an error
without height
 should throw an error
without width and height
 should throw an error
with non numeric width
 should throw an error
with non numeric height
 should throw an error
with non numeric width and height
 should throw an error
with negative width
 should throw an error
with negative height
 should throw an error
with negative width and height
 should throw an error
with incorrect width and height
 should throw an error
with correct width and height for 1 channel
 should succeed
with correct width and height for 2 channels
 should succeed
with correct width and height for 3 channels
 should succeed
with correct width and height for 4 channels
 should succeed
lwip.create arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.resize arguments validation
invalid interpolation
 should throw an error
image.scale arguments validation
invalid interpolation
 should throw an error
image.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (221ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (195ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (163ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (157ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (152ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (148ms)
invalid params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
GIF params
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
image.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
image.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
image.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
 should throw an error
image.getPixel arguments validation
coordinates exceeding image dimensions
 should throw an error
image.setPixel arguments validation
pixel coordinates out of bounds
 should throw an error
batch.resize arguments validation
invalid interpolation
 should throw an error
batch.scale arguments validation
invalid interpolation
 should throw an error
batch.rotate arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.toBuffer arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality: foo
 should throw an error
invalid quality: -1
 should throw an error
invalid quality: 101
 should throw an error
PNG params
valid params
defaults
 should succeed
none, false, true
 should succeed
fast, false, true
 should succeed
high, false, true
 should succeed (1081ms)
none, true, true
 should succeed
fast, true, true
 should succeed
high, true, true
 should succeed (639ms)
none, false, false
 should succeed
fast, false, false
 should succeed
high, false, false
 should succeed (605ms)
none, true, false
 should succeed
fast, true, false
 should succeed
high, true, false
 should succeed (354ms)
none, false, auto
 should succeed
fast, false, auto
 should succeed
high, false, auto
 should succeed (594ms)
none, true, auto
 should succeed
fast, true, auto
 should succeed
high, true, auto
 should succeed (347ms)
invalid params
invalid compression - string
 should throw an error
invalid compression - number
 should throw an error
invalid interlaced - string
 should throw an error
invalid interlaced - number
 should throw an error
GIF params
valid params
defaults
 should succeed
120, false, false, 50
 should succeed
256, true, false, 50
 should succeed
2, false, true, 0
 should succeed
120, true, true, 100
 should succeed
invalid params
invalid colors (wrong type)
 should throw an error
invalid colors (<2)
 should throw an error
invalid colors (>256)
 should throw an error
invalid interlaced
 should throw an error
invalid transparency
 should throw an error
invalid threshold (wrong type)
 should throw an error
invalid threshold (<0)
 should throw an error
invalid threshold (>100)
 should throw an error
batch.writeFile arguments validation
invalid encoding format
 should throw an error
JPEG params
invalid quality
 should throw an error
PNG params
invalid compression
 should throw an error
invalid interlaced
 should throw an error
batch.mirror arguments validation
invalid axis - g
 should throw an error
invalid axis - kjh
 should throw an error
batch.pad arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color array (8)
 should throw an error
invalid color string
 should throw an error
batch.border arguments validation
invalid color object (1)
 should throw an error
invalid color object (2)
 should throw an error
invalid color array (1)
 should throw an error
invalid color array (2)
 should throw an error
invalid color array (3)
 should throw an error
invalid color array (4)
 should throw an error
invalid color array (5)
 should throw an error
invalid color array (6)
 should throw an error
invalid color array (7)
 should throw an error
invalid color string
 should throw an error
batch.paste arguments validation
invalid pasted image (1)
 should throw an error
invalid pasted image (2)
 should throw an error
invalid pasted image (3)
 should throw an error
invalid pasted image (4)
 should throw an error
invalid pasted image (5)
 should throw an error
invalid pasted image (6)
 should throw an error
invalid pasted image (7)
 should throw an error
invalid pasted image (8)
 should throw an error
pasted image exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error
batch.setPixel arguments validation
pixel exceeds dimensions
at the time of exec
 should return an error
before exec
 should not return an error (797ms)
lwip.width
 should return correct width
lwip.height
 should return correct height
lwip.size
 should return correct size
lwip.getPixel
 should return correct color at 0,0
 should return correct color at 418, 242
 should return correct color at 499, 332
lwip.clone
 should return a new image object
lwip.extract
 should return a new image object
lwip.getMetadata
 should return correct metadata
 should return null if no metadata found
lwip.open
non-existing image
 should fail
jpeg file
rgb image (with jpg extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
invalid image
 should fail
png file
rgb image (with png extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
gif file
rgb image (with gif extension)
 should succeed
rgb image (no extension)
 should succeed
grayscale image
 should succeed
transparent image
 should succeed
invalid image
 should fail
jpeg buffer
rgb image
 should succeed
grayscale image
 should succeed
png buffer
rgb image
 should succeed
grayscale image
 should succeed
gif buffer
rgb image
 should succeed
grayscale image
 should succeed
raw pixel buffer
grayscale image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment