Commit 0e935555 authored by Ken Martin's avatar Ken Martin
Browse files

changed saveimageasppm due to change in pixel order

parent 65d134a7
......@@ -527,7 +527,8 @@ void vtkRenderWindow::SaveImageAsPPM()
int *size;
FILE *fp;
unsigned char *buffer;
int i;
// get the size
size = this->GetSize();
// get the data
......@@ -548,7 +549,10 @@ void vtkRenderWindow::SaveImageAsPPM()
fprintf(fp,"P6\n%i %i\n255\n",size[0],size[1]);
// now write the binary info
fwrite(buffer,3,size[0]*size[1],fp);
for (i = size[1]-1; i >= 0; i--)
{
fwrite(buffer + i*size[0]*3,3,size[0],fp);
}
fclose(fp);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment