Modularise JS source in 'lib' subdirectory.

Generate public API documention via jsdoc comments.
This commit is contained in:
Lovell Fuller
2016-11-01 14:33:16 +00:00
parent 552cfd6ff1
commit 8717ecc429
62 changed files with 3384 additions and 2779 deletions

View File

@@ -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) {

View File

@@ -41,7 +41,7 @@ namespace sharp {
/*
* Stretch luminance to cover full dynamic range.
*/
VImage Normalize(VImage image);
VImage Normalise(VImage image);
/*
* Gamma encoding/decoding

View File

@@ -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");

View File

@@ -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),