mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
fixed odd numbers
This commit is contained in:
parent
f8eb03944e
commit
6a0bf916ad
1 changed files with 9 additions and 2 deletions
|
|
@ -1605,9 +1605,16 @@ class OverscanCrop:
|
|||
|
||||
output = []
|
||||
if self.input_width == width and self.input_height == height:
|
||||
pass
|
||||
return output
|
||||
|
||||
elif width <= self.input_width and height <= self.input_height:
|
||||
# Make sure resolution has odd numbers
|
||||
if width % 2 == 1:
|
||||
width -= 1
|
||||
|
||||
if height % 2 == 1:
|
||||
height -= 1
|
||||
|
||||
if width <= self.input_width and height <= self.input_height:
|
||||
output.append("crop={}:{}".format(width, height))
|
||||
|
||||
elif width >= self.input_width and height >= self.input_height:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue