POV-Ray : Newsgroups : povray.newusers : Fabricate BMP with POV-Ray : Re: Fabricate BMP with POV-Ray Server Time
5 Jul 2024 03:30:11 EDT (-0400)
  Re: Fabricate BMP with POV-Ray  
From: Alain
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.