View Single Post
Unread 03-01-2005, 12:35 PM   #2
Brians256
Pro/Staff
 
Brians256's Avatar
 
Join Date: Oct 2001
Location: Klamath Falls, OR
Posts: 1,439
Default

Why go into an image format? Image processing is REALLY simple. Why not use something simple like this and just code it up? That way, you can do any sort of processing you want instead of relying on some 3rd party app to have the flexibility you need (but it probably doesn't have).

#include <stdio.h>

void ReadMyData(double *pData, int *pWidth, int *pHeight)
{
// insert code to read data here
*pWidth = 1000;
*pHeight = 100;
pData = malloc(sizeof(double) * (*pWidth) * (*pHeight));
}

// Example image proc code here
void PerformBlur(double *pData, int width, int height)
{
// insert blur code here
}

int main()
{
double *data;
int width, height;
ReadMyData(data, &width, &height);
PerformBlur(); // or whatever code you want
// insert code to write out data
}
Brians256 is offline   Reply With Quote