I’m currently working on a fractal generator in C# and I’m trying to export my set of coordinates to a very simple image file.
What i have is a 1-dimensional array of 3d point (x, y and z coordinate) and i wish to save it to an image where the z value will be the color of the pixel (grayscale only).
From what i gathered, the RAW format would be the easiest to work with, but even then i couldn’t find documentation on it. I then looked at the namespace System.Drawing but i’m at a lost, it seems overly complicated for what i’m trying to achieve.
Is there an easy way to write such an image?
This link should help explain how to create an image pixel by pixel:
http://msdn.microsoft.com/en-us/library/system.drawing.image%28v=vs.80%29.aspx
then you should be able to use image1.Save with a string argument of the file location.
If you just want to display it on a winform, then you could keep the original source code from the link.
You can create a new image instead of loading one like so: