There is logic in the TextureSystem so that individual texture lookups will expand a 1-channel greyscale image to all 3 channels of a 3-channel lookup (versus using the "fill" color for the second two channels).
Even when using that TextureSystem option, it's only about what data value it copies into a user result for that individual texture lookup. It doesn't actually duplicate any image data in memory in the cache. But there is nothing in ImageCache or ImageBuf, as far as I can tell, that does anything like that. An ImageBuf that references a 1-channel file should just report as 1 channel. Are you doing something that indicates that it's actually replicating the data? Or are you just worried, based on this option of the texture system, that something weird might end up happening for an ordinary ImageBuf? > On Apr 5, 2021, at 11:30 AM, Phil Miller <philip.mil...@sri.com> wrote: > > I am having trouble using an ImageBuf with an ImageCache to read a single > channel (grayscale/monochrome) bmp image as a single channel image. The spec > in the internal oiio logic seems to always expand to 3 channels. I can use > the force flag when I read it, but then that bypasses the cache. The images > are fairly large (4k x 3k) and I need to read a million of them, so the > difference between one and three channels is significant. > > I appreciate any help and guidance. > > Sincerely, > Phil > _______________________________________________ > Oiio-dev mailing list > Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> -- Larry Gritz l...@larrygritz.com
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org