From 9dbcf8db3ce742926b39e02aa8efa81fa3604edb Mon Sep 17 00:00:00 2001 From: nick black Date: Tue, 20 Oct 2020 23:31:53 -0400 Subject: [PATCH] OIIO: implement ncvisual_decode_loop() #1066 --- src/lib/oiio.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/oiio.cpp b/src/lib/oiio.cpp index ade7c526e..0e47c02eb 100644 --- a/src/lib/oiio.cpp +++ b/src/lib/oiio.cpp @@ -79,6 +79,17 @@ int ncvisual_decode(ncvisual* nc) { return 0; } +int ncvisual_decode_loop(ncvisual* ncv){ + int r = ncvisual_decode(ncv); + if(r == 1){ + OIIO::ImageSpec newspec; + if(ncv->details.image->seek_subimage(0, 0, &newspec)){ + return -1; + } + } + return r; +} + // resize, converting to RGBA (if necessary) along the way int ncvisual_resize(ncvisual* nc, int rows, int cols) { //fprintf(stderr, "%d/%d -> %d/%d on the resize\n", ncv->rows, ncv->cols, rows, cols);