--- a/WinPrinterContext.st Fri Oct 19 15:52:05 2007 +0200
+++ b/WinPrinterContext.st Fri Oct 19 17:25:52 2007 +0200
@@ -2897,15 +2897,19 @@
|sortedImage formMask bitsWithTransparency|
sortedImage := aForm.
+
+ aForm depth ~~ 8 ifTrue:[
+ sortedImage := aForm asImageWithDepth: 8.
+ ].
"/ sortedImage := self sortColorMapImage: aForm.
sortedImage := self compressColorMapImage: sortedImage.
formMask := sortedImage mask.
formMask isNil
- ifTrue:[bitsWithTransparency := aForm bits ]
+ ifTrue:[bitsWithTransparency := sortedImage bits ]
ifFalse:[
|bitsWithTransparencySize|
- formMask := formMask asImageWithDepth: aForm depth.
+ formMask := formMask asImageWithDepth: sortedImage depth.
bitsWithTransparency := sortedImage bits copy.
bitsWithTransparencySize := bitsWithTransparency size.
formMask bits doWithIndex:[:maskBit :index |
@@ -3399,7 +3403,7 @@
bitmap.bmiHeader.biBitCount = __intVal(bitsPerPixel);
/*console_printf("drawBits depth:%d bitsPerPixel:%d IW%d W:%d H:%d\n",__intVal(imageDepth),bitmap.bmiHeader.biBitCount,bitmap.bmiHeader.biWidth,__intVal(w),bitmap.bmiHeader.biHeight);*/
- if (__intVal(imageDepth) == 8) {
+ // if (__intVal(imageDepth) == 8) {
for(col=0;col<256;col++)
{
bitmap.bmiColors[col].rgbBlue = __blueVector[col]; // Microsoft idea: change rgbBlue to rgbRed
@@ -3408,7 +3412,7 @@
bitmap.bmiColors[col].rgbReserved = 0;
}
- }
+ // }
bitmap.bmiColors[255].rgbBlue=255;
bitmap.bmiColors[255].rgbGreen=255;
@@ -5207,5 +5211,5 @@
!WinPrinterContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/WinPrinterContext.st,v 1.18 2007-10-19 13:52:05 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/WinPrinterContext.st,v 1.19 2007-10-19 15:25:52 fm Exp $'
! !