POV-Ray : Newsgroups : povray.general : Select distinct colors from image into color_map? : Re: Select distinct colors from image into color_map? Server Time
29 Jul 2024 16:32:22 EDT (-0400)
  Re: Select distinct colors from image into color_map?  
From: Le Forgeron
Date: 29 Dec 2010 03:58:56
Message: <4d1af850@news.povray.org>
Greetings,

Le 29/12/2010 09:30, Warp nous fit lire :
> [GDS|Entropy] <gdsHYentropyAThotmailDTcom> wrote:
>> Is there a way to do this in pov-ray (fopen maybe?), or will I need to  
>> write a program for it?
> 
>   Do what?
> 
As usual with neo-posters, they put their query in the title and
continue in the body (lame). (neo-neo-posters use SMS-style text too)

It seems that GDS want to access color(s) from image.
May be to put them in a color_map.

At least 3 issues:
 * even a gif is converted in a memory image without map (from index to
rgb values)
 * pixels are lost (sort of), the image is <0,0> to <1,1>
 * fopen is to be used with text file, not most image's formats: binary.

The function eval_pigment(pigment,vector) from functions.inc can be used
to sample the image_map (that's a pigment) at various places.

In fact, it might be wise to look at its definition.

Recovering all the colours from an image file, especially the unused map
entries: no.
Ordering the colours: DIY.


Post a reply to this message

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