2006.08.02 02:09 "RE: [Tiff] How to save in tiff format file?", by Toh kc
sorry to disturb again..
This time round, I have allocated the array dynamically.
int nPixels = Gwidth * Gheight;
unsigned char *sImg = NULL;
if (sImg == NULL)
sImg = new unsigned char [nPixels];
But the saved image is still distorted. I think is proably because of the intialisation of the array below.
(I have change array to sImg.)
for (int i = 0; i < Gheight; i++)
for(int j = 0; j < Gwidth; j++)
sImg[i * Gwidth + j] = (unsigned char)(j * i);
Or is it something wrong with the dimension of the image i am going to save, that why the saved image is distorted?
The World Cup Is Now On Your Favorite Front Page