POV-Ray : Newsgroups : povray.newusers : reading bitmaps : Re: reading bitmaps Server Time
28 Jul 2024 16:20:06 EDT (-0400)
  Re: reading bitmaps  
From: Jan Dvorak
Date: 22 Jun 2008 02:34:19
Message: <485df26b$1@news.povray.org>
Leroy Whetstone napsal(a):
> 
> 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>.
> 
this gives you the upper left corner of the pixels. You want their 
centers. you should use <(x+0.5)/200,(y+0.5)/300>


Post a reply to this message

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