mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
utils/rescaler: add WebPRescalerGetScaledDimensions
+ use it in WebPPictureRescale() Change-Id: I491bea8cd56f0eb1ac8bf0829b9f36c77804219a
This commit is contained in:
@ -48,6 +48,14 @@ void WebPRescalerInit(WebPRescaler* const rescaler,
|
||||
int num_channels,
|
||||
int32_t* const work);
|
||||
|
||||
// If either 'scaled_width' or 'scaled_height' (but not both) is 0 the value
|
||||
// will be calculated preserving the aspect ratio, otherwise the values are
|
||||
// left unmodified. Returns true on success, false if either value is 0 after
|
||||
// performing the scaling calculation.
|
||||
int WebPRescalerGetScaledDimensions(int src_width, int src_height,
|
||||
int* const scaled_width,
|
||||
int* const scaled_height);
|
||||
|
||||
// Returns the number of input lines needed next to produce one output line,
|
||||
// considering that the maximum available input lines are 'max_num_lines'.
|
||||
int WebPRescaleNeededLines(const WebPRescaler* const rescaler,
|
||||
|
Reference in New Issue
Block a user