mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Modularise JS source in 'lib' subdirectory.
Generate public API documention via jsdoc comments.
This commit is contained in:
@@ -37,7 +37,6 @@ namespace sharp {
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
||||
VImage Composite(VImage src, VImage dst, const int x, const int y) {
|
||||
if(IsInputValidForComposition(src, dst)) {
|
||||
// Enlarge overlay src, if required
|
||||
@@ -178,7 +177,7 @@ namespace sharp {
|
||||
/*
|
||||
* Stretch luminance to cover full dynamic range.
|
||||
*/
|
||||
VImage Normalize(VImage image) {
|
||||
VImage Normalise(VImage image) {
|
||||
// Get original colourspace
|
||||
VipsInterpretation typeBeforeNormalize = image.interpretation();
|
||||
if (typeBeforeNormalize == VIPS_INTERPRETATION_RGB) {
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace sharp {
|
||||
/*
|
||||
* Stretch luminance to cover full dynamic range.
|
||||
*/
|
||||
VImage Normalize(VImage image);
|
||||
VImage Normalise(VImage image);
|
||||
|
||||
/*
|
||||
* Gamma encoding/decoding
|
||||
|
||||
@@ -649,9 +649,9 @@ class PipelineWorker : public Nan::AsyncWorker {
|
||||
image = sharp::Gamma(image, baton->gamma);
|
||||
}
|
||||
|
||||
// Apply normalization - stretch luminance to cover full dynamic range
|
||||
if (baton->normalize) {
|
||||
image = sharp::Normalize(image);
|
||||
// Apply normalisation - stretch luminance to cover full dynamic range
|
||||
if (baton->normalise) {
|
||||
image = sharp::Normalise(image);
|
||||
}
|
||||
|
||||
// Apply bitwise boolean operation between images
|
||||
@@ -1091,7 +1091,7 @@ NAN_METHOD(pipeline) {
|
||||
}
|
||||
baton->gamma = AttrTo<double>(options, "gamma");
|
||||
baton->greyscale = AttrTo<bool>(options, "greyscale");
|
||||
baton->normalize = AttrTo<bool>(options, "normalize");
|
||||
baton->normalise = AttrTo<bool>(options, "normalise");
|
||||
baton->angle = AttrTo<int32_t>(options, "angle");
|
||||
baton->rotateBeforePreExtract = AttrTo<bool>(options, "rotateBeforePreExtract");
|
||||
baton->flip = AttrTo<bool>(options, "flip");
|
||||
|
||||
@@ -62,7 +62,7 @@ struct PipelineBaton {
|
||||
int trimTolerance;
|
||||
double gamma;
|
||||
bool greyscale;
|
||||
bool normalize;
|
||||
bool normalise;
|
||||
int angle;
|
||||
bool rotateBeforePreExtract;
|
||||
bool flip;
|
||||
@@ -130,7 +130,7 @@ struct PipelineBaton {
|
||||
trimTolerance(0),
|
||||
gamma(0.0),
|
||||
greyscale(false),
|
||||
normalize(false),
|
||||
normalise(false),
|
||||
angle(0),
|
||||
flip(false),
|
||||
flop(false),
|
||||
|
||||
Reference in New Issue
Block a user