mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Allow PNG and WebP tile-based output in addition to JPEG (#622)
This commit is contained in:
committed by
Lovell Fuller
parent
6b426014ad
commit
bc84d1e47a
@@ -285,7 +285,13 @@ const tile = function tile (tile) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
// Format
|
||||
if (is.inArray(this.options.formatOut, ['jpeg', 'png', 'webp'])) {
|
||||
this.options.tileFormat = this.options.formatOut;
|
||||
} else if (this.options.formatOut !== 'input') {
|
||||
throw new Error('Invalid tile format ' + this.options.formatOut);
|
||||
}
|
||||
return this._updateFormatOut('dz');
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user