POV-Ray : Newsgroups : povray.newusers : reading bitmaps Server Time
1 Nov 2024 14:20:19 EDT (-0400)
  reading bitmaps (Message 1 to 7 of 7)  
From: stevenvh
Subject: reading bitmaps
Date: 21 Jun 2008 20:55:01
Message: <web.485da228f56f5d9fc0721a1d0@news.povray.org>
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


Post a reply to this message

From: Leroy Whetstone
Subject: Re: reading bitmaps
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

From: Jan Dvorak
Subject: Re: reading bitmaps
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

From: stevenvh
Subject: Re: reading bitmaps
Date: 22 Jun 2008 14:40:00
Message: <web.485e9b5acd9ae0d0c0721a1d0@news.povray.org>
Thanks Jan and Leroy.
Can I also find the dimensions of the image as read, i.e. before normalization?


Post a reply to this message

From: Leroy Whetstone
Subject: Re: reading bitmaps
Date: 22 Jun 2008 23:37:26
Message: <485F373C.1040601@joplin.com>
stevenvh wrote:
> Thanks Jan and Leroy.
> Can I also find the dimensions of the image as read, i.e. before normalization?
> 
> 
Sorry Pov doesn't have that function. I use one of my several Graphic 
programs to get
that information.


Post a reply to this message

From: Warp
Subject: Re: reading bitmaps
Date: 23 Jun 2008 10:23:10
Message: <485fb1ce@news.povray.org>
Leroy Whetstone <lrw### [at] joplincom> wrote:

> stevenvh wrote:
> > Thanks Jan and Leroy.
> > Can I also find the dimensions of the image as read, i.e. before normalization?
> > 
> > 
> Sorry Pov doesn't have that function.

  POV-Ray 3.7 does.

-- 
                                                          - Warp


Post a reply to this message

From: Leroy Whetstone
Subject: Re: reading bitmaps
Date: 23 Jun 2008 23:40:31
Message: <48608973.6060503@joplin.com>
Warp wrote:  POV-Ray 3.7 does.
  Good! I'm going to have to Load it.


Post a reply to this message

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