There's not a good way to do that from Python, the make_texture() hides all the MIPmap generation from you.
But from the command line, the maketx utility will let you specify your own individual MIP level images, using the --mipimage option (you pretty much have to supply them all, up to the point where you want the system to take over resizing from there on down). > On Feb 14, 2016, at 9:45 AM, Scott Wilson <[email protected]> wrote: > > Thanks! I have one other question. How do I edit a single mip level? For > example, make level 2 blue. I tried something like this in Python, but it > overwrites the whole image. > > import OpenImageIO as oiio > > buf = oiio.ImageBuf("/path/to/texture.tx") > buf.read(0, 2) > # Makes the mip level blue > edit_mip(buf) > # This destroys all of the other mip levels and replaces it with the read mip > level. > buf.write("/path/to/texture.tx") > On Feb 9 2016, at 3:20 pm, Larry Gritz <[email protected]> wrote: > ImageBufAlgo::make_texture() > > > > On Feb 7, 2016, at 8:51 PM, Scott Wilson <[email protected]> wrote: > > > > Hello, > > > > I'm not sure if this is the best place to ask this question, so if it > > isn't, please point me to where I should ask this question. > > > > So, I know about creating MIP-Maps using ImageOutput, but I would prefer to > > generate them using purely with ImageBufs since they have access to the > > super useful ImageBufAlgo, and I find them easier to work with. Is there a > > way to only use ImageBufs to create MIP-Mapped outputs, or am I only able > > to use ImageOutputs for that. > > > > Thanks for your time! > > > > Regards, > > Scott Wilson > > _______________________________________________ > > Oiio-dev mailing list > > [email protected] > > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > > <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> > -- > Larry Gritz > [email protected] > > > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org>_______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz [email protected]
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
