Add gravity support to embed feature (#1038)

This commit is contained in:
Kenric D'Souza
2017-12-13 00:59:16 +05:30
committed by Lovell Fuller
parent 1d7a0ea99e
commit 927b77700d
28 changed files with 426 additions and 7 deletions

View File

@@ -206,6 +206,13 @@ namespace sharp {
*/
std::string VipsWarningPop();
/*
Calculate the (left, top) coordinates of the output image
within the input image, applying the given gravity during an embed.
*/
std::tuple<int, int> CalculateEmbedPosition(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 gravity.