POV-Ray : Newsgroups : povray.general : Creating 16-bit HFs from C++ : Re: Creating 16-bit HFs from C++ Server Time
2 Aug 2024 00:19:01 EDT (-0400)
  Re: Creating 16-bit HFs from C++  
From: Vincent LE CHEVALIER
Date: 21 Feb 2005 07:18:38
Message: <4219d19e$1@news.povray.org>
scott wrote:
> I'm writing some code in C++ (on windows) to generate some 16-bit height
> field data.  What is going to be the easiest way for me to export the
> numbers to use in POV?  The PNG file format looks pretty complex (compared
> to BMP which is what I'm used to).
> 
> Is there any way to make POV use red+256*green or something like that from a
> BMP file?  Or some software that will make red+256*green into 16-bit grey
> PNG?
> 
> Thanks
> 
> Scott
> 
> 
Hi Scott

You could use TARGA to export your data. There is an introduction to 
this format here :
http://astronomy.swin.edu.au/~pbourke/dataformats/tga/

I did write a piece of C++ some years ago that handled the 
reading/writing of TGA images, but I fear it's not terribly well 
coded... And it is badly commented, and in french... I could give a try 
at cleaning it up if you wish, but I think you'd be better off writing 
it yourself ;-) Anyway the format is rather easy to understand.

Hope this helps

-- 
Vincent


Post a reply to this message

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