POV-Ray : Newsgroups : povray.newusers : Defining colors from an image : Re: Defining colors from an image Server Time
28 Jul 2024 22:29:49 EDT (-0400)
  Re: Defining colors from an image  
From: Greg M  Johnson
Date: 5 Jul 2007 22:20:55
Message: <468da707@news.povray.org>
Wow, that is cool.  I was mass-measuring some images with povray for a work
application and went to the trouble in my first case of converting each one
to ASCII-format PPM's.  


Warp wrote:

> OpalPlanet <ecs### [at] msncom> wrote:
>> Is there any way to take the color of a certain area of an image (jpeg,
>> png, etc.) and find out its values in rgb?
> 
>   Perhaps a bit surprisingly, there is:
> 
> // The image will extend from <0, 0, 0> to <1, 1, 0>:
> #declare Image = function { pigment { image_map { jpeg "SomeImage" } } };
> 
> #declare Pixel = Image(.5, .5, 0);
> 
> #debug concat("The value at <.5, .5> is <", vstr(3, Pixel, ", ", 0, 3),
> #">\n")
>


Post a reply to this message

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