Add support for miniswhite when using TIFF output

This commit is contained in:
Dennis Beatty
2023-09-26 14:38:34 +01:00
committed by Lovell Fuller
parent 0f24f0f214
commit 28aa176957
9 changed files with 29 additions and 2 deletions

View File

@@ -940,6 +940,7 @@ class PipelineWorker : public Napi::AsyncWorker {
->set("Q", baton->tiffQuality)
->set("bitdepth", baton->tiffBitdepth)
->set("compression", baton->tiffCompression)
->set("miniswhite", baton->tiffMiniswhite)
->set("predictor", baton->tiffPredictor)
->set("pyramid", baton->tiffPyramid)
->set("tile", baton->tiffTile)
@@ -1136,6 +1137,7 @@ class PipelineWorker : public Napi::AsyncWorker {
->set("Q", baton->tiffQuality)
->set("bitdepth", baton->tiffBitdepth)
->set("compression", baton->tiffCompression)
->set("miniswhite", baton->tiffMiniswhite)
->set("predictor", baton->tiffPredictor)
->set("pyramid", baton->tiffPyramid)
->set("tile", baton->tiffTile)
@@ -1647,6 +1649,7 @@ Napi::Value pipeline(const Napi::CallbackInfo& info) {
baton->gifProgressive = sharp::AttrAsBool(options, "gifProgressive");
baton->tiffQuality = sharp::AttrAsUint32(options, "tiffQuality");
baton->tiffPyramid = sharp::AttrAsBool(options, "tiffPyramid");
baton->tiffMiniswhite = sharp::AttrAsBool(options, "tiffMiniswhite");
baton->tiffBitdepth = sharp::AttrAsUint32(options, "tiffBitdepth");
baton->tiffTile = sharp::AttrAsBool(options, "tiffTile");
baton->tiffTileWidth = sharp::AttrAsUint32(options, "tiffTileWidth");

View File

@@ -169,6 +169,7 @@ struct PipelineBaton {
VipsForeignTiffPredictor tiffPredictor;
bool tiffPyramid;
int tiffBitdepth;
bool tiffMiniswhite;
bool tiffTile;
int tiffTileHeight;
int tiffTileWidth;
@@ -335,6 +336,7 @@ struct PipelineBaton {
tiffPredictor(VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL),
tiffPyramid(false),
tiffBitdepth(8),
tiffMiniswhite(false),
tiffTile(false),
tiffTileHeight(256),
tiffTileWidth(256),