Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert an Image to 1Bit - Everything but outside White Space

Status
Not open for further replies.

Knexo10

IS-IT--Management
Feb 12, 2002
20
0
0
AU
I want to know the best way (or any way) to create a 1Bit image from another image.
I am taking a screen shot of a 3D object on the stage.
I want to create a 1Bit image of that object where any part of the object is black and the Rest is White.
So far I can capture the 3D object in an image with the Lingo

member("StageImage").image = (the stage).image

This works if the 3D model is set to Direct to Stage = False

I then can turn the captured image into a One bit image with the Lingo
member("StageImage").image = (the stage).image
srcImg = member("StageImage").image
onebitImage = image(srcImg .width, srcImg .height, 1)
onebitImage.copyPixels(srcImg , srcImg .rect, srcImg .rect)
member("1bit").image = onebitImage

The Problem with this is that if the 3D models textures contain anything light coloured then that area of the image becomes white instead of black in the 1Bit Image.

Does anyone have a way to turn any image into a 1 bit image where only the outside background colour is turned white and everything else is turned black.
Sort of like the trim white space feature when importing images.

Please help me if you have any ideas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top