Refactor pipeline to use common 16-bit detection methods

This commit is contained in:
Lovell Fuller
2016-07-11 23:03:45 +01:00
parent d1d6155fd1
commit c42fb97419
4 changed files with 36 additions and 30 deletions

View File

@@ -117,17 +117,21 @@ namespace sharp {
std::tuple<int, int> CalculateCrop(int const inWidth, int const inHeight,
int const outWidth, int const outHeight, int const x, int const y);
/*
Are pixel values in this image 16-bit integer?
*/
bool Is16Bit(VipsInterpretation const interpretation);
/*
Return the image alpha maximum. Useful for combining alpha bands. scRGB
images are 0 - 1 for image data, but the alpha is 0 - 255.
*/
int MaximumImageAlpha(VipsInterpretation interpretation);
double MaximumImageAlpha(VipsInterpretation const interpretation);
/*
Get VIPS Boolean operatoin type from string
Get boolean operation type from string
*/
VipsOperationBoolean GetBooleanOperation(std::string opStr);
VipsOperationBoolean GetBooleanOperation(std::string const opStr);
} // namespace sharp