diff --git a/src/include/OpenImageIO/imagebufalgo.h b/src/include/OpenImageIO/imagebufalgo.h index 183f1c574a..b866076783 100644 --- a/src/include/OpenImageIO/imagebufalgo.h +++ b/src/include/OpenImageIO/imagebufalgo.h @@ -405,9 +405,11 @@ ROI OIIO_API text_size (string_view text, int fontsize=16, /// `channelvalues[i]` rather than copy any channel from `src`. /// If `channelorder` itself is empty, the implied channel order /// will be `{0, 1, ..., nchannels-1}`, meaning that it's only -/// renaming channels, not reordering them. +/// renaming, truncating, or extending channels, not reordering +/// the channels that are already present. /// @param channelvalues Fill values for color channels in which -/// `channelorder[i]` < 0. +/// `channelorder[i]` < 0. This can be empty if no channels are +/// to be filled with constant values. /// @param newchannelnames /// An array of new channel names. Channels for which this /// specifies an empty string will have their name taken from diff --git a/src/libOpenImageIO/maketexture.cpp b/src/libOpenImageIO/maketexture.cpp index ec6730928e..632b64941b 100644 --- a/src/libOpenImageIO/maketexture.cpp +++ b/src/libOpenImageIO/maketexture.cpp @@ -1345,6 +1345,7 @@ make_texture_impl(ImageBufAlgo::MakeTextureMode mode, const ImageBuf* input, << " Monochrome image detected. Converting to single channel texture.\n"; std::shared_ptr newsrc(new ImageBuf(src->spec())); ImageBufAlgo::channels(*newsrc, *src, 1, NULL, NULL, NULL, true); + newsrc->specmod().default_channel_names(); std::swap(src, newsrc); }