On Tue, Apr 28, 2015 at 1:10 AM, Larry Gritz <[email protected]> wrote:

> I'm going to guess that you're not really asking "how do I script oiiotool
> to resize images over a certain resolution", because writing a shell script
> to do that wouldn't be very hard, and writing a short Python program (based
> on ImageBuf/ImageBufAlgo directly, rather than oiiotool) would be even
> easier. (But if I'm wrong about the nature of your question, say so, and
> I'm sure we could outline how the script might work.)
>
> I *think* you know how to do the scripting, and you're asking how to judge
> which images should be resized, the problem being that you want something
> smarter than "resize the big ones". Maybe you have noticed that some images
> are big and "need the resolution", but other images are big but blurred out
> -- that is, they aren't taking advantage of the resolution (and storage)
> they entail, their highest representable frequencies at that resolution
> barely being used, so you are tempted to think that they could be re-saved
> at lower resolution without losing any essential detail. The trick is to
> figure out for which images that is the case, and how much you can safely
> downsize.
>
> Am I getting warmer? Or way off base?
>

Yup, pretty much. I ended up doing something less than ideal but it got the
job done. A more elegant solution would be nice for next time.

The bulk of the very large images were from a DSLR and I'm guessing the
jpeg quality was set to 100 so I did something like:

find ./ -size +6M -exec oiiotool {} --quality 80 -o {} \;

I did do a test on one image first and the size went from about 30MB to
~5MB and I zoomed in on a face to 192% and couldn't see any difference
between the two so I'm hoping that worked on all the images.

I shrunk the total size of the pictures from 5.3GB to ~750MB.

Thanks,
Richard
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to