Looking for help with BitBlit and BMP files...
Rick
ret at deltanet.com
Mon Dec 4 21:53:12 UTC 2000
Hello,
I am playing with some stereo photo 3-D in Squeak... Time to get out those goofey red and blue glasses;-)
I have run across something that seems a bit odd to me, maybe someone could point out what I my be missing here...
My problem is if leftEyeImage and rightEyeImage was saved as a BMP file from Photoshop4 then I get "blank holes (white)" in my final anaglyphImage where pure black should be.
If leftEyeImage and rightEyeImage was saved as a jpg file then everything seems as expected (black is black).
Do you think this would be from:
1) my BitBlit code below
2) Squeaks BMP vrs JPEG reading code
3) Photoshop4
leftEyeImage is a Form of depth 32
rightEyeImage is a Form of depth 32
rgbADD is 20
rgbSUB is 21
code snip...
anaglyphImage _ rightEyeImage deepCopy.
"Remove the red channel from the right eye image..."
(BitBlt
destForm: anaglyphImage
sourceForm: rightEyeImage
fillColor: Color red
combinationRule: self rgbSUB
destOrigin: 0 @ 0
sourceOrigin: 0 @ 0
extent: rightEyeImage extent
clipRect: rightEyeImage boundingBox) copyBits.
"Now add the red channel from the left eye image..."
(BitBlt
destForm: anaglyphImage
sourceForm: leftEyeImage
fillColor: Color red
combinationRule: self rgbADD
destOrigin: 0 @ 0
sourceOrigin: 0 @ 0
extent: leftEyeImage extent
clipRect: leftEyeImage boundingBox) copyBits
Any other Ideas? Or a faster way to do this?
Cordially,
-Rick-
PS - Anyone up for adding an anaglyph camera to Wonderland? Or how about an Interlaced camera?
PS - Is anyone out there doing a "blue screen" compositor in Squeak?
"All you've got to do is own up to your ignorance honestly, and you'll find people who are eager to fill your head with information." - Walt Disney -
More information about the Squeak-dev
mailing list
|