mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
27 lines
713 B
JavaScript
Executable File
27 lines
713 B
JavaScript
Executable File
'use strict';
|
|
|
|
var sharp = require('../../index');
|
|
var fixtures = require('../fixtures');
|
|
|
|
describe('Gamma correction', function() {
|
|
|
|
it('value of 0.0 (disabled)', function(done) {
|
|
sharp(fixtures.inputJpgWithGammaHoliness)
|
|
.resize(129, 111)
|
|
.toFile(fixtures.path('output.gamma-0.0.jpg'), done);
|
|
});
|
|
it('value of 2.2 (default)', function(done) {
|
|
sharp(fixtures.inputJpgWithGammaHoliness)
|
|
.resize(129, 111)
|
|
.gamma()
|
|
.toFile(fixtures.path('output.gamma-2.2.jpg'), done);
|
|
});
|
|
it('value of 3.0', function(done) {
|
|
sharp(fixtures.inputJpgWithGammaHoliness)
|
|
.resize(129, 111)
|
|
.gamma(3)
|
|
.toFile(fixtures.path('output.gamma-3.0.jpg'), done);
|
|
});
|
|
|
|
});
|