mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Expose libvips pyramid/tile options for TIFF output (#1483)
This commit is contained in:
committed by
Lovell Fuller
parent
fd1ca1dbb2
commit
c695c40abc
@@ -763,6 +763,10 @@ class PipelineWorker : public Nan::AsyncWorker {
|
||||
->set("squash", baton->tiffSquash)
|
||||
->set("compression", baton->tiffCompression)
|
||||
->set("predictor", baton->tiffPredictor)
|
||||
->set("pyramid", baton->tiffPyramid)
|
||||
->set("tile", baton->tiffTile)
|
||||
->set("tile_height", baton->tiffTileHeight)
|
||||
->set("tile_width", baton->tiffTileWidth)
|
||||
->set("xres", baton->tiffXres)
|
||||
->set("yres", baton->tiffYres)));
|
||||
baton->bufferOut = static_cast<char*>(area->data);
|
||||
@@ -862,6 +866,10 @@ class PipelineWorker : public Nan::AsyncWorker {
|
||||
->set("squash", baton->tiffSquash)
|
||||
->set("compression", baton->tiffCompression)
|
||||
->set("predictor", baton->tiffPredictor)
|
||||
->set("pyramid", baton->tiffPyramid)
|
||||
->set("tile", baton->tiffTile)
|
||||
->set("tile_height", baton->tiffTileHeight)
|
||||
->set("tile_width", baton->tiffTileWidth)
|
||||
->set("xres", baton->tiffXres)
|
||||
->set("yres", baton->tiffYres));
|
||||
baton->formatOut = "tiff";
|
||||
@@ -1272,7 +1280,11 @@ NAN_METHOD(pipeline) {
|
||||
baton->webpLossless = AttrTo<bool>(options, "webpLossless");
|
||||
baton->webpNearLossless = AttrTo<bool>(options, "webpNearLossless");
|
||||
baton->tiffQuality = AttrTo<uint32_t>(options, "tiffQuality");
|
||||
baton->tiffPyramid = AttrTo<bool>(options, "tiffPyramid");
|
||||
baton->tiffSquash = AttrTo<bool>(options, "tiffSquash");
|
||||
baton->tiffTile = AttrTo<bool>(options, "tiffTile");
|
||||
baton->tiffTileWidth = AttrTo<uint32_t>(options, "tiffTileWidth");
|
||||
baton->tiffTileHeight = AttrTo<uint32_t>(options, "tiffTileHeight");
|
||||
baton->tiffXres = AttrTo<double>(options, "tiffXres");
|
||||
baton->tiffYres = AttrTo<double>(options, "tiffYres");
|
||||
// tiff compression options
|
||||
|
||||
@@ -122,7 +122,11 @@ struct PipelineBaton {
|
||||
int tiffQuality;
|
||||
VipsForeignTiffCompression tiffCompression;
|
||||
VipsForeignTiffPredictor tiffPredictor;
|
||||
bool tiffPyramid;
|
||||
bool tiffSquash;
|
||||
bool tiffTile;
|
||||
int tiffTileHeight;
|
||||
int tiffTileWidth;
|
||||
double tiffXres;
|
||||
double tiffYres;
|
||||
std::string err;
|
||||
@@ -215,7 +219,11 @@ struct PipelineBaton {
|
||||
tiffQuality(80),
|
||||
tiffCompression(VIPS_FOREIGN_TIFF_COMPRESSION_JPEG),
|
||||
tiffPredictor(VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL),
|
||||
tiffPyramid(false),
|
||||
tiffSquash(false),
|
||||
tiffTile(false),
|
||||
tiffTileHeight(256),
|
||||
tiffTileWidth(256),
|
||||
tiffXres(1.0),
|
||||
tiffYres(1.0),
|
||||
withMetadata(false),
|
||||
|
||||
Reference in New Issue
Block a user