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:33:54 EDT (-0400)
  Re: Select distinct colors from image into color_map?  
From: [GDS|Entropy]
Date: 29 Dec 2010 09:44:07
Message: <op.vohcjqr30819q0@gdsentropy.nc.rr.com>
On Wed, 29 Dec 2010 03:58:55 -0500, Le_Forgeron <jgr### [at] freefr> wrote:

> 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)

That wasn't very nice.
Perhaps you would like to search the server for my name; you will find I  
am not any sort of "neo-poster". I see no need for redundancy, hence the  
question in the title.

> 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.

I will just write a program to do this then.

-- 
Ian McDonald
Lean Agile .NET 4.0/MVC
Senior Application Architect,
Developer and Security Analyst


Post a reply to this message

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