POV-Ray : Newsgroups : povray.advanced-users : Fitting image to view frustum Server Time: 18 Jun 2019 17:23:46 GMT
  Fitting image to view frustum (Message 1 to 3 of 3)  
From: Bald Eagle
Subject: Fitting image to view frustum
Date: 5 Dec 2016 17:30:01
Message: <web.5845a36e71f7f770c437ac910@news.povray.org>
I'd like to set up a scene that I'll be using a wide variety of images in, and
I'd like to be able to accurately and reliably fit the whole image to the screen
(image_map) when the scene is rendered, regardless of the dimensions - square,
wide and short, or tall and narrow.

I have something reasonably workable - but I was wondering if there was a
standard coding for this, given that so many software applications have some
sort of fit page / fit width option.

Thanks!


Post a reply to this message

From: clipka
Subject: Re: Fitting image to view frustum
Date: 5 Dec 2016 21:20:03
Message: <5845da03$1@news.povray.org>
Am 05.12.2016 um 18:27 schrieb Bald Eagle:
> I'd like to set up a scene that I'll be using a wide variety of images in, and
> I'd like to be able to accurately and reliably fit the whole image to the screen
> (image_map) when the scene is rendered, regardless of the dimensions - square,
> wide and short, or tall and narrow.

If you want the output image format to also adapt, then you're out of luck.

> I have something reasonably workable - but I was wondering if there was a
> standard coding for this, given that so many software applications have some
> sort of fit page / fit width option.

Nope, nothing inbuilt at present.


Post a reply to this message

From: Bald Eagle
Subject: Re: Fitting image to view frustum
Date: 6 Dec 2016 14:10:01
Message: <web.5846c5b1c8622f6cc437ac910@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

> If you want the output image format to also adapt, then you're out of luck.

I can specify that in SDL

> > I have something reasonably workable - but I was wondering if there was a
> > standard coding for this, given that so many software applications have some
> > sort of fit page / fit width option.
>
> Nope, nothing inbuilt at present.

I just need a calculation to plug into the beginning of the scene or use as a
macro.

I'm currently using:

#declare Picture = pigment {image_map {png "Image.png"}}
#declare Resolution = max_extent (Picture);
#declare PictureScale = (Resolution + <0, 0, 1>);
camera {location <Resolution.x/2, Resolution.y/2, -max(Resolution.x,
Resolution.y)*1.5>}


Post a reply to this message

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