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

Added docs for Mip options in Save Image #2207

Merged
Merged
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
15 changes: 13 additions & 2 deletions backend/src/packages/chaiNNer_standard/image/io/save_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,24 @@ class TiffColorDepth(Enum):
EnumInput(DDSErrorMetric, label="Error Metric").with_id(9),
BoolInput("Dithering", default=False).with_id(8),
),
DdsMipMapsDropdown().with_id(10),
DdsMipMapsDropdown()
.with_id(10)
.with_docs(
"Whether [mipmaps](https://en.wikipedia.org/wiki/Mipmap) will be generated."
" Mipmaps vastly improve the quality of the image when it is viewed at a smaller size, but they also increase the file size by 33%."
),
if_group(
Condition.enum(6, SUPPORTED_WITH_ALPHA)
& Condition.enum(10, 0)
& Condition.type(0, "Image { channels: 4 }")
)(
BoolInput("Separate Alpha for Mip Maps", default=False).with_id(13),
BoolInput("Separate Alpha for MipMaps", default=False)
.with_id(13)
.with_docs(
"Enable this option when the alpha channel of an image is **not** transparency.",
"The normal method for downscaling images with an alpha channel will remove the color information of transparent pixels (setting them to black). This is a problem if the alpha channel isn't transparency. E.g. games commonly store extra material information in the alpha channel of normal maps. Downscaling color and alpha separately fixes this problem.",
"Note: Do not enable this option if the alpha channel is transparency. Otherwise, dark artifacts may appear around transparency edges.",
),
),
),
],
Expand Down