Skip to content

Commit

Permalink
Renamed "LUT" to "color palette" (#1991)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Jul 26, 2023
1 parent fde40af commit c924c9a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class PaletteDitherAlgorithm(Enum):
@quantize_group.register(
schema_id="chainner:image:palette_dither",
name="Dither (Palette)",
description="Apply one of a variety of dithering algorithms using colors from a given palette. (Only the top row of pixels (y=0) of the palette will be used.)",
description="Apply one of a variety of dithering algorithms using colors from a given color palette. (Only the top row of pixels (y=0) of the palette will be used.)",
see_also="chainner:image:palette_from_image",
icon="MdShowChart",
inputs=[
ImageInput(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,22 @@ def quantize(img: np.ndarray, levels: int) -> np.ndarray:

@miscellaneous_group.register(
schema_id="chainner:image:lut",
name="Apply LUT",
name="Apply Palette",
description=(
"Apply a look up table (LUT) to a grayscale image."
" Only the top row of pixels (y=0) of the LUT will be used to do the look up."
"Apply a color palette to a grayscale image."
" Only the top row of pixels (y=0) of the palette will be used to do the look up."
),
see_also="chainner:image:palette_from_image",
icon="MdGradient",
inputs=[
ImageInput(channels=1),
ImageInput("LUT"),
ImageInput("Palette"),
],
outputs=[
ImageOutput(image_type=navi.Image(size_as="Input0", channels_as="Input1"))
],
)
def apply_lut_node(
def apply_palette_node(
img: np.ndarray,
lut: np.ndarray,
) -> np.ndarray:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ class PaletteExtractionMethod(Enum):
@miscellaneous_group.register(
schema_id="chainner:image:palette_from_image",
name="Palette from Image",
description=(
"Use an image to create a palette. A palette is an image with one row."
),
description=[
"Use an image to create a color palette.",
"The color palette is returned as an image with one row (height=1). All colors of the palette are in the top row of the image.",
],
see_also=[
"chainner:image:lut",
"chainner:image:palette_dither",
],
icon="MdGradient",
inputs=[
ImageInput(),
Expand Down

0 comments on commit c924c9a

Please sign in to comment.