Skip to content

Commit

Permalink
Various small fixes (#92)
Browse files Browse the repository at this point in the history
* Fix color correction node to support 1x scale

* remove % from sat

* remove websockets from requirements.txt
  • Loading branch information
joeyballentine authored Apr 30, 2022
1 parent 22312ca commit 191281c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 8 additions & 5 deletions backend/nodes/image_nodes.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
from __future__ import annotations

import math
import os
import platform
import subprocess
import time
from tempfile import mkdtemp
from typing import Tuple

import cv2
import numpy as np
from sanic.log import logger
from typing import Tuple

from .node_base import NodeBase
from .node_factory import NodeFactory
from .properties.inputs import *
from .properties.outputs import *
from .utils.image_utils import (
get_opencv_formats,
get_pil_formats,
normalize_normals,
normalize,
normalize_normals,
with_background,
)

Expand Down Expand Up @@ -695,7 +698,7 @@ def __init__(self):
self.inputs = [
ImageInput(),
SliderInput("Hue", -180, 180, 0),
SliderInput("Saturation (%)", -255, 255, 0),
SliderInput("Saturation", -255, 255, 0),
]
self.outputs = [ImageOutput()]
self.icon = "MdOutlineColorLens"
Expand Down Expand Up @@ -1449,8 +1452,8 @@ def run(
ref_h, ref_w = ref_img.shape[:2]

assert (
ref_w < input_w and ref_h < input_h
), "Image must be larger than Reference Image"
ref_w <= input_w and ref_h <= input_h
), "Image must be the same size or larger than Reference Image"

# Find the diff of both images

Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ opencv-python
Pillow
pylint
sanic
sanic_cors
websockets==9.1
sanic_cors

0 comments on commit 191281c

Please sign in to comment.