POV-Ray : Newsgroups : povray.general : Image resolution : Re: Image resolution Server Time
31 Jul 2024 20:22:49 EDT (-0400)
  Re: Image resolution  
From: Eero Ahonen
Date: 15 Sep 2006 12:39:17
Message: <450ad735$1@news.povray.org>
Trevor G Quayle wrote:
> Does anyone know of a way to automatically detect the resolution of an input
> image in POV?
> 
> -tgq

With external scripting:

sed -e 's/input_image_width/`imgsize input_image.jpg |cut -d "\"" -f
2`/g' -e 's/input_image_height/`imgsize input_image.jpg |cut -d "\"" -f
4`/g' file.pov >file2.pov && povray +Ifile2.pov

Requires imgsize to be installed - comes with dev-perl/ImageSize in case
of Gentoo.

-- 
Eero "Aero" Ahonen
   http://www.zbxt.net
      aer### [at] removethiszbxtnetinvalid


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.