POV-Ray : Newsgroups : povray.newusers : reading bitmaps : Re: reading bitmaps Server Time
28 Jul 2024 16:24:01 EDT (-0400)
  Re: reading bitmaps  
From: Leroy Whetstone
Date: 21 Jun 2008 23:45:53
Message: <485DE7B8.9020306@joplin.com>
stevenvh wrote:
> Hi,
> I want to read an existing image. image_map is no use; I need individual pixel
> values for my calculations. Can't seem to find it in the docs.
> Can it be done?
> TIA
> Steven
> 
> 
By using an image map pigment (Pigm) and 'eval_pigment(Pigm, Vect)'
With the right 'Vect' value will give you a pixel value.
The image map is in the range of 0 to 1 for both directions.
So if an image is 200 by 300 then any pixel can be found by the vector
<x/200,y/300,0>.


Post a reply to this message

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