1) Define a second greyscale bitmap and use gflBitblt to copy of one to another. Causes an Unknown format error
2) Define a second greyscale bitmap and go through pixel by pixel and use gflGetColorAt/gflSetColorAt to copy the pixels one by one.
Unfortunately the second one ends up creating a bitmap with 8 vertical strips. Each vertical strip appears to be a squished version of the original page
Here is the code I used:
Code: Select all
tBitmap = gflAllockBitmap(GFL_GREY, wid, hgt, 4, NULL);
for (ix = 0; ix < wid; ix++)
for (iy = 0; iy < hgt; iy++)
{
GFL_COLOR color;
error = gflGetColorAt(bitmap, ix, iy, &color);
if (error)
DisplayGflError("", error);
error = gflSetColorAt(tBitmap, ix, iy, &color);
if (error)
DisplayGflError("", error);
}