POV-Ray : Newsgroups : povray.newusers : Fabricate BMP with POV-Ray Server Time
2 Jul 2024 22:24:20 EDT (-0400)
  Fabricate BMP with POV-Ray (Message 1 to 3 of 3)  
From: guiguibu91
Subject: Fabricate BMP with POV-Ray
Date: 1 Aug 2010 08:50:01
Message: <web.4c556d1081eda7e2290c8fa00@news.povray.org>
I am looking for a POV macro or function to fabricate BMP image file, either
from a Cbits array (24 bits BMP's) or a Bits array and a Cmap array (indexed
BMP's). And conversely, to retrieve Cbits or Bits/Cmap from an existing BMP
image file.

Thank you for any hint or help
Ray Duranton


Post a reply to this message

From: clipka
Subject: Re: Fabricate BMP with POV-Ray
Date: 1 Aug 2010 12:05:50
Message: <4c559b5e$1@news.povray.org>
Am 01.08.2010 14:48, schrieb guiguibu91:
> I am looking for a POV macro or function to fabricate BMP image file, either
> from a Cbits array (24 bits BMP's) or a Bits array and a Cmap array (indexed
> BMP's). And conversely, to retrieve Cbits or Bits/Cmap from an existing BMP
> image file.

I'm not sure what you mean by "Cbits array" and "Cmap array", 
respectively. A google search for "cbits cmap" gives me (among other) 
blender source code which appears to be related to file output, as well 
as pages referring to what looks like an image processing library.

Either way, it doesn't sound like a job POV-Ray is particularly 
well-suited for, and you may be better off using some good image 
conversion software, as I guess that's what this all boils down to.


Post a reply to this message

From: Alain
Subject: Re: Fabricate BMP with POV-Ray
Date: 1 Aug 2010 15:56:56
Message: <4c55d188$1@news.povray.org>

> I am looking for a POV macro or function to fabricate BMP image file, either
> from a Cbits array (24 bits BMP's) or a Bits array and a Cmap array (indexed
> BMP's). And conversely, to retrieve Cbits or Bits/Cmap from an existing BMP
> image file.
>
> Thank you for any hint or help
> Ray Duranton
>
>

Under Windows, the default output format IS a true colour BMP file. So, 
in a sence, when you trace a scene you effectively "fabricate" a BMP 
image file. You can also output to some other formats, like PNG, TGA or 
TIF/TIFF.
POV-Ray normaly don't create paleted images, but you can use any other 
image manipulation application to reduce the colour depth. You will lose 
information and quality in that process.

If you want to retreive the information from a bitmap, or any other 
supported image format, you can use the image as an image_map and then 
use eval_pigment(Pigment, Location) to get the value at a particular point.

Using that, you can scan an image, many formats and dimentions, and use 
the information to create a mosaic composed of many "tiles". Take a look 
at the #while()....#end loop



Alain


Post a reply to this message

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