mirror of
https://github.com/lovell/sharp.git
synced 2026-02-05 14:16:17 +01:00
overlayWith improvements: diff sizes/formats, gravity, buffer input
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#define SRC_COMMON_H_
|
||||
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
#include <vips/vips8>
|
||||
|
||||
using vips::VImage;
|
||||
@@ -80,6 +82,13 @@ namespace sharp {
|
||||
*/
|
||||
void FreeCallback(char* data, void* hint);
|
||||
|
||||
/*
|
||||
Calculate the (left, top) coordinates of the output image
|
||||
within the input image, applying the given gravity.
|
||||
*/
|
||||
std::tuple<int, int> CalculateCrop(int const inWidth, int const inHeight,
|
||||
int const outWidth, int const outHeight, int const gravity);
|
||||
|
||||
} // namespace sharp
|
||||
|
||||
#endif // SRC_COMMON_H_
|
||||
|
||||
Reference in New Issue
Block a user