Add top/left offset support to overlayWith operation (#473)

This commit is contained in:
Rahul Nanwani
2016-07-05 14:42:02 +05:30
committed by Lovell Fuller
parent a5d85b8a54
commit 278273b5c3
15 changed files with 338 additions and 41 deletions

View File

@@ -108,8 +108,16 @@ namespace sharp {
std::tuple<int, int> CalculateCrop(int const inWidth, int const inHeight,
int const outWidth, int const outHeight, int const gravity);
/*
Calculate the (left, top) coordinates of the output image
within the input image, applying the given x and y offsets of the output image.
*/
std::tuple<int, int> CalculateCrop(int const inWidth, int const inHeight,
int const outWidth, int const outHeight, int const x, int const y);
int MaximumImageAlpha(VipsInterpretation interpretation);
} // namespace sharp
#endif // SRC_COMMON_H_