I hadn't tried a BMP or PNG file, but rather just converted the image(changed the contrast and gamma) so that i could see the contrasting pieces and saved that as a JPG, so here's another example for ya, this results in a white on black image:
Code:
Image* thisImage = myBinaryImage->GetImaqImage();
BCGOptions bcg;
bcg.brightness = 128.0f;
bcg.contrast = 89.0f;
bcg.gamma = 0.1f;
if (imaqBCGTransform(thisImage, thisImage, &bcg, NULL) == 0)
{
//error during save
printf("Error with imaqBCGTransform : %d\n", imaqGetLastError());
return ERROR;
}
if (imaqWriteFile(thisImage, "/BinaryImage.jpg", NULL) == 0)
{
//error during save
printf("Error saving image : %d\n", imaqGetLastError());
return ERROR;
}
- Jon