Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed "LUT" to "color palette" #1991

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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