Merge jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 03 Jun 2016 11:57:48 +0100
branchjv
changeset 7377 3d54f2920bff
parent 7372 c3559f5e9c3b (current diff)
parent 7376 72dd8ef02f7b (diff)
child 7380 62f0b3e4fa9c
Merge
Image.st
WindowSensor.st
--- a/Image.st	Wed Jun 01 07:00:26 2016 +0200
+++ b/Image.st	Fri Jun 03 11:57:48 2016 +0100
@@ -17,7 +17,7 @@
 	instanceVariableNames:'pixelFunction bytes width height bitsPerPixel depth colorMap
 		maxPixelValue rowByteSize bitsPerSample samplesPerPixel
 		photometric device deviceForm monoDeviceForm fullColorDeviceForm
-		mask maskedPixelsAre0 fileName imageSequence'
+		mask maskedPixelsAre0 fileName imageSequence metaData'
 	classVariableNames:'Lobby DitherAlgorithm NumberOfDitherColors
 		CollectGarbageWhenRunningOutOfColors ImageErrorSignal
 		ImageNotFoundQuerySignal BadImageFormatQuerySignal
@@ -64,14 +64,14 @@
 
     This gives you a device independent image.
     For display, a device representation is required, which can be
-    aquired by sending the 'onDevice:aDevice' message to the image. 
+    aquired by sending the 'onDevice:aDevice' message to the image.
     This creates a (possibly dithered) device-form,
     representing the image using the currently available colors.
 
     In rare cases, an explicit monochrome representation of the image is needed
     (some older X servers take monochrome icons only), this can be created by sending
     it the message
-        'monochromeOn:aDevice'.
+	'monochromeOn:aDevice'.
 
     As this class is very old and originated at times when typical graphic diplays only
     supported a limited number of colors (16 or 256), you will find a lot of code which deals
@@ -115,153 +115,153 @@
        DitherAlgorithm:
 
        nil                  a simple threshold algorithm
-                            (i.e. for mono, p<0.5 -> black, p>=0.5 -> white)
+			    (i.e. for mono, p<0.5 -> black, p>=0.5 -> white)
 
        #pattern             patterned dither
-                            (for p, take dithered color to fill pixel;
-                             uses dithering in color-class)
+			    (for p, take dithered color to fill pixel;
+			     uses dithering in color-class)
 
        #error               error diffusion dither (Floyd-Steinberg)
-                            planned - not yet implemented.
+			    planned - not yet implemented.
 
 
     Notice:
-        the set of attributes and the way they are stored originated initially 
-        from the need to represent tiff images. These turned out to use a relatively
-        large set of atributes, of which many are unused in other image formats.
-        (so it was sufficient).
-        Later, some VisualWorks compatibility protocol was added (mapped palettes, for
-        example), and some stuff could well be redefined in simpler ways.
-        We may do that, if we are bored and there is nothing else to improve... ;-)
+	the set of attributes and the way they are stored originated initially
+	from the need to represent tiff images. These turned out to use a relatively
+	large set of atributes, of which many are unused in other image formats.
+	(so it was sufficient).
+	Later, some VisualWorks compatibility protocol was added (mapped palettes, for
+	example), and some stuff could well be redefined in simpler ways.
+	We may do that, if we are bored and there is nothing else to improve... ;-)
 
 
     [instance variables:]
 
-        width               <Integer>       the width in pixels
-        height              <Integer>       the height in pixels
-        bytes               <ByteArray>     the full image information
-        photometric         <Symbol>        #rgb, #palette, #blackIs0 or #whiteIs0
-        samplesPerPixel     <Integer>       the number of planes
-        bitsPerSample       <Array>         the number of bits per plane
-
-        colorMap            <Array>         only if photometric is #palette;
-                                            maps pixel values to r/g/b values.
-
-        device              <Workstation>   the device on which deviceForm,
-                                            monoDeviceForm and lowResDeviceForm are
-
-        deviceForm          <Form>          the device form which gives the best
-                                            possible aproximation of the image on
-                                            device using standard colors.
-
-        monoDeviceForm      <Form>          the device form which gives a monochrome
-                                            aproximation of the image on device.
-
-        fullColorDeviceForm <Form>          the device form which gives the best
-                                            possible aproximation of the image on
-                                            device using private colors.
-                                            (not yet implemented)
-
-        mask                <ImageMask>     an optional mask;
-                                            if non-nil, only pixels for which the
-                                            corresponding mask bit is non-zero
-                                            are drawn.
-
-        maskedPixelsAre0    <Boolean>       a hint for image processors and drawers
-                                            if true, masked pixels are known to be
-                                            zero in the pixel bytes.
-
-        fileName            <String>        the name of the file from which the
-                                            image was loaded - nil otherwise.
-                                            Useful for image save functions
-                                            and for the UIPainter utility.
-
-        imageSequence                       the imageSequence, of which the
-                                            instance is a frame or nil,
-                                            if its not part of a sequence.
-
-        bitsPerPixel                        obsolete - not used in ST/X (kept for a while for subclasses)
-        depth                               - these have been added in instVar-slots
-        maxPixelValue                       - according to the ST-80's image class.
-        rowByteSize                         - to allow loading of st-80 images
-                                            - (which are stored as instVarAt:put: expressions)
+	width               <Integer>       the width in pixels
+	height              <Integer>       the height in pixels
+	bytes               <ByteArray>     the full image information
+	photometric         <Symbol>        #rgb, #palette, #blackIs0 or #whiteIs0
+	samplesPerPixel     <Integer>       the number of planes
+	bitsPerSample       <Array>         the number of bits per plane
+
+	colorMap            <Array>         only if photometric is #palette;
+					    maps pixel values to r/g/b values.
+
+	device              <Workstation>   the device on which deviceForm,
+					    monoDeviceForm and lowResDeviceForm are
+
+	deviceForm          <Form>          the device form which gives the best
+					    possible aproximation of the image on
+					    device using standard colors.
+
+	monoDeviceForm      <Form>          the device form which gives a monochrome
+					    aproximation of the image on device.
+
+	fullColorDeviceForm <Form>          the device form which gives the best
+					    possible aproximation of the image on
+					    device using private colors.
+					    (not yet implemented)
+
+	mask                <ImageMask>     an optional mask;
+					    if non-nil, only pixels for which the
+					    corresponding mask bit is non-zero
+					    are drawn.
+
+	maskedPixelsAre0    <Boolean>       a hint for image processors and drawers
+					    if true, masked pixels are known to be
+					    zero in the pixel bytes.
+
+	fileName            <String>        the name of the file from which the
+					    image was loaded - nil otherwise.
+					    Useful for image save functions
+					    and for the UIPainter utility.
+
+	imageSequence                       the imageSequence, of which the
+					    instance is a frame or nil,
+					    if its not part of a sequence.
+
+	bitsPerPixel                        obsolete - not used in ST/X (kept for a while for subclasses)
+	depth                               - these have been added in instVar-slots
+	maxPixelValue                       - according to the ST-80's image class.
+	rowByteSize                         - to allow loading of st-80 images
+					    - (which are stored as instVarAt:put: expressions)
 
     [class variables:]
 
-        Lobby               <Registry>      keeps track of known images
-                                            (for resource freeing with garbage collector)
-
-        DitherAlgorithm     <Symbol>        defines how to dither
-
-        NumberOfDitherColors <Integer>      defines, how many dither colors to use
-
-        FileFormats         <Dictionary>    associates filename extensions to
-                                            image reader classes (now set-up in startup-file)
-
-        CollectGarbageWhenRunningOutOfColors
-                            <Boolean>       if true, and we run out of available
-                                            device colors during creation of a
-                                            device image, collect garbage for
-                                            possible image reclamation.
-                                            If false, proceed immediately.
-                                            Default is true.
-
-        ImageNotFoundQuerySignal
-                            <QuerySignal>   raised, if an image could not be loaded
-                                            from a file. The parameter is the images
-                                            fileName.
-                                            A handler may return a replacement
-                                            image or proceed with nil.
-                                            If unhandled, a nil is returned from the
-                                            image creation.
-
-        BadImageFormatQuerySignal
-                            <QuerySignal>   raised, if an image could not be loaded
-                                            from a file due to a file error or
-                                            unsupported format.
-                                            A handler may return a replacement
-                                            image or proceed with nil.
-                                            If unhandled, a nil is returned from the
-                                            image creation.
-
-        ImageSaveErrorSignal
-                            <Signal>        parent of errors below.
-
-        FileCreationErrorSignal
-                            <Signal>        file could not be created when saving an
-                                            image.
-
-        CannotRepresentImageSignal
-                            <Signal>        the specified ImageReader cannot represent
-                                            the given image.
-
-        InformationLostQuerySignal
-                            <Signal>        the specified ImageReader can represent
-                                            the given image, but some information
-                                            (typically color resolution) is lost.
-                                            If unhandled, the save proceeds as usual.
+	Lobby               <Registry>      keeps track of known images
+					    (for resource freeing with garbage collector)
+
+	DitherAlgorithm     <Symbol>        defines how to dither
+
+	NumberOfDitherColors <Integer>      defines, how many dither colors to use
+
+	FileFormats         <Dictionary>    associates filename extensions to
+					    image reader classes (now set-up in startup-file)
+
+	CollectGarbageWhenRunningOutOfColors
+			    <Boolean>       if true, and we run out of available
+					    device colors during creation of a
+					    device image, collect garbage for
+					    possible image reclamation.
+					    If false, proceed immediately.
+					    Default is true.
+
+	ImageNotFoundQuerySignal
+			    <QuerySignal>   raised, if an image could not be loaded
+					    from a file. The parameter is the images
+					    fileName.
+					    A handler may return a replacement
+					    image or proceed with nil.
+					    If unhandled, a nil is returned from the
+					    image creation.
+
+	BadImageFormatQuerySignal
+			    <QuerySignal>   raised, if an image could not be loaded
+					    from a file due to a file error or
+					    unsupported format.
+					    A handler may return a replacement
+					    image or proceed with nil.
+					    If unhandled, a nil is returned from the
+					    image creation.
+
+	ImageSaveErrorSignal
+			    <Signal>        parent of errors below.
+
+	FileCreationErrorSignal
+			    <Signal>        file could not be created when saving an
+					    image.
+
+	CannotRepresentImageSignal
+			    <Signal>        the specified ImageReader cannot represent
+					    the given image.
+
+	InformationLostQuerySignal
+			    <Signal>        the specified ImageReader can represent
+					    the given image, but some information
+					    (typically color resolution) is lost.
+					    If unhandled, the save proceeds as usual.
 
 
     caveat:
-        the information in
-            photometric, bitsPerPixel, bitsPerSample, samplesPerPixel, depth , colorMap and maxPixelValue
-        is partially redundant and its handling stupid (not to say: braindamaged ;-).
-        The only excuse is that it grew over time, had to incorporate various alien/older schemes for
-        compatibility reasons (mostly coming from tiff format, which was the very first supported format). 
-        All of the above belongs into the single colorMap which must migrate from
-        a stupid seqColl to a color-aware real colorMap.
-        (we are in the process of doing so...)
+	the information in
+	    photometric, bitsPerPixel, bitsPerSample, samplesPerPixel, depth , colorMap and maxPixelValue
+	is partially redundant and its handling stupid (not to say: braindamaged ;-).
+	The only excuse is that it grew over time, had to incorporate various alien/older schemes for
+	compatibility reasons (mostly coming from tiff format, which was the very first supported format).
+	All of the above belongs into the single colorMap which must migrate from
+	a stupid seqColl to a color-aware real colorMap.
+	(we are in the process of doing so...)
 
     todo:
-        support alpha masks
-        cleanup the dithering & conversion code
-        cleanup the color/photometric mess
+	support alpha masks
+	cleanup the dithering & conversion code
+	cleanup the color/photometric mess
 
     [See also:]
-        Form Icon ImageReader
+	Form Icon ImageReader
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 "
 !
 
@@ -274,426 +274,426 @@
      any default bitmaps, or make certain that your application
      finds its bitmaps - even if they are in a separate directory)
 
-                                                                                        [exBegin]
-        (Image fromFile:'../../goodies/bitmaps/gifImages/garfield.gif') inspect
-                                                                                        [exEnd]
+											[exBegin]
+	(Image fromFile:'../../goodies/bitmaps/gifImages/garfield.gif') inspect
+											[exEnd]
 
     better use package relative file names:
-                                                                                        [exBegin]
-        (Image fromFile:'bitmaps/gifImages/garfield.gif' inPackage:'stx:goodies') inspect
-                                                                                        [exEnd]
+											[exBegin]
+	(Image fromFile:'bitmaps/gifImages/garfield.gif' inPackage:'stx:goodies') inspect
+											[exEnd]
     various file formats are supported:
-                                                                                        [exBegin]
-        (Image fromFile:'bitmaps/xpmBitmaps/misc_icons/SmalltalkX_clr.xpm' inPackage:'stx:goodies') inspect
-                                                                                        [exEnd]
-                                                                                        [exBegin]
-        (Image fromFile:'bitmaps/winBitmaps/okSmily_up.bmp' inPackage:'stx:goodies') inspect
-                                                                                        [exEnd]
+											[exBegin]
+	(Image fromFile:'bitmaps/xpmBitmaps/misc_icons/SmalltalkX_clr.xpm' inPackage:'stx:goodies') inspect
+											[exEnd]
+											[exBegin]
+	(Image fromFile:'bitmaps/winBitmaps/okSmily_up.bmp' inPackage:'stx:goodies') inspect
+											[exEnd]
 
     drawing
-                                                                                        [exBegin]
-        |imageClass image|
-
-        imageClass := Image implementorForDepth:24.
-        image      := imageClass width: 100 height: 50.
-        image bits:(ByteArray new:(image bytesPerRow*50)).
-        image fillRectangle:(0@0 extent:100@50) withColor:Color yellow.
-        image drawRectangle:(10@10 extent:20@20) withColor:Color red.
-        image fillRectangle:(40@20 extent:20@20) withColor:Color green.
-                                                                                        [exEnd]
+											[exBegin]
+	|imageClass image|
+
+	imageClass := Image implementorForDepth:24.
+	image      := imageClass width: 100 height: 50.
+	image bits:(ByteArray new:(image bytesPerRow*50)).
+	image fillRectangle:(0@0 extent:100@50) withColor:Color yellow.
+	image drawRectangle:(10@10 extent:20@20) withColor:Color red.
+	image fillRectangle:(40@20 extent:20@20) withColor:Color green.
+											[exEnd]
 
     The following examples demonstrate various depth and colorMap variations ...
 
     inline image:
       default: depth=1 & #blackIs0
-                                                                        [exBegin]
-        (Image 
-            width:8 height:8
-            fromArray:#( 2r11111111
-                         2r10000001
-                         2r10000001
-                         2r10000001
-                         2r10000001
-                         2r10000001
-                         2r10000001
-                         2r11111111 )
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	(Image
+	    width:8 height:8
+	    fromArray:#( 2r11111111
+			 2r10000001
+			 2r10000001
+			 2r10000001
+			 2r10000001
+			 2r10000001
+			 2r10000001
+			 2r11111111 )
+	) edit
+									[exEnd]
 
       with #whiteIs0 photometric
-                                                                        [exBegin]
-        ((Image width:8 height:8
-               fromArray:#( 2r11111111
-                            2r10000001
-                            2r10000001
-                            2r10000001
-                            2r10000001
-                            2r10000001
-                            2r10000001
-                            2r11111111 ))
-            photometric:#whiteIs0
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Image width:8 height:8
+	       fromArray:#( 2r11111111
+			    2r10000001
+			    2r10000001
+			    2r10000001
+			    2r10000001
+			    2r10000001
+			    2r10000001
+			    2r11111111 ))
+	    photometric:#whiteIs0
+	) edit
+									[exEnd]
 
       with a colorMap
-                                                                        [exBegin]
-        ((Image width:8 height:8
-               fromArray:#( 2r11111111
-                            2r10000001
-                            2r10000001
-                            2r10000001
-                            2r10000001
-                            2r10000001
-                            2r10000001
-                            2r11111111 ))
-            colorMap:(Array with:(Color red)
-                            with:(Color yellow))
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Image width:8 height:8
+	       fromArray:#( 2r11111111
+			    2r10000001
+			    2r10000001
+			    2r10000001
+			    2r10000001
+			    2r10000001
+			    2r10000001
+			    2r11111111 ))
+	    colorMap:(Array with:(Color red)
+			    with:(Color yellow))
+	) edit
+									[exEnd]
 
       a depth4 greyScale image:
       (default photometric is #blackIs0)
-                                                                        [exBegin]
-        (Depth4Image
-             width:8
-             height:4
-             fromArray:#[
-                            16r00 16r11 16r22 16r33
-                            16r44 16r55 16r66 16r77
-                            16r88 16r99 16raa 16rbb
-                            16rcc 16rdd 16ree 16rff
-                        ]
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	(Depth4Image
+	     width:8
+	     height:4
+	     fromArray:#[
+			    16r00 16r11 16r22 16r33
+			    16r44 16r55 16r66 16r77
+			    16r88 16r99 16raa 16rbb
+			    16rcc 16rdd 16ree 16rff
+			]
+	) edit
+									[exEnd]
       the same, magnified:
-                                                                        [exBegin]
-        ((Depth4Image
-             width:4
-             height:4
-             fromArray:#[
-                            16r01 16r23
-                            16r45 16r67
-                            16r89 16rab
-                            16rcd 16ref
-                        ])
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth4Image
+	     width:4
+	     height:4
+	     fromArray:#[
+			    16r01 16r23
+			    16r45 16r67
+			    16r89 16rab
+			    16rcd 16ref
+			])
+	    magnifiedBy:30
+	) edit
+									[exEnd]
       the following has the same effect:
-                                                                        [exBegin]
-        ((Image
-             width:4
-             height:4
-             depth:4
-             fromArray:#[
-                            16r01 16r23
-                            16r45 16r67
-                            16r89 16rab
-                            16rcd 16ref
-                        ])
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Image
+	     width:4
+	     height:4
+	     depth:4
+	     fromArray:#[
+			    16r01 16r23
+			    16r45 16r67
+			    16r89 16rab
+			    16rcd 16ref
+			])
+	    magnifiedBy:30
+	) edit
+									[exEnd]
       with reverse grey-interpretation:
-                                                                        [exBegin]
-        ((Depth4Image
-             width:4
-             height:4
-             fromArray:#[
-                            16r01 16r23
-                            16r45 16r67
-                            16r89 16rab
-                            16rcd 16ref
-                        ])
-            photometric:#whiteIs0;
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth4Image
+	     width:4
+	     height:4
+	     fromArray:#[
+			    16r01 16r23
+			    16r45 16r67
+			    16r89 16rab
+			    16rcd 16ref
+			])
+	    photometric:#whiteIs0;
+	    magnifiedBy:30
+	) edit
+									[exEnd]
 
       with 1-bit-per-pixel rgb interpretation:
-                                                                        [exBegin]
-        ((Depth4Image
-             width:4
-             height:4
-             fromArray:#[
-                            16r01 16r23
-                            16r45 16r67
-                            16r89 16rab
-                            16rcd 16ref
-                        ])
-            photometric:#rgb;
-            samplesPerPixel:3;
-            bitsPerSample:#(1 1 1);
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth4Image
+	     width:4
+	     height:4
+	     fromArray:#[
+			    16r01 16r23
+			    16r45 16r67
+			    16r89 16rab
+			    16rcd 16ref
+			])
+	    photometric:#rgb;
+	    samplesPerPixel:3;
+	    bitsPerSample:#(1 1 1);
+	    magnifiedBy:30
+	) edit
+									[exEnd]
 
       with 1/2/1 rgb interpretation:
-                                                                        [exBegin]
-        ((Depth4Image
-             width:4
-             height:4
-             fromArray:#[
-                            16r01 16r23
-                            16r45 16r67
-                            16r89 16rab
-                            16rcd 16ref
-                        ])
-            photometric:#rgb;
-            samplesPerPixel:3;
-            bitsPerSample:#(1 2 1);
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth4Image
+	     width:4
+	     height:4
+	     fromArray:#[
+			    16r01 16r23
+			    16r45 16r67
+			    16r89 16rab
+			    16rcd 16ref
+			])
+	    photometric:#rgb;
+	    samplesPerPixel:3;
+	    bitsPerSample:#(1 2 1);
+	    magnifiedBy:30
+	) edit
+									[exEnd]
 
       a 2/2/0 rgb image (i.e. no blue):
-                                                                        [exBegin]
-         |i|
-
-         i := Depth4Image
-                    width:4
-                    height:4
-                    fromArray:#[ 16r01 16r23
-                                 16r45 16r67
-                                 16r89 16rab
-                                 16rcd 16ref ].
-         i photometric:#rgb.
-         i samplesPerPixel:3.
-         i bitsPerSample:#(2 2 0).
-
-         i := i magnifiedBy:30.
-         i edit.
-                                                                        [exEnd]
+									[exBegin]
+	 |i|
+
+	 i := Depth4Image
+		    width:4
+		    height:4
+		    fromArray:#[ 16r01 16r23
+				 16r45 16r67
+				 16r89 16rab
+				 16rcd 16ref ].
+	 i photometric:#rgb.
+	 i samplesPerPixel:3.
+	 i bitsPerSample:#(2 2 0).
+
+	 i := i magnifiedBy:30.
+	 i edit.
+									[exEnd]
 
 
       a 0/0/4 rgb image (i.e. no red or green):
-                                                                        [exBegin]
-         |i|
-
-         i := Depth4Image
-                    width:4
-                    height:4
-                    fromArray:#[ 16r01 16r23
-                                 16r45 16r67
-                                 16r89 16rab
-                                 16rcd 16ref ].
-         i photometric:#rgb.
-         i samplesPerPixel:3.
-         i bitsPerSample:#(0 0 4).
-
-         i := i magnifiedBy:30.
-         i edit.
-                                                                        [exEnd]
+									[exBegin]
+	 |i|
+
+	 i := Depth4Image
+		    width:4
+		    height:4
+		    fromArray:#[ 16r01 16r23
+				 16r45 16r67
+				 16r89 16rab
+				 16rcd 16ref ].
+	 i photometric:#rgb.
+	 i samplesPerPixel:3.
+	 i bitsPerSample:#(0 0 4).
+
+	 i := i magnifiedBy:30.
+	 i edit.
+									[exEnd]
 
 
       a 2plane greyscale image:
-                                                                        [exBegin]
-        ((Depth2Image
-             width:4
-             height:4
-             fromArray:#[
-                            4r0123
-                            4r1230
-                            4r2301
-                            4r3012
-                        ])
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth2Image
+	     width:4
+	     height:4
+	     fromArray:#[
+			    4r0123
+			    4r1230
+			    4r2301
+			    4r3012
+			])
+	    magnifiedBy:30
+	) edit
+									[exEnd]
 
       with colors:
-                                                                        [exBegin]
-        ((Depth2Image
-             width:4
-             height:4
-             fromArray:#[
-                            4r0123
-                            4r1230
-                            4r2301
-                            4r3012
-                        ])
-            colorMap:(Array with:(Color black)
-                            with:(Color red)
-                            with:(Color green)
-                            with:(Color blue));
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth2Image
+	     width:4
+	     height:4
+	     fromArray:#[
+			    4r0123
+			    4r1230
+			    4r2301
+			    4r3012
+			])
+	    colorMap:(Array with:(Color black)
+			    with:(Color red)
+			    with:(Color green)
+			    with:(Color blue));
+	    magnifiedBy:30
+	) edit
+									[exEnd]
 
       depth8 image with 3/3/2 rgb interpretation:
-                                                                        [exBegin]
-        ((Depth8Image
-             width:16
-             height:16
-             fromArray:(ByteArray withAll:(0 to:16rFF)))
-            photometric:#rgb;
-            samplesPerPixel:3;
-            bitsPerSample:#(3 3 2);
-            magnifiedBy:10
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth8Image
+	     width:16
+	     height:16
+	     fromArray:(ByteArray withAll:(0 to:16rFF)))
+	    photometric:#rgb;
+	    samplesPerPixel:3;
+	    bitsPerSample:#(3 3 2);
+	    magnifiedBy:10
+	) edit
+									[exEnd]
 
       depth8 image with 2/2/2 rgb interpretation:
-                                                                        [exBegin]
-        ((Depth8Image
-             width:8
-             height:8
-             fromArray:(ByteArray withAll:(0 to:16r3F)))
-            photometric:#rgb;
-            samplesPerPixel:3;
-            bitsPerSample:#(2 2 2);
-            magnifiedBy:10
-        ) edit
-                                                                        [exEnd]
-
-                                                                        [exBegin]
-        ((Depth8Image
-             width:4
-             height:4
-             fromArray:#[
-                    16r30 16r0C  16r03 16r3F
-                    16r20 16r08  16r02 16r2A
-                    16r10 16r04  16r01 16r15
-                    16r00 16r00  16r00 16r00
-                        ])
-            photometric:#rgb;
-            samplesPerPixel:3;
-            bitsPerSample:#(2 2 2);
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth8Image
+	     width:8
+	     height:8
+	     fromArray:(ByteArray withAll:(0 to:16r3F)))
+	    photometric:#rgb;
+	    samplesPerPixel:3;
+	    bitsPerSample:#(2 2 2);
+	    magnifiedBy:10
+	) edit
+									[exEnd]
+
+									[exBegin]
+	((Depth8Image
+	     width:4
+	     height:4
+	     fromArray:#[
+		    16r30 16r0C  16r03 16r3F
+		    16r20 16r08  16r02 16r2A
+		    16r10 16r04  16r01 16r15
+		    16r00 16r00  16r00 16r00
+			])
+	    photometric:#rgb;
+	    samplesPerPixel:3;
+	    bitsPerSample:#(2 2 2);
+	    magnifiedBy:30
+	) edit
+									[exEnd]
 
       trueColor image: remember: bytes are MSB
-                                                                        [exBegin]
-        ((Depth16Image
-             width:4
-             height:5
-             fromArray:#[
-                    2r01111100 2r00000000  2r00000011 2r11100000  2r00000000 2r00011111  2r01111111 2r11111111
-                    2r00111100 2r00000000  2r00000001 2r11100000  2r00000000 2r00001111  2r00111101 2r11101111
-                    2r00011100 2r00000000  2r00000000 2r11100000  2r00000000 2r00000111  2r00011100 2r11100111
-                    2r00001100 2r00000000  2r00000000 2r01100000  2r00000000 2r00000001  2r00001100 2r01100011
-                    2r00000100 2r00000000  2r00000000 2r00100000  2r00000000 2r00000001  2r00000100 2r00100001
-                        ])
-            photometric:#rgb;
-            samplesPerPixel:3;
-            bitsPerSample:#(5 5 5);
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
-
-                                                                        [exBegin]
-        ((Depth24Image
-             width:4
-             height:4
-             fromArray:#[
-                    16rFF 16r00 16r00  16rFF 16r00 16r00  16rFF 16r00 16r00  16rFF 16r00 16r00
-                    16r00 16rFF 16r00  16r00 16rFF 16r00  16r00 16rFF 16r00  16r00 16rFF 16r00
-                    16r00 16r00 16rFF  16r00 16r00 16rFF  16r00 16r00 16rFF  16r00 16r00 16rFF
-                    16rFF 16rFF 16rFF  16rFF 16rFF 16rFF  16rFF 16rFF 16rFF  16rFF 16rFF 16rFF
-                        ])
-            photometric:#rgb;
-            samplesPerPixel:3;
-            bitsPerSample:#(8 8 8);
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth16Image
+	     width:4
+	     height:5
+	     fromArray:#[
+		    2r01111100 2r00000000  2r00000011 2r11100000  2r00000000 2r00011111  2r01111111 2r11111111
+		    2r00111100 2r00000000  2r00000001 2r11100000  2r00000000 2r00001111  2r00111101 2r11101111
+		    2r00011100 2r00000000  2r00000000 2r11100000  2r00000000 2r00000111  2r00011100 2r11100111
+		    2r00001100 2r00000000  2r00000000 2r01100000  2r00000000 2r00000001  2r00001100 2r01100011
+		    2r00000100 2r00000000  2r00000000 2r00100000  2r00000000 2r00000001  2r00000100 2r00100001
+			])
+	    photometric:#rgb;
+	    samplesPerPixel:3;
+	    bitsPerSample:#(5 5 5);
+	    magnifiedBy:30
+	) edit
+									[exEnd]
+
+									[exBegin]
+	((Depth24Image
+	     width:4
+	     height:4
+	     fromArray:#[
+		    16rFF 16r00 16r00  16rFF 16r00 16r00  16rFF 16r00 16r00  16rFF 16r00 16r00
+		    16r00 16rFF 16r00  16r00 16rFF 16r00  16r00 16rFF 16r00  16r00 16rFF 16r00
+		    16r00 16r00 16rFF  16r00 16r00 16rFF  16r00 16r00 16rFF  16r00 16r00 16rFF
+		    16rFF 16rFF 16rFF  16rFF 16rFF 16rFF  16rFF 16rFF 16rFF  16rFF 16rFF 16rFF
+			])
+	    photometric:#rgb;
+	    samplesPerPixel:3;
+	    bitsPerSample:#(8 8 8);
+	    magnifiedBy:30
+	) edit
+									[exEnd]
 
       32bit trueColor image:
-                                                                        [exBegin]
-        ((Depth32Image
-             width:4
-             height:4
-             fromArray:#[
-                    16rFF 16r00 16r00 16r00  16rFF 16r00 16r00 16r00  16rFF 16r00 16r00 16r00  16rFF 16r00 16r00 16r00
-                    16r00 16rFF 16r00 16r00  16r00 16rFF 16r00 16r00  16r00 16rFF 16r00 16r00  16r00 16rFF 16r00 16r00
-                    16r00 16r00 16rFF 16r00  16r00 16r00 16rFF 16r00  16r00 16r00 16rFF 16r00  16r00 16r00 16rFF 16r00
-                    16rFF 16rFF 16rFF 16r00  16rFF 16rFF 16rFF 16r00  16rFF 16rFF 16rFF 16r00  16rFF 16rFF 16rFF 16r00
-                        ])
-            photometric:#rgb;
-            samplesPerPixel:4;
-            bitsPerSample:#(8 8 8 8);
-            magnifiedBy:30
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth32Image
+	     width:4
+	     height:4
+	     fromArray:#[
+		    16rFF 16r00 16r00 16r00  16rFF 16r00 16r00 16r00  16rFF 16r00 16r00 16r00  16rFF 16r00 16r00 16r00
+		    16r00 16rFF 16r00 16r00  16r00 16rFF 16r00 16r00  16r00 16rFF 16r00 16r00  16r00 16rFF 16r00 16r00
+		    16r00 16r00 16rFF 16r00  16r00 16r00 16rFF 16r00  16r00 16r00 16rFF 16r00  16r00 16r00 16rFF 16r00
+		    16rFF 16rFF 16rFF 16r00  16rFF 16rFF 16rFF 16r00  16rFF 16rFF 16rFF 16r00  16rFF 16rFF 16rFF 16r00
+			])
+	    photometric:#rgb;
+	    samplesPerPixel:4;
+	    bitsPerSample:#(8 8 8 8);
+	    magnifiedBy:30
+	) edit
+									[exEnd]
 
     storing - only a subset of formats (TIFF, XBM, XPM) currently support storing:
-                                                                        [exBegin]
-        |img|
-
-        img := Image fromFile:'bitmaps/winBitmaps/okSmily_up.bmp' inPackage:'stx:goodies'.
-        img saveOn:'myImage.tiff'.
-        (Image fromFile:'myImage.tiff') inspect.
-        img saveOn:'myImage.gif'.
-        (Image fromFile:'myImage.gif') inspect.
-                                                                        [exEnd]
+									[exBegin]
+	|img|
+
+	img := Image fromFile:'bitmaps/winBitmaps/okSmily_up.bmp' inPackage:'stx:goodies'.
+	img saveOn:'myImage.tiff'.
+	(Image fromFile:'myImage.tiff') inspect.
+	img saveOn:'myImage.gif'.
+	(Image fromFile:'myImage.gif') inspect.
+									[exEnd]
 
     magnifying (any factor):
-                                                                        [exBegin]
-        ((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
-            magnifiedTo:(48@48))
-                inspect
-                                                                        [exEnd]
-                                                                        [exBegin]
-        ((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
-            magnifiedBy:0.7)
-                inspect
-                                                                        [exEnd]
+									[exBegin]
+	((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
+	    magnifiedTo:(48@48))
+		inspect
+									[exEnd]
+									[exBegin]
+	((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
+	    magnifiedBy:0.7)
+		inspect
+									[exEnd]
 
     rotating (any angle in degrees clockwise):
-                                                                        [exBegin]
-        ((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
-            rotated:90)
-                inspect
-                                                                        [exEnd]
-                                                                        [exBegin]
-        (((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
-            magnifiedBy:0.3@0.7) rotated:270)
-                inspect
-                                                                        [exEnd]
-                                                                        [exBegin]
-        (((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
-            ) rotated:30)
-                inspect
-                                                                        [exEnd]
+									[exBegin]
+	((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
+	    rotated:90)
+		inspect
+									[exEnd]
+									[exBegin]
+	(((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
+	    magnifiedBy:0.3@0.7) rotated:270)
+		inspect
+									[exEnd]
+									[exBegin]
+	(((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
+	    ) rotated:30)
+		inspect
+									[exEnd]
     negative:
-                                                                        [exBegin]
-        ((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
-            negative)
-                inspect
-                                                                        [exEnd]
+									[exBegin]
+	((Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies')
+	    negative)
+		inspect
+									[exEnd]
 
       depth32 image with 8+8+8+8 argb interpretation:
-                                                                        [exBegin]
-        ((Depth32Image
-             width:4 height:4
-             fromArray:#[ 
-                255 255 0 0       255 255 0 0       255 255 0 0       255 255 0 0
-                255 0 255 0       255 0 255 0       255 0 255 0       255 0 255 0
-                255 0 0 255       255 0 0 255       255 0 0 255       255 0 0 255
-                255 255 255 255   255 255 255 255   255 255 255 255   255 255 255 255 ])
-            photometric:#argb;
-            samplesPerPixel:4;
-            bitsPerSample:#(8 8 8 8);
-            magnifiedBy:10
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth32Image
+	     width:4 height:4
+	     fromArray:#[
+		255 255 0 0       255 255 0 0       255 255 0 0       255 255 0 0
+		255 0 255 0       255 0 255 0       255 0 255 0       255 0 255 0
+		255 0 0 255       255 0 0 255       255 0 0 255       255 0 0 255
+		255 255 255 255   255 255 255 255   255 255 255 255   255 255 255 255 ])
+	    photometric:#argb;
+	    samplesPerPixel:4;
+	    bitsPerSample:#(8 8 8 8);
+	    magnifiedBy:10
+	) edit
+									[exEnd]
 
       depth32 image with 8+8+8+8 rgba interpretation:
-                                                                        [exBegin]
-        ((Depth32Image
-             width:4 height:4
-             fromArray:#[ 
-                255 0 0 255       255 0 0 255       255 0 0 255       255 0 0 255
-                0 255 0 255       0 255 0 255       0 255 0 255       0 255 0 255
-                0 0 255 255       0 0 255 255       0 0 255 255       0 0 255 255
-                255 255 255 255   255 255 255 255   255 255 255 255   255 255 255 255 ])
-            photometric:#rgba;
-            samplesPerPixel:4;
-            bitsPerSample:#(8 8 8 8);
-            magnifiedBy:10
-        ) edit
-                                                                        [exEnd]
+									[exBegin]
+	((Depth32Image
+	     width:4 height:4
+	     fromArray:#[
+		255 0 0 255       255 0 0 255       255 0 0 255       255 0 0 255
+		0 255 0 255       0 255 0 255       0 255 0 255       0 255 0 255
+		0 0 255 255       0 0 255 255       0 0 255 255       0 0 255 255
+		255 255 255 255   255 255 255 255   255 255 255 255   255 255 255 255 ])
+	    photometric:#rgba;
+	    samplesPerPixel:4;
+	    bitsPerSample:#(8 8 8 8);
+	    magnifiedBy:10
+	) edit
+									[exEnd]
 "
 !
 
@@ -703,56 +703,56 @@
     These have no underyling pixelstorage, but instead compute the pixel-value via a block.
 
     Plain x/y mapping:
-                                                                        [exBegin]
-        |i|
-        i := Depth1Image extent:256@256.
-        i pixelFunction:[:x :y | ((x // 16) bitXor:(y // 16)) odd ifTrue:1 ifFalse:[0]].
-        i inspect.
-                                                                        [exEnd]
+									[exBegin]
+	|i|
+	i := Depth1Image extent:256@256.
+	i pixelFunction:[:x :y | ((x // 16) bitXor:(y // 16)) odd ifTrue:1 ifFalse:[0]].
+	i inspect.
+									[exEnd]
     Transformed x/y mapping:
-                                                                        [exBegin]
-        |i f|
-        f := [:x :y | (x between:0.4 and:0.6) asInteger].
-        i := Depth1Image extent:256@256.
-        i pixelFunction:f inX:(0.0 to:1.0) y:(0.0 to:1.0).
-        i inspect.
-                                                                        [exEnd]
-                                                                        [exBegin]
-        |i f|
-        f := [:x :y | ((x between:0.4 and:0.6) or:[(y between:0.4 and:0.6)]) asInteger].
-        i := Depth1Image extent:256@256.
-        i pixelFunction:f inX:(0.0 to:1.0) y:(0.0 to:1.0).
-        i inspect.
-                                                                        [exEnd]
+									[exBegin]
+	|i f|
+	f := [:x :y | (x between:0.4 and:0.6) asInteger].
+	i := Depth1Image extent:256@256.
+	i pixelFunction:f inX:(0.0 to:1.0) y:(0.0 to:1.0).
+	i inspect.
+									[exEnd]
+									[exBegin]
+	|i f|
+	f := [:x :y | ((x between:0.4 and:0.6) or:[(y between:0.4 and:0.6)]) asInteger].
+	i := Depth1Image extent:256@256.
+	i pixelFunction:f inX:(0.0 to:1.0) y:(0.0 to:1.0).
+	i inspect.
+									[exEnd]
     Image based on polar coordinate:
-                                                                        [exBegin]
-        |i f|
-        f := [:x :y | ((x@y) r * 10) asInteger bitAnd:1].
-        i := Depth1Image extent:256@256.
-        i pixelFunction:f inX:(-1.0 to:1.0) y:(-1.0 to:1.0).
-        i inspect.
-                                                                        [exEnd]
+									[exBegin]
+	|i f|
+	f := [:x :y | ((x@y) r * 10) asInteger bitAnd:1].
+	i := Depth1Image extent:256@256.
+	i pixelFunction:f inX:(-1.0 to:1.0) y:(-1.0 to:1.0).
+	i inspect.
+									[exEnd]
     Grayscale image based on polar coordinate:
-                                                                        [exBegin]
-        |i|
-        i := Depth8Image extent:256@256.
-        i photometric:#blackIs0.
-        i pixelFunction:[:x :y | ((x@y) r * 255) truncated min:255] inX:(-1 to:1) y:(-1 to:1).
-        i inspect.
-                                                                        [exEnd]
+									[exBegin]
+	|i|
+	i := Depth8Image extent:256@256.
+	i photometric:#blackIs0.
+	i pixelFunction:[:x :y | ((x@y) r * 255) truncated min:255] inX:(-1 to:1) y:(-1 to:1).
+	i inspect.
+									[exEnd]
 
     Taking another image as ''input''
-                                                                        [exBegin]
-        |garfield f i h|
-
-        garfield := Image fromFile:'bitmaps/gifImages/garfield.gif' inPackage:'stx:goodies'.
-        h := garfield height.
-        f := [:x :y | (garfield colorAtX:x y:h-y) rgbValue].
-
-        i := Depth24Image extent:garfield extent.
-        i pixelFunction:f.
-        i inspect.
-                                                                        [exEnd]
+									[exBegin]
+	|garfield f i h|
+
+	garfield := Image fromFile:'bitmaps/gifImages/garfield.gif' inPackage:'stx:goodies'.
+	h := garfield height.
+	f := [:x :y | (garfield colorAtX:x y:h-y) rgbValue].
+
+	i := Depth24Image extent:garfield extent.
+	i pixelFunction:f.
+	i inspect.
+									[exEnd]
 "
 ! !
 
@@ -1211,23 +1211,23 @@
     photometric := (depth > 8) ifTrue:#rgb ifFalse:#palette.
 
     (formsDevice notNil and:[depth == formsDevice depth]) ifTrue:[
-        "/
-        "/ for truecolor displays, return a Depth24Image
-        "/ (must do this for depth15 & depth16 displays, since
-        "/  Depth16Image has no way to specify r/g/b masks ...)
-        "/
-        vis := formsDevice visualType.
-        (vis == #TrueColor or:[vis == #DirectColor]) ifTrue:[
-            depth > 8 ifTrue:[
-                depth := 24.
-            ]
-        ].
+	"/
+	"/ for truecolor displays, return a Depth24Image
+	"/ (must do this for depth15 & depth16 displays, since
+	"/  Depth16Image has no way to specify r/g/b masks ...)
+	"/
+	vis := formsDevice visualType.
+	(vis == #TrueColor or:[vis == #DirectColor]) ifTrue:[
+	    depth > 8 ifTrue:[
+		depth := 24.
+	    ]
+	].
     ].
     img := self newForDepth:depth.
     img photometric:photometric.
 
     formsDevice isNil ifTrue:[
-        ^ img from:aForm in:aRectangle.
+	^ img from:aForm in:aRectangle.
     ].
     ^ img from:aForm in:aRectangle
 
@@ -1261,15 +1261,15 @@
     "create & return an Image from a rectangular area in another image.
      This can also be used to get a subimage in another depth.
      As with layouts, the rectangle may contain integers (= nr of pixels) or float numbers (= relative size).
-     Color precision may be lost, if conversion is from a higher depth image. 
+     Color precision may be lost, if conversion is from a higher depth image.
      For palette & rgb images, this may fail if a color cannot be represented."
 
     |cls|
 
     self == Image ifTrue:[
-        cls := (self implementorForDepth:anImage depth).
+	cls := (self implementorForDepth:anImage depth).
     ] ifFalse:[
-        cls := self.
+	cls := self.
     ].
     ^ cls new fromSubImage:anImage in:aRectangle.
 
@@ -1360,63 +1360,63 @@
      depth (8-bit padded)."
 
     ^ (self newForDepth:d)
-        width:w height:h depth:d fromArray:pixelData
+	width:w height:h depth:d fromArray:pixelData
 
     "
      Image width:8
-           height:8
-           depth:1
-           fromArray:#[2r11001100
-                       2r00110011
-                       2r11001100
-                       2r00110011
-                       2r11001100
-                       2r00110011
-                       2r11001100
-                       2r00110011].
+	   height:8
+	   depth:1
+	   fromArray:#[2r11001100
+		       2r00110011
+		       2r11001100
+		       2r00110011
+		       2r11001100
+		       2r00110011
+		       2r11001100
+		       2r00110011].
     "
 
     "
      Image width:8
-           height:8
-           depth:2
-           fromArray:#[4r1100 4r1100
-                       4r0011 4r0011
-                       4r1100 4r1100
-                       4r0011 4r0011
-                       4r1100 4r1100
-                       4r0011 4r0011
-                       4r1100 4r1100
-                       4r0011 4r0011].
+	   height:8
+	   depth:2
+	   fromArray:#[4r1100 4r1100
+		       4r0011 4r0011
+		       4r1100 4r1100
+		       4r0011 4r0011
+		       4r1100 4r1100
+		       4r0011 4r0011
+		       4r1100 4r1100
+		       4r0011 4r0011].
     "
 
     "
      Image width:8
-           height:8
-           depth:4
-           fromArray:#[16r00 16r01 16rf0 16rf1
-                       16r02 16r03 16rf2 16rf3
-                       16r04 16r05 16rf4 16rf5
-                       16r06 16r07 16rf6 16rf7
-                       16r08 16r09 16rf8 16rf9
-                       16r0a 16r0b 16rfa 16rfb
-                       16r0c 16r0d 16rfc 16rfd
-                       16r0e 16r0f 16rfe 16rff].
+	   height:8
+	   depth:4
+	   fromArray:#[16r00 16r01 16rf0 16rf1
+		       16r02 16r03 16rf2 16rf3
+		       16r04 16r05 16rf4 16rf5
+		       16r06 16r07 16rf6 16rf7
+		       16r08 16r09 16rf8 16rf9
+		       16r0a 16r0b 16rfa 16rfb
+		       16r0c 16r0d 16rfc 16rfd
+		       16r0e 16r0f 16rfe 16rff].
     "
 
     "
      Image width:8
-           height:8
-           depth:16
-           fromArray:#(1 1 1 1 1 1 1 1
-                       2 2 2 2 2 2 2 2    
-                       3 3 3 3 3 3 3 3    
-                       4 4 4 4 4 4 4 4    
-                       5 5 5 5 5 5 5 5    
-                       6 6 6 6 6 6 6 6    
-                       7 7 7 7 7 7 7 7    
-                       8 8 8 8 8 8 8 8    
-                      ) asWordArray.
+	   height:8
+	   depth:16
+	   fromArray:#(1 1 1 1 1 1 1 1
+		       2 2 2 2 2 2 2 2
+		       3 3 3 3 3 3 3 3
+		       4 4 4 4 4 4 4 4
+		       5 5 5 5 5 5 5 5
+		       6 6 6 6 6 6 6 6
+		       7 7 7 7 7 7 7 7
+		       8 8 8 8 8 8 8 8
+		      ) asWordArray.
     "
 
     "Modified: 10.6.1996 / 18:18:10 / cg"
@@ -1517,7 +1517,7 @@
 
     cls := self.
     cls == Image ifTrue:[
-        cls := self implementorForDepth:1
+	cls := self implementorForDepth:1
     ].
     ^ cls new width:w height:h; photometric:photometric; yourself
 
@@ -1532,7 +1532,7 @@
 
     cls := self.
     cls == Image ifTrue:[
-        cls := self implementorForDepth:1
+	cls := self implementorForDepth:1
     ].
     ^ cls new width:w height:h; photometric:photometric; bitsPerSample:bitsPerSample; yourself
 
@@ -1642,15 +1642,15 @@
      to release all cached Images from that device"
 
     Lobby
-        unregisterAllForWhich:[:eachImage |
-            |ok|
-
-            ok := eachImage graphicsDevice == aDevice.
-            ok ifTrue:[
-                eachImage releaseFromDevice
-            ].
-            ok
-        ].
+	unregisterAllForWhich:[:eachImage |
+	    |ok|
+
+	    ok := eachImage graphicsDevice == aDevice.
+	    ok ifTrue:[
+		eachImage releaseFromDevice
+	    ].
+	    ok
+	].
 
     "
       self releaseResourcesOnDevice:Screen current
@@ -1681,19 +1681,19 @@
 
     fn := aFileName asFilename.
     fn isAbsolute ifFalse:[
-        inStream := Smalltalk systemFileStreamFor:fn.
-        inStream isNil ifTrue:[
-            inStream := Smalltalk bitmapFileStreamFor:fn.
-            inStream isNil ifTrue:[
-                "this signal is a query - if noone seems to care, return nil.
-                 However, a handler may provide a replacement image."
-                ^ ImageNotFoundQuerySignal
-                            raiseRequestWith:fn
-                            errorString:('Image: ''' , fn pathName, ''' does not exist or is not readable').
-            ].
-        ].
-        fn := inStream pathName asFilename.
-        inStream close.
+	inStream := Smalltalk systemFileStreamFor:fn.
+	inStream isNil ifTrue:[
+	    inStream := Smalltalk bitmapFileStreamFor:fn.
+	    inStream isNil ifTrue:[
+		"this signal is a query - if noone seems to care, return nil.
+		 However, a handler may provide a replacement image."
+		^ ImageNotFoundQuerySignal
+			    raiseRequestWith:fn
+			    errorString:('Image: ''' , fn pathName, ''' does not exist or is not readable').
+	    ].
+	].
+	fn := inStream pathName asFilename.
+	inStream close.
     ].
 
     nm := fn name.
@@ -1701,77 +1701,77 @@
 
     "handle compressed-suffix"
     (#('gz') includes:suffix) ifTrue:[
-        |baseFn|
-
-        baseFn := fn withoutSuffix.
-        nm := baseFn name.
-        suffix := baseFn suffix.
-        mustDecompress := true.
+	|baseFn|
+
+	baseFn := fn withoutSuffix.
+	nm := baseFn name.
+	suffix := baseFn suffix.
+	mustDecompress := true.
     ].
     suffix isEmpty ifTrue:[
-        suffix := nm.
+	suffix := nm.
     ].
 
     "get the imageReader class from the file's extension and ask it first"
     readerClass := MIMETypes imageReaderForSuffix:suffix.
     readerClass notNil ifTrue:[
-        mustDecompress == true ifTrue:[
-            |zipStream|
-            inStream := fn readStream.
-            zipStream := ZipStream readOpenOn:inStream suppressHeaderAndChecksum:true.
-            zipStream notNil ifTrue:[
-                [
-                    image := readerClass fromStream:zipStream.
-                ] ensure:[
-                    zipStream close.
-                    inStream close.
-                ].
-            ]
-        ] ifFalse:[
-            BadImageFormatQuerySignal handle:[:ex |
-                BadImageFormatQuerySignal isHandled ifTrue:[ ex reject ].
-                Transcript showCR:(readersErrorMsg := ex description).
-                image := nil.
-                ex return.
-            ] do:[
-                image := readerClass fromFile:fn.
-            ].
-        ].
-        image notNil ifTrue:[^ image].
+	mustDecompress == true ifTrue:[
+	    |zipStream|
+	    inStream := fn readStream.
+	    zipStream := ZipStream readOpenOn:inStream suppressHeaderAndChecksum:true.
+	    zipStream notNil ifTrue:[
+		[
+		    image := readerClass fromStream:zipStream.
+		] ensure:[
+		    zipStream close.
+		    inStream close.
+		].
+	    ]
+	] ifFalse:[
+	    BadImageFormatQuerySignal handle:[:ex |
+		BadImageFormatQuerySignal isHandled ifTrue:[ ex reject ].
+		Transcript showCR:(readersErrorMsg := ex description).
+		image := nil.
+		ex return.
+	    ] do:[
+		image := readerClass fromFile:fn.
+	    ].
+	].
+	image notNil ifTrue:[^ image].
     ].
 
     (readerClass isNil or:[readersErrorMsg notNil]) ifTrue:[
-        "no known extension (or wrong extension)
-         - ask all readers if they know this format ...
-         ... these look into the file, and investigate the header.
-         therefore, it takes a bit longer."
-
-        MIMETypes imageReaderClasses do:[:mimeReaderClass |
-            (mimeReaderClass notNil
-            and:[mimeReaderClass ~~ readerClass]) ifTrue:[
-               (mimeReaderClass isValidImageFile:fn) ifTrue:[
-                    image := mimeReaderClass fromFile:fn.
-                    image notNil ifTrue:[
-                        ^ image
-                    ]
-                ]
-            ]
-        ].
+	"no known extension (or wrong extension)
+	 - ask all readers if they know this format ...
+	 ... these look into the file, and investigate the header.
+	 therefore, it takes a bit longer."
+
+	MIMETypes imageReaderClasses do:[:mimeReaderClass |
+	    (mimeReaderClass notNil
+	    and:[mimeReaderClass ~~ readerClass]) ifTrue:[
+	       (mimeReaderClass isValidImageFile:fn) ifTrue:[
+		    image := mimeReaderClass fromFile:fn.
+		    image notNil ifTrue:[
+			^ image
+		    ]
+		]
+	    ]
+	].
     ].
 
     (fn exists and:[fn isReadable]) ifFalse:[
-        ^ ImageNotFoundQuerySignal
-                    raiseRequestWith:fn
-                    errorString:('Image: ''' , fn pathName, ''' does not exist or is not readable').
-    ].
-    
+	^ ImageNotFoundQuerySignal
+		    raiseRequestWith:fn
+		    errorString:('Image: ''' , fn pathName, ''' does not exist or is not readable').
+    ].
+
     "nope - unknown format
      this signal is a query - if noone seems to care, return nil.
      However, a handler may provide a replacement image."
 
     ^ BadImageFormatQuerySignal
-        raiseRequestWith:fn
-        errorString:(readersErrorMsg ? ('Image: unknown image file format: ''' , fn pathName , '''')).
+	raiseRequestWith:fn
+	errorString:(readersErrorMsg ? ('Image: unknown image file format: ''' , fn pathName , '''')).
 
     "
      Image fromFile:'bitmaps/gifImages/claus.gif' inPackage:'stx:goodies'
@@ -1791,10 +1791,10 @@
 
      Image imageNotFoundQuerySignal
      handle:[:ex |
-        Transcript showCR:ex description.
-        ex proceedWith:nil
+	Transcript showCR:ex description.
+	ex proceedWith:nil
      ] do:[
-         Image fromFile:'fooBar'
+	 Image fromFile:'fooBar'
      ]
     "
 
@@ -1803,7 +1803,7 @@
      Image imageNotFoundQuerySignal
      answer:(Image fromFile:'libtool/bitmaps/SmalltalkX.xbm')
      do:[
-         Image fromFile:'fooBar'
+	 Image fromFile:'fooBar'
      ]
     "
 
@@ -1912,10 +1912,10 @@
      this format ...
     "
     MIMETypes imageReaderClasses do:[:readerClass |
-        readerClass notNil ifTrue:[
-            image := readerClass fromStream:aStream.
-            image notNil ifTrue:[^ image].
-        ]
+	readerClass notNil ifTrue:[
+	    image := readerClass fromStream:aStream.
+	    image notNil ifTrue:[^ image].
+	]
     ].
 
     "
@@ -1924,8 +1924,8 @@
 "/    'Image [info]: unknown image file format in stream: ' infoPrintCR.
 
     ^ ImageNotFoundQuerySignal
-                raiseRequestWith:aStream
-                errorString:('Image [warning]: unknown image file format in stream').
+		raiseRequestWith:aStream
+		errorString:('Image [warning]: unknown image file format in stream').
 
     "
      Image fromFile:'goodies/bitmaps/gifImages/claus.gif'
@@ -1966,8 +1966,8 @@
 "/    'Image [info]: unknown image file format in stream: ' infoPrintCR.
 
     ^ ImageNotFoundQuerySignal
-                raiseRequestWith:aStream
-                errorString:('Image: unknown image file format in stream').
+		raiseRequestWith:aStream
+		errorString:('Image: unknown image file format in stream').
 
     "Created: 1.2.1997 / 14:46:20 / cg"
     "Modified: 1.2.1997 / 14:48:53 / cg"
@@ -2089,7 +2089,7 @@
     "return the default photometric pixel interpretation.
      This may be a somewhat old leftover from times, when tiff was the first image file type to be read.
      Much better would be to always have some (possibly fake and virtual) colormap around, and ask that one.
-     However, in the meantime, many other classes depend on that, so that it should be kept as an API 
+     However, in the meantime, many other classes depend on that, so that it should be kept as an API
      - even when the internal representation will be replaced by something better in the future."
 
     ^ #blackIs0
@@ -2271,31 +2271,31 @@
      is grabbed (i.e. blocked for others) and a camera cursor is
      shown while the readout is done.
      WARNING: with doGrab true, this temporarily grabs the display
-              and it may not work from within a buttonMotion
-              (use with a false grabArg then)."
+	      and it may not work from within a buttonMotion
+	      (use with a false grabArg then)."
 
     |depth vis img tmpFile util|
 
     aDisplay supportsScreenReading ifFalse:[
-        "/ workaround: look for a helper utility in support/<os>/screenshot
-        "/ currently there is one for osx.
-        tmpFile := Filename newTemporary withSuffix:'png'.
-        util := Smalltalk packageDirectory asFilename / ('../support/',OperatingSystem getSystemType,'/screenshot').
-        util exists ifTrue:[
-            OperatingSystem executeCommand:('%1 %2 png %3 %4 %5 %6'
-                                                bindWith:util pathName
-                                                with:tmpFile pathName
-                                                with:aRectangle left
-                                                with:aRectangle top
-                                                with:aRectangle width
-                                                with:aRectangle height).
-            [
-                img := Image fromFile:tmpFile.
-            ] ensure:[
-                tmpFile remove.
-            ].    
-            ^ img.
-        ].    
+	"/ workaround: look for a helper utility in support/<os>/screenshot
+	"/ currently there is one for osx.
+	tmpFile := Filename newTemporary withSuffix:'png'.
+	util := Smalltalk packageDirectory asFilename / ('../support/',OperatingSystem getSystemType,'/screenshot').
+	util exists ifTrue:[
+	    OperatingSystem executeCommand:('%1 %2 png %3 %4 %5 %6'
+						bindWith:util pathName
+						with:tmpFile pathName
+						with:aRectangle left
+						with:aRectangle top
+						with:aRectangle width
+						with:aRectangle height).
+	    [
+		img := Image fromFile:tmpFile.
+	    ] ensure:[
+		tmpFile remove.
+	    ].
+	    ^ img.
+	].
     ].
 
     depth := aDisplay depth.
@@ -2307,9 +2307,9 @@
     "/
     vis := aDisplay visualType.
     (vis == #TrueColor or:[vis == #DirectColor]) ifTrue:[
-        depth > 8 ifTrue:[
-            depth := 24.
-        ]
+	depth > 8 ifTrue:[
+	    depth := 24.
+	]
     ].
 
     img := self newForDepth:depth.
@@ -2424,8 +2424,8 @@
      the returned Image is NOT correct.
      You may want to raise the view before using this method.
      WARNING: with doGrab true, this temporarily grabs the display
-              and it may not work from within a buttonMotion
-              (use with a false grabArg then)."
+	      and it may not work from within a buttonMotion
+	      (use with a false grabArg then)."
 
     |org ext viewsDevice cH bW bH|
 
@@ -2433,15 +2433,15 @@
     org := viewsDevice translatePoint:(0@0) fromView:aView toView:nil.
     ext := aView extent.
     withDecoration ifTrue:[
-        viewsDevice isWindowsPlatform ifTrue:[
-            cH := viewsDevice captionHeight.
-            bW := (viewsDevice getSystemMetrics: #SM_CXFRAME )
-                  "+ ( device getSystemMetrics: #borderFrameWidth )".
-            bH := (viewsDevice getSystemMetrics: #SM_CYFRAME )
-                  " + ( device getSystemMetrics: #borderFrameHeight )".
-            org := org - (bW @ (bH + cH)).
-            ext := ext + ((bW + bW) @ (bH+bH+cH)).
-        ].
+	viewsDevice isWindowsPlatform ifTrue:[
+	    cH := viewsDevice captionHeight.
+	    bW := (viewsDevice getSystemMetrics: #SM_CXFRAME )
+		  "+ ( device getSystemMetrics: #borderFrameWidth )".
+	    bH := (viewsDevice getSystemMetrics: #SM_CYFRAME )
+		  " + ( device getSystemMetrics: #borderFrameHeight )".
+	    org := org - (bW @ (bH + cH)).
+	    ext := ext + ((bW + bW) @ (bH+bH+cH)).
+	].
     ].
     ^ self fromScreen:(org extent:ext) on:viewsDevice grab:doGrab
 
@@ -2475,13 +2475,13 @@
 
     newMap := Colormap new:anArrayOfRGBTriples size.
     anArrayOfRGBTriples doWithIndex:[:rgb :i |
-        newMap at:i putRGBTriple:rgb
+	newMap at:i putRGBTriple:rgb
     ].
     self colorMap:newMap.
 
     "
      Depth8Image new
-        colorsFromArray:#( (0.5 0.5 0.5) (0.25 0.0 0.0) (0.0 0.25 0.5))
+	colorsFromArray:#( (0.5 0.5 0.5) (0.25 0.0 0.0) (0.0 0.25 0.5))
     "
 !
 
@@ -2762,32 +2762,32 @@
     sameColors := false.
 
     photometric == #palette ifTrue:[
-        "/ any change at all ?
-        (newSize := aColorMap size) >= (oldSize := colorMap size) ifTrue:[
-            sameColors := true.
-
-            1 to:oldSize do:[:idx |
-                (aColorMap at:idx) = (colorMap at:idx) ifFalse:[
-                    sameColors := false.
-                ]
-            ].
-        ].
+	"/ any change at all ?
+	(newSize := aColorMap size) >= (oldSize := colorMap size) ifTrue:[
+	    sameColors := true.
+
+	    1 to:oldSize do:[:idx |
+		(aColorMap at:idx) = (colorMap at:idx) ifFalse:[
+		    sameColors := false.
+		]
+	    ].
+	].
     ].
 
     self setColorMap:aColorMap.
     sameColors ifTrue:[
-        ^ self
+	^ self
     ].
 
     colorMap notNil ifTrue:[
-        photometric := #palette.
+	photometric := #palette.
     ] ifFalse:[
-        (photometric == #palette) ifTrue:[
-            photometric := #blackIs0
-        ]
+	(photometric == #palette) ifTrue:[
+	    photometric := #blackIs0
+	]
     ].
     deviceForm notNil ifTrue:[
-        self release
+	self release
     ]
 
     "Modified: / 31.8.1995 / 03:05:59 / claus"
@@ -2950,6 +2950,14 @@
     "Modified: 12.4.1997 / 12:08:42 / cg"
 !
 
+metaData
+    ^ metaData
+!
+
+metaData:something
+    metaData := something.
+!
+
 monochromeId
     "return the id of the monochrome image on the device.
      Return nil, if the image is unassigned."
@@ -2977,7 +2985,7 @@
     "return the photometric, a symbol such as #palette, #rgb etc.
      This may be a somewhat old leftover from times, when tiff was the first image file type to be read.
      Much better would be to always have some (possibly fake and virtual) colormap around, and ask that one.
-     However, in the meantime, many other classes depend on that, so that it should be kept as an API 
+     However, in the meantime, many other classes depend on that, so that it should be kept as an API
      - even when the internal representation will be replaced by something better in the future."
 
 
@@ -3178,22 +3186,22 @@
 !
 
 bits
-    "return the raw image data (pixel data); 
-     depending on the photometric, this has to be interpreted as monochrome, 
+    "return the raw image data (pixel data);
+     depending on the photometric, this has to be interpreted as monochrome,
      greyscale, palette or rgb data.
      It is also packed to be dense, so a 4 bitPerSample palette image
      will store 2 pixels per byte, whereas a 2-bitPerPixel image will store
      4 pixels per byte."
 
     bytes isNil ifTrue:[
-        pixelFunction notNil ifTrue:[
-            self createPixelStore.
-            0 to:height-1 do:[:y |
-                0 to:width-1 do:[:x |
-                    self pixelAtX:x y:y put:(pixelFunction value:x value:y)
-                ].
-            ].
-        ].
+	pixelFunction notNil ifTrue:[
+	    self createPixelStore.
+	    0 to:height-1 do:[:y |
+		0 to:width-1 do:[:x |
+		    self pixelAtX:x y:y put:(pixelFunction value:x value:y)
+		].
+	    ].
+	].
     ].
     ^ bytes
 !
@@ -3543,17 +3551,17 @@
     "/ leave this in for a while and watch out for the halt below.
     "/ If you encounter this halt,
     "/ please edit the image in the image editor and save it back.
-    
+
     (width notNil and:[height notNil and:[(d := self depth) notNil]]) ifTrue:[
-        (d <= 8) ifTrue:[
-            expectedSize := (self bytesPerRow * height).
-            bytes size < expectedSize ifTrue:[
-                Smalltalk isSmalltalkDevelopmentSystem ifTrue:[
-                    self breakPoint:#cg info:'invalid bytearray size'.
-                ].
-                bytes := (ByteArray new:expectedSize) replaceFrom:1 with:bytes; yourself.
-            ].
-        ].
+	(d <= 8) ifTrue:[
+	    expectedSize := (self bytesPerRow * height).
+	    bytes size < expectedSize ifTrue:[
+		Smalltalk isSmalltalkDevelopmentSystem ifTrue:[
+		    self breakPoint:#cg info:'invalid bytearray size'.
+		].
+		bytes := (ByteArray new:expectedSize) replaceFrom:1 with:bytes; yourself.
+	    ].
+	].
     ].
 
     "Modified: 23.4.1996 / 11:08:28 / cg"
@@ -3628,22 +3636,22 @@
      instances or by image readers. Calling for a change of an
      existing image may confuse later pixel interpretation."
 
-    "/ the following is a trick to get both shared and immutable instances, 
-    "/ at least for the most common cases. 
+    "/ the following is a trick to get both shared and immutable instances,
+    "/ at least for the most common cases.
     "/ Prevents writers to do what is described above.
     "/ Do not remove, as you might not understand it!!
-    bitsPerSample := 
-        #(
-            #[ 8 8 8 ]
-            #[ 4 4 4 ]
-            #[ 8 ]
-            #[ 4 ]
-            #[ 2 ]
-            #[ 1 ]
-        ) detect:[:bps | bps sameContentsAs:aCollection] ifNone:[aCollection asByteArray].    
+    bitsPerSample :=
+	#(
+	    #[ 8 8 8 ]
+	    #[ 4 4 4 ]
+	    #[ 8 ]
+	    #[ 4 ]
+	    #[ 2 ]
+	    #[ 1 ]
+	) detect:[:bps | bps sameContentsAs:aCollection] ifNone:[aCollection asByteArray].
 
     samplesPerPixel isNil ifTrue:[
-        samplesPerPixel := bitsPerSample size.
+	samplesPerPixel := bitsPerSample size.
     ].
 
     "Modified: 23.4.1996 / 11:08:31 / cg"
@@ -3659,22 +3667,22 @@
     depth := self depth.
     "/ bitsPerPixel := d.
     d == 24 ifTrue:[
-        samplesPerPixel := 3.
-        bitsPerSample := #(8 8 8)
+	samplesPerPixel := 3.
+	bitsPerSample := #(8 8 8)
     ] ifFalse:[
-        d == 32 ifTrue:[
-            samplesPerPixel := 4.
-            bitsPerSample := #(8 8 8 8)
-        ] ifFalse:[
-            d == 16 ifTrue:[
-                samplesPerPixel := 3.
-                bitsPerSample := #(5 5 5).
-                "/ bitsPerPixel := 15.
-            ] ifFalse:[
-                samplesPerPixel := 1.
-                bitsPerSample := ByteArray with:d
-            ]
-        ]
+	d == 32 ifTrue:[
+	    samplesPerPixel := 4.
+	    bitsPerSample := #(8 8 8 8)
+	] ifFalse:[
+	    d == 16 ifTrue:[
+		samplesPerPixel := 3.
+		bitsPerSample := #(5 5 5).
+		"/ bitsPerPixel := 15.
+	    ] ifFalse:[
+		samplesPerPixel := 1.
+		bitsPerSample := ByteArray with:d
+	    ]
+	]
     ]
 
     "Modified: / 27-05-2007 / 16:59:47 / cg"
@@ -4530,70 +4538,70 @@
     ((aDevice == device) and:[deviceForm notNil]) ifTrue:[^ deviceForm].
 
     mask notNil ifTrue:[
-        mask := mask onDevice:aDevice
+	mask := mask onDevice:aDevice
     ].
     bytes isNil ifTrue:[
-        pixelFunction notNil ifTrue:[
-            self computeBitsFromPixelFunction.
-        ]
+	pixelFunction notNil ifTrue:[
+	    self computeBitsFromPixelFunction.
+	]
     ].
 
     (aDevice depth == 1
     or:[aDevice hasGrayscales not]) ifTrue:[
-        form := self asMonochromeFormOn:aDevice.
+	form := self asMonochromeFormOn:aDevice.
     ] ifFalse:[
-        ((visual := aDevice visualType) == #StaticGray) ifTrue:[
-            form := self asGrayFormOn:aDevice.
-        ] ifFalse:[
-            (visual == #PseudoColor
-             or:[visual == #StaticColor]) ifTrue:[
-                form := self asPseudoFormQuickOn:aDevice.
-            ].
-        ]
+	((visual := aDevice visualType) == #StaticGray) ifTrue:[
+	    form := self asGrayFormOn:aDevice.
+	] ifFalse:[
+	    (visual == #PseudoColor
+	     or:[visual == #StaticColor]) ifTrue:[
+		form := self asPseudoFormQuickOn:aDevice.
+	    ].
+	]
     ].
 
     form isNil ifTrue:[
-        "/ kludge: repair a 'should not happen' situation...
-        photometric isNil ifTrue:[ self repairPhotometric ].
-
-        (photometric == #palette) ifTrue:[
-            form := self paletteImageAsFormOn:aDevice
-        ] ifFalse:[
-            (photometric == #rgb or:[photometric == #rgba or:[photometric == #argb]]) ifTrue:[
-                form := self rgbImageAsFormOn:aDevice
-            ] ifFalse:[
-                (photometric == #cmy or:[photometric == #cmyk]) ifTrue:[
-                    form := self rgbImageAsFormOn:aDevice
-                ] ifFalse:[
-                    form := self greyImageAsFormOn:aDevice
-                ]
-            ]
-        ].
+	"/ kludge: repair a 'should not happen' situation...
+	photometric isNil ifTrue:[ self repairPhotometric ].
+
+	(photometric == #palette) ifTrue:[
+	    form := self paletteImageAsFormOn:aDevice
+	] ifFalse:[
+	    (photometric == #rgb or:[photometric == #rgba or:[photometric == #argb]]) ifTrue:[
+		form := self rgbImageAsFormOn:aDevice
+	    ] ifFalse:[
+		(photometric == #cmy or:[photometric == #cmyk]) ifTrue:[
+		    form := self rgbImageAsFormOn:aDevice
+		] ifFalse:[
+		    form := self greyImageAsFormOn:aDevice
+		]
+	    ]
+	].
     ].
 
     (device isNil or:[aDevice == device]) ifTrue:[
-        "remember this form in the receiver ..."
-
-        form notNil ifTrue:[
-            form := form asImageForm.
-            deviceForm := form.
-            maskedPixelsAre0 := nil.
-            device isNil ifTrue:[
-                device := aDevice.
-                Lobby register:self
-            ] ifFalse:[
-                Lobby registerChange:self
-            ].
-            mask notNil ifTrue:[
-                self clearMaskedPixels.
-            ].
-
-            "
-             can save space, by not keeping the images data-bits
-             twice (here and in the device form)
-            "
-            form forgetBits
-        ]
+	"remember this form in the receiver ..."
+
+	form notNil ifTrue:[
+	    form := form asImageForm.
+	    deviceForm := form.
+	    maskedPixelsAre0 := nil.
+	    device isNil ifTrue:[
+		device := aDevice.
+		Lobby register:self
+	    ] ifFalse:[
+		Lobby registerChange:self
+	    ].
+	    mask notNil ifTrue:[
+		self clearMaskedPixels.
+	    ].
+
+	    "
+	     can save space, by not keeping the images data-bits
+	     twice (here and in the device form)
+	    "
+	    form forgetBits
+	]
     ].
 
     ^ form
@@ -4656,7 +4664,7 @@
 
     ((self colorMap notNil and:[depth <= 8 and:[depth >= self depth]])
     or:[ self depth >= 8 "do need for dither" ]) ifTrue:[
-        ^ self copyWithColorMapProcessing:[:clr | Color brightness:(clr brightness)].
+	^ self copyWithColorMapProcessing:[:clr | Color brightness:(clr brightness)].
     ].
     ^ self asGrayImageDepth:depth dither:DitherAlgorithm.
 
@@ -5680,9 +5688,9 @@
     deviceForm isNil ifTrue:[^ self].   "/ no device rep.
     mask depth ~~ 1 ifTrue:[^ self].    "/ not done with alpha masks
 
-    deviceForm 
-        foreground:Color allColor background:Color noColor function:#and;
-        copyPlaneFrom:(mask asFormOn:device) x:0 y:0 toX:0 y:0 width:width height:height.
+    deviceForm
+	foreground:Color allColor background:Color noColor function:#and;
+	copyPlaneFrom:(mask asFormOn:device) x:0 y:0 toX:0 y:0 width:width height:height.
 
 "/    deviceForm clearMaskedPixels:(mask asFormOn:device).
     maskedPixelsAre0 := true.
@@ -5790,18 +5798,18 @@
     samplesPerPixel := self samplesPerPixel.
 
     photometricOrNil isNil ifTrue:[
-        photometric := self class defaultPhotometric
-        "/ photometric := anImage photometric
+	photometric := self class defaultPhotometric
+	"/ photometric := anImage photometric
     ] ifFalse:[
-        photometricOrNil == #rgba ifTrue:[
-            samplesPerPixel == 3 ifTrue:[ photometric := #rgb ]
-        ] ifFalse:[
-            photometric := photometricOrNil
-        ].
+	photometricOrNil == #rgba ifTrue:[
+	    samplesPerPixel == 3 ifTrue:[ photometric := #rgb ]
+	] ifFalse:[
+	    photometric := photometricOrNil
+	].
     ].
 
     photometric == #palette ifTrue:[
-        self colormapFromImage:anImage photometric:photometric.
+	self colormapFromImage:anImage photometric:photometric.
     ].
     self mask:anImage mask.
 
@@ -5810,46 +5818,46 @@
     otherDepth := anImage depth.
 
     ((myDepth = otherDepth) and:[samePhotometric]) ifTrue:[
-        self bits:(anImage bits copy).
-        ^ self.
+	self bits:(anImage bits copy).
+	^ self.
     ].
 
     self bits:(ByteArray new: "uninitializedNew:"(self bytesPerRow * height)).
 
     myDepth >= otherDepth ifTrue:[
-        otherDepth <= 12 ifTrue:[
-
-            "/ if my depth is greater, all colors can be represented,
-            "/ and the loop can be done over pixel values ...
-
-            (colorMap isNil or:[samePhotometric not]) ifTrue:[
-                map := Array new:(1 bitShift:otherDepth).
-                1 to:map size do:[:i |
-                    clr := anImage colorFromValue:(i - 1).
-                    map at:i put:(self valueFromColor:clr).
-                ].
-            ].
-            mappedRowPixels := self pixelArraySpecies new:width.
-            h := height-1.
-            w := width.
-            0 to:h do:[:row |
-                anImage rowAt:row into:mappedRowPixels startingAt:1.
-                map notNil ifTrue:[
-                    1 to:w do:[:i |
-                        mappedRowPixels at:i put:(map at:(mappedRowPixels at:i)+1)
-                    ].
-                ].
-                self rowAt:row putAll:mappedRowPixels
-            ].
-            ^ self
-        ].
+	otherDepth <= 12 ifTrue:[
+
+	    "/ if my depth is greater, all colors can be represented,
+	    "/ and the loop can be done over pixel values ...
+
+	    (colorMap isNil or:[samePhotometric not]) ifTrue:[
+		map := Array new:(1 bitShift:otherDepth).
+		1 to:map size do:[:i |
+		    clr := anImage colorFromValue:(i - 1).
+		    map at:i put:(self valueFromColor:clr).
+		].
+	    ].
+	    mappedRowPixels := self pixelArraySpecies new:width.
+	    h := height-1.
+	    w := width.
+	    0 to:h do:[:row |
+		anImage rowAt:row into:mappedRowPixels startingAt:1.
+		map notNil ifTrue:[
+		    1 to:w do:[:i |
+			mappedRowPixels at:i put:(map at:(mappedRowPixels at:i)+1)
+		    ].
+		].
+		self rowAt:row putAll:mappedRowPixels
+	    ].
+	    ^ self
+	].
     ].
 
     "/ a hack, for now - alpha is in the low-byte !!!!!!
     (myDepth == 24 and:[otherDepth == 32]) ifTrue:[
-        (samePhotometric and:[photometric == #rgb]) ifTrue:[
-            "/ can do the bits by simple stripping off the alpha channel
-            self copyPixels32AlphaLowTo24From:anImage.
+	(samePhotometric and:[photometric == #rgb]) ifTrue:[
+	    "/ can do the bits by simple stripping off the alpha channel
+	    self copyPixels32AlphaLowTo24From:anImage.
 "/    anImage valuesFromX:0 y:0 toX:(width-1) y:(height-1) do:[:x :y :pixel |
 "/        |a r g b rgbPixel|
 "/
@@ -5861,12 +5869,12 @@
 "/        rgbPixel := r + (g bitShift:8) + (b bitShift:16).
 "/        self pixelAtX:x y:y put:rgbPixel
 "/    ].
-            ^ self
-        ].
+	    ^ self
+	].
     ].
 
     anImage colorsFromX:0 y:0 toX:(width-1) y:(height-1) do:[:x :y :clr |
-        self colorAtX:x y:y put:clr
+	self colorAtX:x y:y put:clr
     ].
 
     "
@@ -5891,9 +5899,9 @@
 
      i := Image fromFile:'bitmaps/gifImages/garfield.gif' inPackage:'stx:goodies'.
      Transcript showCR:(
-        Time millisecondsToRun:[
-            i24 := Depth24Image fromImage:i.
-        ]
+	Time millisecondsToRun:[
+	    i24 := Depth24Image fromImage:i.
+	]
      ).
      i24 inspect.
     "
@@ -5902,7 +5910,7 @@
 
      i := Image fromFile:'bitmaps/gifImages/garfield.gif' inPackage:'stx:goodies'.
      MessageTally spyOn:[
-        i24 := Depth24Image fromImage:i.
+	i24 := Depth24Image fromImage:i.
      ]
     "
 
@@ -5910,9 +5918,9 @@
 !
 
 fromSubImage:anImage in:aRectangle
-    "setup the receiver from another image, extracting a rectangular area. 
+    "setup the receiver from another image, extracting a rectangular area.
      As with layouts, the rectangle may contain integers (= nr of pixels) or float numbers (= relative size).
-     Color precision may be lost, if conversion is from a higher depth image. 
+     Color precision may be lost, if conversion is from a higher depth image.
      For palette & rgb images, this may fail if a color cannot be represented."
 
     |w h xL yT imgWidth imgHeight|
@@ -5924,18 +5932,18 @@
     imgWidth := anImage width.
     imgHeight := anImage height.
 
-    xL isFloat ifTrue:[ 
-        xL := (imgWidth * xL) rounded min: imgWidth.
-    ].
-    yT isFloat ifTrue:[ 
-        yT := (imgHeight * yT) rounded min:imgHeight.
-    ].
-    w isFloat ifTrue:[ 
-        w := (imgWidth * w) rounded.
+    xL isFloat ifTrue:[
+	xL := (imgWidth * xL) rounded min: imgWidth.
+    ].
+    yT isFloat ifTrue:[
+	yT := (imgHeight * yT) rounded min:imgHeight.
+    ].
+    w isFloat ifTrue:[
+	w := (imgWidth * w) rounded.
     ].
     w := w min:(imgWidth - xL).
-    h isFloat ifTrue:[ 
-        h := (imgHeight * h) rounded.
+    h isFloat ifTrue:[
+	h := (imgHeight * h) rounded.
     ].
     h := h min:(imgHeight - yT).
     self fromSubImage:anImage inX:xL y:yT width:w height:h
@@ -5959,8 +5967,8 @@
 !
 
 fromSubImage:anImage inX:xL y:yT width:w height:h
-    "setup the receiver from another image, extracting a rectangular area. 
-     Color precision may be lost, if conversion is from a higher depth image. 
+    "setup the receiver from another image, extracting a rectangular area.
+     Color precision may be lost, if conversion is from a higher depth image.
      For palette & rgb images, this may fail if a color cannot be represented.
 
      WARNING:
@@ -5987,24 +5995,24 @@
     ((photometric == anImage photometric)
     and:[self bitsPerPixel = anImage bitsPerPixel
     and:[colorMap = anImage colorMap]]) ifTrue:[
-        "/ can do it by value
-        anImage
-            valuesFromX:xL y:yT toX:xR y:yB
-            do:[:x :y :pixelValue | self pixelAtX:x-xL y:y-yT put:pixelValue ]
+	"/ can do it by value
+	anImage
+	    valuesFromX:xL y:yT toX:xR y:yB
+	    do:[:x :y :pixelValue | self pixelAtX:x-xL y:y-yT put:pixelValue ]
     ] ifFalse:[
-        "/ must do it by colors
-        anImage
-            colorsFromX:xL y:yT toX:xR y:yB
-            do:[:x :y :clr | self colorAtX:x-xL y:y-yT put:clr ]
+	"/ must do it by colors
+	anImage
+	    colorsFromX:xL y:yT toX:xR y:yB
+	    do:[:x :y :clr | self colorAtX:x-xL y:y-yT put:clr ]
     ].
 
     (imagesMask := anImage mask) notNil ifTrue:[
-        imagesMask depth == 1 ifTrue:[
-            maskClass := ImageMask
-        ] ifFalse:[
-            maskClass := imagesMask class.
-        ].
-        mask := maskClass new fromSubImage:imagesMask inX:xL y:yT width:w height:h
+	imagesMask depth == 1 ifTrue:[
+	    maskClass := ImageMask
+	] ifFalse:[
+	    maskClass := imagesMask class.
+	].
+	mask := maskClass new fromSubImage:imagesMask inX:xL y:yT width:w height:h
     ].
 
     "
@@ -6071,16 +6079,16 @@
     ((aDevice == device) and:[deviceForm notNil]) ifTrue:[^ self].
 
     (device notNil and:[aDevice ~~ device]) ifTrue:[
-        "oops, I am already associated to another device
-         - need a copy ...
-        "
-        ^ self copy onDevice:aDevice
+	"oops, I am already associated to another device
+	 - need a copy ...
+	"
+	^ self copy onDevice:aDevice
     ].
     deviceForm := self asFormOn:aDevice.
     device := aDevice.
     maskedPixelsAre0 := nil.
     mask notNil ifTrue:[
-        self clearMaskedPixels.
+	self clearMaskedPixels.
     ].
     Lobby register:self
 
@@ -6685,46 +6693,46 @@
     if (__isByteArrayLike(_myBits)
      && __isByteArrayLike(imageBits)
      && __bothSmallInteger(w, h)) {
-        int _idx;
-        int _w = __intVal(w);
-        int _h = __intVal(h);
-        int _mySize = __byteArraySize(_myBits);
-        int _imgSize = __byteArraySize(imageBits);
-        char *_myBitsPtr = __ByteArrayInstPtr(_myBits)->ba_element;
-        char *_imgBitsPtr = __ByteArrayInstPtr(imageBits)->ba_element;
-        char *_myBitsEndPtr = _myBitsPtr + (_w * _h * 3);
-        char *_imgBitsEndPtr = _imgBitsPtr + (_w * _h * 4);
-
-        if ((_w * _h * 3) > _mySize) goto error;
-        if ((_w * _h * 4) > _imgSize) goto error;
-
-        while (_myBitsPtr < _myBitsEndPtr) {
-            // fetch r,g,b skip a
-            unsigned char _r = _imgBitsPtr[0];
-            unsigned char _g = _imgBitsPtr[1];
-            unsigned char _b = _imgBitsPtr[2];
-            _myBitsPtr[0] = _r;
-            _myBitsPtr[1] = _g;
-            _myBitsPtr[2] = _b;
-            _myBitsPtr += 3;
-            _imgBitsPtr += 4;
-        }
-        RETURN( self );
+	int _idx;
+	int _w = __intVal(w);
+	int _h = __intVal(h);
+	int _mySize = __byteArraySize(_myBits);
+	int _imgSize = __byteArraySize(imageBits);
+	char *_myBitsPtr = __ByteArrayInstPtr(_myBits)->ba_element;
+	char *_imgBitsPtr = __ByteArrayInstPtr(imageBits)->ba_element;
+	char *_myBitsEndPtr = _myBitsPtr + (_w * _h * 3);
+	char *_imgBitsEndPtr = _imgBitsPtr + (_w * _h * 4);
+
+	if ((_w * _h * 3) > _mySize) goto error;
+	if ((_w * _h * 4) > _imgSize) goto error;
+
+	while (_myBitsPtr < _myBitsEndPtr) {
+	    // fetch r,g,b skip a
+	    unsigned char _r = _imgBitsPtr[0];
+	    unsigned char _g = _imgBitsPtr[1];
+	    unsigned char _b = _imgBitsPtr[2];
+	    _myBitsPtr[0] = _r;
+	    _myBitsPtr[1] = _g;
+	    _myBitsPtr[2] = _b;
+	    _myBitsPtr += 3;
+	    _imgBitsPtr += 4;
+	}
+	RETURN( self );
     }
 error: ;
     console_printf("Image: oops - bits-size in copyPixels32\n");
 %}.
 
     anImage valuesFromX:0 y:0 toX:(self width-1) y:(self height-1) do:[:x :y :pixel |
-        |a r g b rgbPixel|
-
-        "/ bgra-pixel
-        "/ a := pixel bitAnd:16rFF.
-        r := (pixel bitShift:-8) bitAnd:16rFF.
-        g := (pixel bitShift:-16) bitAnd:16rFF.
-        b := (pixel bitShift:-24) bitAnd:16rFF.
-        rgbPixel := r + (g bitShift:8) + (b bitShift:16).
-        self pixelAtX:x y:y put:rgbPixel
+	|a r g b rgbPixel|
+
+	"/ bgra-pixel
+	"/ a := pixel bitAnd:16rFF.
+	r := (pixel bitShift:-8) bitAnd:16rFF.
+	g := (pixel bitShift:-16) bitAnd:16rFF.
+	b := (pixel bitShift:-24) bitAnd:16rFF.
+	rgbPixel := r + (g bitShift:8) + (b bitShift:16).
+	self pixelAtX:x y:y put:rgbPixel
     ].
 !
 
@@ -6955,7 +6963,7 @@
      grey|
 
     self depth > 12 ifTrue:[
-        ^ self floydSteinbergDitheredMonochromeBits
+	^ self floydSteinbergDitheredMonochromeBits
     ].
 
     w := width.
@@ -6975,90 +6983,90 @@
     greyValues := self greyMapForRange:(255*1024).
 
     0 to:(h-1) do:[:y |
-        nextDst := dstIndex + bytesPerMonoRow.
-        byte := 0.
-        bitCnt := 8.
-
-        t := errorArray.
-        errorArray := errorArray1.
-        errorArray1 := t.
-
-        errorArray1 atAllPut:0.
-
-        self valuesAtY:y from:0 to:(w-1) do:[:x :pixel |
-            |eP "{Class: SmallInteger }"
-             eD
-             eI "{Class: SmallInteger }"
-             xE "{Class: SmallInteger }"
-             xN "{Class: SmallInteger }" |
-
-            "/ get the colors grey value [0 .. 1]
-            grey := greyValues at:(pixel + 1).
-
-            "/ adjust error
-            xE := x + 2 + 1.
-            grey := (grey + (errorArray at:xE)).
-
-            byte := byte bitShift:1.
-            grey > (127*1024) ifTrue:[
-                byte := byte bitOr:1.      "/ white
-                e := grey - (255*1024)
-            ] ifFalse:[
-                e := grey                  "/ black
-            ].
-
-            e ~= 0 ifTrue:[
-                "/ distribute the error:
-                "/                  XX  8  4
-                "/             2  4  8  4  2
-
-                eD := e.
-                eI := e // 32.
-
-                eP := eI * 8. eD := eD - eP.
-
-                xN := xE + 1.
-                errorArray at:xN put:(errorArray at:xN) + eP.
-
-                eD := eD - eP.
-                errorArray1 at:xE put:(errorArray1 at:xE) + eP.
-
-                eP := eI * 4. eD := eD - eP.
-                xN := xE + 2.
-                errorArray at:xN put:(errorArray at:xN) + eP.
-
-                eD := eD - eP.
-                xN := xE - 1.
-                errorArray1 at:xN put:(errorArray1 at:xN) + eP.
-
-                eD := eD - eP.
-                xN := xE + 1.
-                errorArray1 at:xN put:(errorArray1 at:xN) + eP.
-
-                eP := eI * 2. eD := eD - eP.
-                xN := xE - 2.
-                errorArray1 at:xN put:(errorArray1 at:xN) + eP.
-
-                "/ eD := eD.
-                xN := xE + 2.
-                errorArray1 at:xN put:(errorArray1 at:xN) + eP.
-            ].
-
-            bitCnt := bitCnt - 1.
-            bitCnt == 0 ifTrue:[
-                monoBits at:dstIndex put:byte.
-                dstIndex := dstIndex + 1.
-                byte := 0.
-                bitCnt := 8.
-            ].
-
-        ].
-        bitCnt ~~ 8 ifTrue:[
-            byte := byte bitShift:bitCnt.
-            monoBits at:dstIndex put:byte.
-        ].
-
-        dstIndex := nextDst.
+	nextDst := dstIndex + bytesPerMonoRow.
+	byte := 0.
+	bitCnt := 8.
+
+	t := errorArray.
+	errorArray := errorArray1.
+	errorArray1 := t.
+
+	errorArray1 atAllPut:0.
+
+	self valuesAtY:y from:0 to:(w-1) do:[:x :pixel |
+	    |eP "{Class: SmallInteger }"
+	     eD
+	     eI "{Class: SmallInteger }"
+	     xE "{Class: SmallInteger }"
+	     xN "{Class: SmallInteger }" |
+
+	    "/ get the colors grey value [0 .. 1]
+	    grey := greyValues at:(pixel + 1).
+
+	    "/ adjust error
+	    xE := x + 2 + 1.
+	    grey := (grey + (errorArray at:xE)).
+
+	    byte := byte bitShift:1.
+	    grey > (127*1024) ifTrue:[
+		byte := byte bitOr:1.      "/ white
+		e := grey - (255*1024)
+	    ] ifFalse:[
+		e := grey                  "/ black
+	    ].
+
+	    e ~= 0 ifTrue:[
+		"/ distribute the error:
+		"/                  XX  8  4
+		"/             2  4  8  4  2
+
+		eD := e.
+		eI := e // 32.
+
+		eP := eI * 8. eD := eD - eP.
+
+		xN := xE + 1.
+		errorArray at:xN put:(errorArray at:xN) + eP.
+
+		eD := eD - eP.
+		errorArray1 at:xE put:(errorArray1 at:xE) + eP.
+
+		eP := eI * 4. eD := eD - eP.
+		xN := xE + 2.
+		errorArray at:xN put:(errorArray at:xN) + eP.
+
+		eD := eD - eP.
+		xN := xE - 1.
+		errorArray1 at:xN put:(errorArray1 at:xN) + eP.
+
+		eD := eD - eP.
+		xN := xE + 1.
+		errorArray1 at:xN put:(errorArray1 at:xN) + eP.
+
+		eP := eI * 2. eD := eD - eP.
+		xN := xE - 2.
+		errorArray1 at:xN put:(errorArray1 at:xN) + eP.
+
+		"/ eD := eD.
+		xN := xE + 2.
+		errorArray1 at:xN put:(errorArray1 at:xN) + eP.
+	    ].
+
+	    bitCnt := bitCnt - 1.
+	    bitCnt == 0 ifTrue:[
+		monoBits at:dstIndex put:byte.
+		dstIndex := dstIndex + 1.
+		byte := 0.
+		bitCnt := 8.
+	    ].
+
+	].
+	bitCnt ~~ 8 ifTrue:[
+	    byte := byte bitShift:bitCnt.
+	    monoBits at:dstIndex put:byte.
+	].
+
+	dstIndex := nextDst.
     ].
 
     ^ monoBits
@@ -7797,8 +7805,8 @@
      eR eRB eB eLB |
 
     depth > 8 ifTrue:[
-        self error:'unimplemented conversion'.
-        ^ nil
+	self error:'unimplemented conversion'.
+	^ nil
     ].
 
     w := width.
@@ -7818,176 +7826,176 @@
     bitCnt := 8.
 
     self depth <= 12 ifTrue:[
-        "/ fetch scaled brightness values outside of loop into a table;
-        "/ use table-value in loop
-
-        greyValues := self greyMapForRange:(greyLevels).
-
-        greyPixels := greyValues collect:[:v | v isNil ifTrue:[
-                                                   0
-                                               ] ifFalse:[
-                                                   v truncated]].
-
-        greyPixels := ByteArray withAll:greyPixels.
-
-        greyErrors := greyValues collect:[:v | v isNil ifTrue:[
-                                                   0
-                                               ] ifFalse:[
-                                                   ((v - v truncated) * 1024) truncated
-                                               ]].
-
-        0 to:(h-1) do:[:y |
-            nextDst := dstIndex + bytesPerOutRow.
-            byte := 0.
-
-            t := errorArray.
-            errorArray := nextErrorArray.
-            nextErrorArray := t.
-
-            nextErrorArray atAllPut:0.
-
-            self valuesAtY:y from:0 to:(w-1) do:[:x :value |
-                |e     "{ Class: SmallInteger }"
-                 pixel "{ Class: SmallInteger }"
-                 error "{ Class: SmallInteger }"
-                 e16   "{ Class: SmallInteger }"
-                 xE    "{ Class: SmallInteger }"
-                 xN    "{ Class: SmallInteger }" |
-
-                pixel := greyPixels at:(value + 1).
-
-                "/ adjust error
-                xE := x + 2.
-                error := (greyErrors at:(value + 1)) + (errorArray at:xE).
-
-                byte := byte bitShift:depth.
-                error > 512 "0.5" ifTrue:[
-                    pixel := pixel + 1.
-                    e := error - 1024 "1.0"
-                ] ifFalse:[
-                    e := error
-                ].
-                byte := byte bitOr:pixel.
-
-                e ~= 0 ifTrue:[
-                    e16 := e // 16.
-
-                    eR  := e16 * 7.              "/ 7/16 to right
-                    eRB := e16 "* 1".            "/ 1/16 to right below
-                    eB  := e16 * 5.              "/ 5/16 to below
-                    eLB := e - eR - eRB - eB.  "/ 3/16 to left below
-
-                    xN := xE + 1.
-                    eR ~= 0 ifTrue:[
-                        errorArray     at:xN put:(errorArray at:xN) + eR.
-                    ].
-                    eRB ~= 0 ifTrue:[
-                        nextErrorArray at:xN put:(nextErrorArray at:xN) + eRB.
-                    ].
-                    eB ~= 0 ifTrue:[
-                        nextErrorArray at:xE put:(nextErrorArray at:xE) + eB.
-                    ].
-                    eLB ~= 0 ifTrue:[
-                        xN := xE - 1.
-                        nextErrorArray at:xN put:(nextErrorArray at:xN) + eLB.
-                    ].
-                ].
-
-                bitCnt := bitCnt - depth.
-                bitCnt == 0 ifTrue:[
-                    outBits at:dstIndex put:byte.
-                    dstIndex := dstIndex + 1.
-                    byte := 0.
-                    bitCnt := 8.
-                ].
-
-            ].
-            bitCnt ~~ 8 ifTrue:[
-                byte := byte bitShift:bitCnt.
-                outBits at:dstIndex put:byte.
-                bitCnt := 8.
-            ].
-
-            dstIndex := nextDst.
-        ].
+	"/ fetch scaled brightness values outside of loop into a table;
+	"/ use table-value in loop
+
+	greyValues := self greyMapForRange:(greyLevels).
+
+	greyPixels := greyValues collect:[:v | v isNil ifTrue:[
+						   0
+					       ] ifFalse:[
+						   v truncated]].
+
+	greyPixels := ByteArray withAll:greyPixels.
+
+	greyErrors := greyValues collect:[:v | v isNil ifTrue:[
+						   0
+					       ] ifFalse:[
+						   ((v - v truncated) * 1024) truncated
+					       ]].
+
+	0 to:(h-1) do:[:y |
+	    nextDst := dstIndex + bytesPerOutRow.
+	    byte := 0.
+
+	    t := errorArray.
+	    errorArray := nextErrorArray.
+	    nextErrorArray := t.
+
+	    nextErrorArray atAllPut:0.
+
+	    self valuesAtY:y from:0 to:(w-1) do:[:x :value |
+		|e     "{ Class: SmallInteger }"
+		 pixel "{ Class: SmallInteger }"
+		 error "{ Class: SmallInteger }"
+		 e16   "{ Class: SmallInteger }"
+		 xE    "{ Class: SmallInteger }"
+		 xN    "{ Class: SmallInteger }" |
+
+		pixel := greyPixels at:(value + 1).
+
+		"/ adjust error
+		xE := x + 2.
+		error := (greyErrors at:(value + 1)) + (errorArray at:xE).
+
+		byte := byte bitShift:depth.
+		error > 512 "0.5" ifTrue:[
+		    pixel := pixel + 1.
+		    e := error - 1024 "1.0"
+		] ifFalse:[
+		    e := error
+		].
+		byte := byte bitOr:pixel.
+
+		e ~= 0 ifTrue:[
+		    e16 := e // 16.
+
+		    eR  := e16 * 7.              "/ 7/16 to right
+		    eRB := e16 "* 1".            "/ 1/16 to right below
+		    eB  := e16 * 5.              "/ 5/16 to below
+		    eLB := e - eR - eRB - eB.  "/ 3/16 to left below
+
+		    xN := xE + 1.
+		    eR ~= 0 ifTrue:[
+			errorArray     at:xN put:(errorArray at:xN) + eR.
+		    ].
+		    eRB ~= 0 ifTrue:[
+			nextErrorArray at:xN put:(nextErrorArray at:xN) + eRB.
+		    ].
+		    eB ~= 0 ifTrue:[
+			nextErrorArray at:xE put:(nextErrorArray at:xE) + eB.
+		    ].
+		    eLB ~= 0 ifTrue:[
+			xN := xE - 1.
+			nextErrorArray at:xN put:(nextErrorArray at:xN) + eLB.
+		    ].
+		].
+
+		bitCnt := bitCnt - depth.
+		bitCnt == 0 ifTrue:[
+		    outBits at:dstIndex put:byte.
+		    dstIndex := dstIndex + 1.
+		    byte := 0.
+		    bitCnt := 8.
+		].
+
+	    ].
+	    bitCnt ~~ 8 ifTrue:[
+		byte := byte bitShift:bitCnt.
+		outBits at:dstIndex put:byte.
+		bitCnt := 8.
+	    ].
+
+	    dstIndex := nextDst.
+	].
     ] ifFalse:[
-        0 to:(h-1) do:[:y |
-            nextDst := dstIndex + bytesPerOutRow.
-            byte := 0.
-
-            t := errorArray.
-            errorArray := nextErrorArray.
-            nextErrorArray := t.
-
-            nextErrorArray atAllPut:0.
-
-            self colorsAtY:y from:0 to:(w-1) do:[:x :clr |
-                |e     "{ Class: SmallInteger }"
-                 pixel "{ Class: SmallInteger }"
-                 error "{ Class: SmallInteger }"
-                 e16   "{ Class: SmallInteger }"
-                 xE    "{ Class: SmallInteger }"
-                 xN    "{ Class: SmallInteger }" |
-
-                grey := (clr brightness * greyLevels).
-                pixel := grey truncated.
-                error := ((grey - pixel) * 1024) truncated.
-
-                "/ adjust error
-                xE := x + 2.
-                error := error + (errorArray at:xE).
-
-                byte := byte bitShift:depth.
-                error > 512 "0.5" ifTrue:[
-                    pixel := pixel + 1.
-                    e := error - 1024 "1.0"
-                ] ifFalse:[
-                    e := error
-                ].
-
-                byte := byte bitOr:pixel.
-
-                e ~= 0 ifTrue:[
-                    e16 := e // 16.
-
-                    eR  := e16 * 7.              "/ 7/16 to right
-                    eRB := e16 "* 1".            "/ 1/16 to right below
-                    eB  := e16 * 5.              "/ 5/16 to below
-                    eLB := e - eR - eRB - eB.  "/ 3/16 to left below
-
-                    xN := xE + 1.
-                    eR ~= 0 ifTrue:[
-                        errorArray     at:xN put:(errorArray at:xN) + eR.
-                    ].
-                    eRB ~= 0 ifTrue:[
-                        nextErrorArray at:xN put:(nextErrorArray at:xN) + eRB.
-                    ].
-                    eB ~= 0 ifTrue:[
-                        nextErrorArray at:xE put:(nextErrorArray at:xE) + eB.
-                    ].
-                    eLB ~= 0 ifTrue:[
-                        xN := xE - 1.
-                        nextErrorArray at:xN put:(nextErrorArray at:xN) + eLB.
-                    ].
-                ].
-
-                bitCnt := bitCnt - depth.
-                bitCnt == 0 ifTrue:[
-                    outBits at:dstIndex put:byte.
-                    dstIndex := dstIndex + 1.
-                    byte := 0.
-                    bitCnt := 8.
-                ].
-
-            ].
-            bitCnt ~~ 8 ifTrue:[
-                byte := byte bitShift:bitCnt.
-                outBits at:dstIndex put:byte.
-                bitCnt := 8.
-            ].
-
-            dstIndex := nextDst.
-        ].
+	0 to:(h-1) do:[:y |
+	    nextDst := dstIndex + bytesPerOutRow.
+	    byte := 0.
+
+	    t := errorArray.
+	    errorArray := nextErrorArray.
+	    nextErrorArray := t.
+
+	    nextErrorArray atAllPut:0.
+
+	    self colorsAtY:y from:0 to:(w-1) do:[:x :clr |
+		|e     "{ Class: SmallInteger }"
+		 pixel "{ Class: SmallInteger }"
+		 error "{ Class: SmallInteger }"
+		 e16   "{ Class: SmallInteger }"
+		 xE    "{ Class: SmallInteger }"
+		 xN    "{ Class: SmallInteger }" |
+
+		grey := (clr brightness * greyLevels).
+		pixel := grey truncated.
+		error := ((grey - pixel) * 1024) truncated.
+
+		"/ adjust error
+		xE := x + 2.
+		error := error + (errorArray at:xE).
+
+		byte := byte bitShift:depth.
+		error > 512 "0.5" ifTrue:[
+		    pixel := pixel + 1.
+		    e := error - 1024 "1.0"
+		] ifFalse:[
+		    e := error
+		].
+
+		byte := byte bitOr:pixel.
+
+		e ~= 0 ifTrue:[
+		    e16 := e // 16.
+
+		    eR  := e16 * 7.              "/ 7/16 to right
+		    eRB := e16 "* 1".            "/ 1/16 to right below
+		    eB  := e16 * 5.              "/ 5/16 to below
+		    eLB := e - eR - eRB - eB.  "/ 3/16 to left below
+
+		    xN := xE + 1.
+		    eR ~= 0 ifTrue:[
+			errorArray     at:xN put:(errorArray at:xN) + eR.
+		    ].
+		    eRB ~= 0 ifTrue:[
+			nextErrorArray at:xN put:(nextErrorArray at:xN) + eRB.
+		    ].
+		    eB ~= 0 ifTrue:[
+			nextErrorArray at:xE put:(nextErrorArray at:xE) + eB.
+		    ].
+		    eLB ~= 0 ifTrue:[
+			xN := xE - 1.
+			nextErrorArray at:xN put:(nextErrorArray at:xN) + eLB.
+		    ].
+		].
+
+		bitCnt := bitCnt - depth.
+		bitCnt == 0 ifTrue:[
+		    outBits at:dstIndex put:byte.
+		    dstIndex := dstIndex + 1.
+		    byte := 0.
+		    bitCnt := 8.
+		].
+
+	    ].
+	    bitCnt ~~ 8 ifTrue:[
+		byte := byte bitShift:bitCnt.
+		outBits at:dstIndex put:byte.
+		bitCnt := 8.
+	    ].
+
+	    dstIndex := nextDst.
+	].
     ].
 
     ^ outBits
@@ -8032,64 +8040,64 @@
     byte := 0.
 
     self depth <= 12 ifTrue:[
-        "/ fetch scaled brightness values outside of loop into a table;
-        "/ use table-value in loop
-
-        greyValues := self greyMapForRange:(255 * 1024).
-        greyValues := greyValues collect:[:v | v rounded].
-
-        0 to:(h-1) do:[:y |
-            nextDst := dstIndex + bytesPerMonoRow.
-
-            t := errorArray.
-            errorArray := nextErrorArray.
-            nextErrorArray := t.
-
-            nextErrorArray atAllPut:0.
-
-            self valuesAtY:y from:0 to:(w-1) do:[:x :pixel |
+	"/ fetch scaled brightness values outside of loop into a table;
+	"/ use table-value in loop
+
+	greyValues := self greyMapForRange:(255 * 1024).
+	greyValues := greyValues collect:[:v | v rounded].
+
+	0 to:(h-1) do:[:y |
+	    nextDst := dstIndex + bytesPerMonoRow.
+
+	    t := errorArray.
+	    errorArray := nextErrorArray.
+	    nextErrorArray := t.
+
+	    nextErrorArray atAllPut:0.
+
+	    self valuesAtY:y from:0 to:(w-1) do:[:x :pixel |
 %{
-                int __grey, __e;
-                int __byte = __intVal(byte);
-                OBJ *__errorArray = __ArrayInstPtr(errorArray)->a_element;
-                OBJ *__nextErrorArray = __ArrayInstPtr(nextErrorArray)->a_element;
-                int __x = __intVal(x);
-                int __eR, __eB, __eRB, __eLB, __eI;
-                int __bitCnt = __intVal(bitCnt);
-
-                __grey = __intVal(__ArrayInstPtr(greyValues)->a_element[__intVal(pixel)]);
-                __grey += __intVal(__errorArray[__x+1]);
-
-                __byte <<= 1;
-                if (__grey > 127*1024) {
-                    __e = __grey - (255*1024);
-                    __byte |= 1;
-                } else {
-                    __e = __grey;
-                }
-                if (__e) {
-                    __eI = __e >> 4;
-                    __eR  = __eI * 7;
-                    __eRB = __eI * 1;
-                    __eB  = __eI * 5;
-                    __eLB = __e - __eR - __eRB - __eB;
-                    __errorArray[__x+2] = __MKSMALLINT(__intVal(__errorArray[__x+2]) + __eR);
-                    __nextErrorArray[__x+2] = __MKSMALLINT(__intVal(__nextErrorArray[__x+2]) + __eRB);
-                    __nextErrorArray[__x+1] = __MKSMALLINT(__intVal(__nextErrorArray[__x+1]) + __eB);
-                    __nextErrorArray[__x  ] = __MKSMALLINT(__intVal(__nextErrorArray[__x  ]) + __eLB);
-
-                }
-                __bitCnt--;
-                if (__bitCnt == 0) {
-                    int __dstIndex = __intVal(dstIndex);
-
-                    __ByteArrayInstPtr(monoBits)->ba_element[__dstIndex-1] = __byte;
-                    dstIndex = __MKSMALLINT(__dstIndex + 1);
-                    __byte = 0;
-                    __bitCnt = 8;
-                }
-                byte = __MKSMALLINT(__byte);
-                bitCnt = __MKSMALLINT(__bitCnt);
+		int __grey, __e;
+		int __byte = __intVal(byte);
+		OBJ *__errorArray = __ArrayInstPtr(errorArray)->a_element;
+		OBJ *__nextErrorArray = __ArrayInstPtr(nextErrorArray)->a_element;
+		int __x = __intVal(x);
+		int __eR, __eB, __eRB, __eLB, __eI;
+		int __bitCnt = __intVal(bitCnt);
+
+		__grey = __intVal(__ArrayInstPtr(greyValues)->a_element[__intVal(pixel)]);
+		__grey += __intVal(__errorArray[__x+1]);
+
+		__byte <<= 1;
+		if (__grey > 127*1024) {
+		    __e = __grey - (255*1024);
+		    __byte |= 1;
+		} else {
+		    __e = __grey;
+		}
+		if (__e) {
+		    __eI = __e >> 4;
+		    __eR  = __eI * 7;
+		    __eRB = __eI * 1;
+		    __eB  = __eI * 5;
+		    __eLB = __e - __eR - __eRB - __eB;
+		    __errorArray[__x+2] = __MKSMALLINT(__intVal(__errorArray[__x+2]) + __eR);
+		    __nextErrorArray[__x+2] = __MKSMALLINT(__intVal(__nextErrorArray[__x+2]) + __eRB);
+		    __nextErrorArray[__x+1] = __MKSMALLINT(__intVal(__nextErrorArray[__x+1]) + __eB);
+		    __nextErrorArray[__x  ] = __MKSMALLINT(__intVal(__nextErrorArray[__x  ]) + __eLB);
+
+		}
+		__bitCnt--;
+		if (__bitCnt == 0) {
+		    int __dstIndex = __intVal(dstIndex);
+
+		    __ByteArrayInstPtr(monoBits)->ba_element[__dstIndex-1] = __byte;
+		    dstIndex = __MKSMALLINT(__dstIndex + 1);
+		    __byte = 0;
+		    __bitCnt = 8;
+		}
+		byte = __MKSMALLINT(__byte);
+		bitCnt = __MKSMALLINT(__bitCnt);
 %}.
 
 "/                |eI "{ Class: SmallInteger }"
@@ -8142,91 +8150,91 @@
 "/                    byte := 0.
 "/                    bitCnt := 8.
 "/                ].
-                  0
-            ].
-            bitCnt ~~ 8 ifTrue:[
-                byte := byte bitShift:bitCnt.
-                monoBits at:dstIndex put:byte.
-                bitCnt := 8.
-                byte := 0.
-            ].
-
-            dstIndex := nextDst.
-        ].
+		  0
+	    ].
+	    bitCnt ~~ 8 ifTrue:[
+		byte := byte bitShift:bitCnt.
+		monoBits at:dstIndex put:byte.
+		bitCnt := 8.
+		byte := 0.
+	    ].
+
+	    dstIndex := nextDst.
+	].
     ] ifFalse:[
-        'Image [info]: slow floydSteinberg dither ..' infoPrintCR.
-
-        0 to:(h-1) do:[:y |
-            nextDst := dstIndex + bytesPerMonoRow.
-
-            t := errorArray.
-            errorArray := nextErrorArray.
-            nextErrorArray := t.
-
-            nextErrorArray atAllPut:0.
-
-            self colorsAtY:y from:0 to:(w-1) do:[:x :clr |
-                |eI "{ Class: SmallInteger }"
-                 xE "{ Class: SmallInteger }"
-                 xN "{ Class: SmallInteger }" |
-
-                "/ get the colors grey value [0 .. 1]
-                grey := (clr brightness * 255).
-
-                "/ adjust error
-                xE := x + 2.
-                grey := (grey + (errorArray at:xE)) rounded.
-
-                byte := byte bitShift:1.
-                grey > 127 ifTrue:[
-                    byte := byte bitOr:1.      "/ white
-                    e := grey - 255
-                ] ifFalse:[
-                    e := grey                  "/ black
-                ].
-
-                e ~= 0 ifTrue:[
-                    eD := e.
-                    eI := e // 16.
-                    eR  := eI * 7.              "/ 7/16 to right
-                    eRB := eI "* 1".            "/ 1/16 to right below
-                    eB  := eI * 5.              "/ 5/16 to below
-                    eLB := eD - eR - eRB - eB.  "/ 3/16 to left below
-
-                    xN := xE + 1.
-                    eR ~= 0 ifTrue:[
-                        errorArray     at:xN put:(errorArray at:xN) + eR.
-                    ].
-                    eRB ~= 0 ifTrue:[
-                        nextErrorArray at:xN put:(nextErrorArray at:xN) + eRB.
-                    ].
-                    eB ~= 0 ifTrue:[
-                        nextErrorArray at:xE put:(nextErrorArray at:xE) + eB.
-                    ].
-                    eLB ~= 0 ifTrue:[
-                        xN := xE - 1.
-                        nextErrorArray at:xN put:(nextErrorArray at:xN) + eLB.
-                    ].
-                ].
-
-                bitCnt := bitCnt - 1.
-                bitCnt == 0 ifTrue:[
-                    monoBits at:dstIndex put:byte.
-                    dstIndex := dstIndex + 1.
-                    byte := 0.
-                    bitCnt := 8.
-                ].
-
-            ].
-            bitCnt ~~ 8 ifTrue:[
-                byte := byte bitShift:bitCnt.
-                monoBits at:dstIndex put:byte.
-                bitCnt := 8.
-                byte := 0.
-            ].
-
-            dstIndex := nextDst.
-        ].
+	'Image [info]: slow floydSteinberg dither ..' infoPrintCR.
+
+	0 to:(h-1) do:[:y |
+	    nextDst := dstIndex + bytesPerMonoRow.
+
+	    t := errorArray.
+	    errorArray := nextErrorArray.
+	    nextErrorArray := t.
+
+	    nextErrorArray atAllPut:0.
+
+	    self colorsAtY:y from:0 to:(w-1) do:[:x :clr |
+		|eI "{ Class: SmallInteger }"
+		 xE "{ Class: SmallInteger }"
+		 xN "{ Class: SmallInteger }" |
+
+		"/ get the colors grey value [0 .. 1]
+		grey := (clr brightness * 255).
+
+		"/ adjust error
+		xE := x + 2.
+		grey := (grey + (errorArray at:xE)) rounded.
+
+		byte := byte bitShift:1.
+		grey > 127 ifTrue:[
+		    byte := byte bitOr:1.      "/ white
+		    e := grey - 255
+		] ifFalse:[
+		    e := grey                  "/ black
+		].
+
+		e ~= 0 ifTrue:[
+		    eD := e.
+		    eI := e // 16.
+		    eR  := eI * 7.              "/ 7/16 to right
+		    eRB := eI "* 1".            "/ 1/16 to right below
+		    eB  := eI * 5.              "/ 5/16 to below
+		    eLB := eD - eR - eRB - eB.  "/ 3/16 to left below
+
+		    xN := xE + 1.
+		    eR ~= 0 ifTrue:[
+			errorArray     at:xN put:(errorArray at:xN) + eR.
+		    ].
+		    eRB ~= 0 ifTrue:[
+			nextErrorArray at:xN put:(nextErrorArray at:xN) + eRB.
+		    ].
+		    eB ~= 0 ifTrue:[
+			nextErrorArray at:xE put:(nextErrorArray at:xE) + eB.
+		    ].
+		    eLB ~= 0 ifTrue:[
+			xN := xE - 1.
+			nextErrorArray at:xN put:(nextErrorArray at:xN) + eLB.
+		    ].
+		].
+
+		bitCnt := bitCnt - 1.
+		bitCnt == 0 ifTrue:[
+		    monoBits at:dstIndex put:byte.
+		    dstIndex := dstIndex + 1.
+		    byte := 0.
+		    bitCnt := 8.
+		].
+
+	    ].
+	    bitCnt ~~ 8 ifTrue:[
+		byte := byte bitShift:bitCnt.
+		monoBits at:dstIndex put:byte.
+		bitCnt := 8.
+		byte := 0.
+	    ].
+
+	    dstIndex := nextDst.
+	].
     ].
 
     ^ monoBits
@@ -9224,7 +9232,7 @@
      xE              "{Class: SmallInteger }" |
 
     self depth > 12 ifTrue:[
-        ^ self floydSteinbergDitheredMonochromeBits
+	^ self floydSteinbergDitheredMonochromeBits
     ].
 
     w := width.
@@ -9246,98 +9254,98 @@
     greyValues := self greyMapForRange:(255 * 1024).
 
     0 to:(h-1) do:[:y |
-        nextDst := dstIndex + bytesPerMonoRow.
-        byte := 0.
-        bitCnt := 8.
-
-        t := errorArray.
-        errorArray := errorArray1.
-        errorArray1 := errorArray2.
-        errorArray2 := errorArray3.
-        errorArray3 := t.
-
-        errorArray3 atAllPut:0.
-
-        self valuesAtY:y from:0 to:(w-1) do:[:x :pixel |
-            |eP eD|
-
-            "/ get the colors grey value [0 .. 1]
-            grey := greyValues at:(pixel + 1).
-
-            "/ adjust error
-            xE := x + 3 + 1.
-            grey := (grey + (errorArray at:xE)).
-
-            byte := byte bitShift:1.
-            grey > (127 * 1024) ifTrue:[
-                byte := byte bitOr:1.      "/ white
-                e := grey - (255 * 1024)
-            ] ifFalse:[
-                e := grey                  "/ black
-            ].
-
-            e ~= 0 ifTrue:[
-                "/ distribute the error:
-                "/                  XX    32
-                "/         12    26    30    16
-                "/            12    26    12
-                "/          5    12    12     5
-
-                eD := e.
-                e := e // 200.
-
-                eP := e * 32. eD := eD - eP.
-                errorArray at:xE+2 put:(errorArray at:xE+2) + eP.
-
-                eP := e * 30. eD := eD - eP.
-                errorArray1 at:xE+1 put:(errorArray1 at:xE+1) + eP.
-
-                eP := e * 16. eD := eD - eP.
-                errorArray1 at:xE+3 put:(errorArray1 at:xE+3) + eP.
-
-                eP := e * 26. eD := eD - eP.
-                errorArray1 at:xE-1 put:(errorArray1 at:xE-1) + eP.
-
-                eD := eD - eP.
-                errorArray2 at:xE put:(errorArray2 at:xE) + eP.
-
-                eP := e * 12. eD := eD - eP.
-                errorArray1 at:xE-3 put:(errorArray1 at:xE-3) + eP.
-
-                eD := eD - eP.
-                errorArray2 at:xE-2 put:(errorArray2 at:xE-2) + eP.
-
-                eD := eD - eP.
-                errorArray2 at:xE+2 put:(errorArray2 at:xE+2) + eP.
-
-                eD := eD - eP.
-                errorArray3 at:xE-1 put:(errorArray3 at:xE-1) + eP.
-
-                eD := eD - eP.
-                errorArray3 at:xE+1 put:(errorArray3 at:xE+1) + eP.
-
-                eP := e * 5. eD := eD - eP.
-                errorArray3 at:xE-3 put:(errorArray3 at:xE-3) + eP.
-
-                eP := eD.
-                errorArray3 at:xE+3 put:(errorArray3 at:xE+3) + eP.
-            ].
-
-            bitCnt := bitCnt - 1.
-            bitCnt == 0 ifTrue:[
-                monoBits at:dstIndex put:byte.
-                dstIndex := dstIndex + 1.
-                byte := 0.
-                bitCnt := 8.
-            ].
-
-        ].
-        bitCnt ~~ 8 ifTrue:[
-            byte := byte bitShift:bitCnt.
-            monoBits at:dstIndex put:byte.
-        ].
-
-        dstIndex := nextDst.
+	nextDst := dstIndex + bytesPerMonoRow.
+	byte := 0.
+	bitCnt := 8.
+
+	t := errorArray.
+	errorArray := errorArray1.
+	errorArray1 := errorArray2.
+	errorArray2 := errorArray3.
+	errorArray3 := t.
+
+	errorArray3 atAllPut:0.
+
+	self valuesAtY:y from:0 to:(w-1) do:[:x :pixel |
+	    |eP eD|
+
+	    "/ get the colors grey value [0 .. 1]
+	    grey := greyValues at:(pixel + 1).
+
+	    "/ adjust error
+	    xE := x + 3 + 1.
+	    grey := (grey + (errorArray at:xE)).
+
+	    byte := byte bitShift:1.
+	    grey > (127 * 1024) ifTrue:[
+		byte := byte bitOr:1.      "/ white
+		e := grey - (255 * 1024)
+	    ] ifFalse:[
+		e := grey                  "/ black
+	    ].
+
+	    e ~= 0 ifTrue:[
+		"/ distribute the error:
+		"/                  XX    32
+		"/         12    26    30    16
+		"/            12    26    12
+		"/          5    12    12     5
+
+		eD := e.
+		e := e // 200.
+
+		eP := e * 32. eD := eD - eP.
+		errorArray at:xE+2 put:(errorArray at:xE+2) + eP.
+
+		eP := e * 30. eD := eD - eP.
+		errorArray1 at:xE+1 put:(errorArray1 at:xE+1) + eP.
+
+		eP := e * 16. eD := eD - eP.
+		errorArray1 at:xE+3 put:(errorArray1 at:xE+3) + eP.
+
+		eP := e * 26. eD := eD - eP.
+		errorArray1 at:xE-1 put:(errorArray1 at:xE-1) + eP.
+
+		eD := eD - eP.
+		errorArray2 at:xE put:(errorArray2 at:xE) + eP.
+
+		eP := e * 12. eD := eD - eP.
+		errorArray1 at:xE-3 put:(errorArray1 at:xE-3) + eP.
+
+		eD := eD - eP.
+		errorArray2 at:xE-2 put:(errorArray2 at:xE-2) + eP.
+
+		eD := eD - eP.
+		errorArray2 at:xE+2 put:(errorArray2 at:xE+2) + eP.
+
+		eD := eD - eP.
+		errorArray3 at:xE-1 put:(errorArray3 at:xE-1) + eP.
+
+		eD := eD - eP.
+		errorArray3 at:xE+1 put:(errorArray3 at:xE+1) + eP.
+
+		eP := e * 5. eD := eD - eP.
+		errorArray3 at:xE-3 put:(errorArray3 at:xE-3) + eP.
+
+		eP := eD.
+		errorArray3 at:xE+3 put:(errorArray3 at:xE+3) + eP.
+	    ].
+
+	    bitCnt := bitCnt - 1.
+	    bitCnt == 0 ifTrue:[
+		monoBits at:dstIndex put:byte.
+		dstIndex := dstIndex + 1.
+		byte := 0.
+		bitCnt := 8.
+	    ].
+
+	].
+	bitCnt ~~ 8 ifTrue:[
+	    byte := byte bitShift:bitCnt.
+	    monoBits at:dstIndex put:byte.
+	].
+
+	dstIndex := nextDst.
     ].
 
     ^ monoBits
@@ -10325,7 +10333,7 @@
     |newImage|
 
     self colorMap isNil ifTrue:[
-        ^ self withPixelFunctionApplied:[:orig :clr :x :y | aBlock  value:clr]
+	^ self withPixelFunctionApplied:[:orig :clr :x :y | aBlock  value:clr]
 "/        self error:'no colormap in image'.
 "/        ^ nil
     ].
@@ -10342,7 +10350,7 @@
      leave red component only:
 
      (Image fromFile:'goodies/bitmaps/gifImages/claus.gif')
-        copyWithColorMapProcessing:[:clr | Color red:(clr red) green:0 blue:0]
+	copyWithColorMapProcessing:[:clr | Color red:(clr red) green:0 blue:0]
     "
 
     "
@@ -10360,32 +10368,32 @@
      make it reddish:
 
      (Image fromFile:'../../goodies/bitmaps/gifImages/claus.gif')
-        copyWithColorMapProcessing:[:clr | Color red:((clr red * 2) min:100) green:clr green blue:clr blue]
+	copyWithColorMapProcessing:[:clr | Color red:((clr red * 2) min:100) green:clr green blue:clr blue]
     "
 
     "
      invert:
 
      (Image fromFile:'bitmaps/gifImages/claus.gif')
-        copyWithColorMapProcessing:[:clr | Color red:(100 - clr red) green:(100 - clr green) blue:(100 - clr green)]
+	copyWithColorMapProcessing:[:clr | Color red:(100 - clr red) green:(100 - clr green) blue:(100 - clr green)]
     "
 
     "
      lighter:
 
      (Image fromFile:'bitmaps/gifImages/claus.gif')
-        copyWithColorMapProcessing:[:clr | |r g b|
-                                                r := clr red.  g := clr green.  b := clr blue.
-                                                Color red:(r + (100-r//2))
-                                                      green:(g + (100-g//2))
-                                                      blue:(b + (100-b//2))]
+	copyWithColorMapProcessing:[:clr | |r g b|
+						r := clr red.  g := clr green.  b := clr blue.
+						Color red:(r + (100-r//2))
+						      green:(g + (100-g//2))
+						      blue:(b + (100-b//2))]
     "
 
     "
      darker:
 
      (Image fromFile:'bitmaps/gifImages/claus.gif')
-        copyWithColorMapProcessing:[:clr | Color red:(clr red//2) green:(clr green // 2) blue:(clr blue // 2)]
+	copyWithColorMapProcessing:[:clr | Color red:(clr red//2) green:(clr green // 2) blue:(clr blue // 2)]
     "
 
     "Modified: 24.4.1997 / 18:28:05 / cg"
@@ -12667,9 +12675,9 @@
     bytes := ByteArray new:(bpr * height).
     idx := 1.
     0 to:height-1 do:[:y |
-        0 to:width-1 do:[:x |
-            self pixelAtX:x y:y put:(pixelFunction value:x value:y).
-        ]
+	0 to:width-1 do:[:x |
+	    self pixelAtX:x y:y put:(pixelFunction value:x value:y).
+	]
     ].
 !
 
@@ -12703,10 +12711,10 @@
 !
 
 pixelFunction:aTwoArgFunction inX:xInterval y:yInterval
-    "set the pixel function and a viewport. 
+    "set the pixel function and a viewport.
      This is used to define a functional image,
      where pixel values are computed via a function instead of coming
-     from a bits array. 
+     from a bits array.
      The pixelFunction will map (x E xInterval) x (y E yInterval) -> pixel"
 
     |sX sY tX tY|
@@ -12717,10 +12725,10 @@
     tX := xInterval start.
     tY := yInterval start.
 
-    pixelFunction := 
-        [:x :y | 
-            aTwoArgFunction value:(x * sX + tX) value:(y * sY + tY)
-        ]
+    pixelFunction :=
+	[:x :y |
+	    aTwoArgFunction value:(x * sX + tX) value:(y * sY + tY)
+	]
 
     "
      |i|
@@ -12740,43 +12748,43 @@
     |colors usedValues colorMapArray needBPS needSemi|
 
     needSemi := false.
-    aStream nextPutAll:('(%1 width:%2 height:%3' 
-                            bindWith:self class name
-                            with:width 
-                            with:height).
+    aStream nextPutAll:('(%1 width:%2 height:%3'
+			    bindWith:self class name
+			    with:width
+			    with:height).
 
     "/ avoiding some unneeded stuff here makes object files with many images a bit smaller.
     "/ no need for the photometric, if it's the default anyway
     photometric ~= self class defaultPhotometric ifTrue:[
-        (colorMap isNil or:[photometric ~~ #palette]) ifTrue:[
-            aStream nextPutAll:' photometric:('. photometric storeOn:aStream. aStream nextPut:$).
+	(colorMap isNil or:[photometric ~~ #palette]) ifTrue:[
+	    aStream nextPutAll:' photometric:('. photometric storeOn:aStream. aStream nextPut:$).
             needSemi := false.
-        ].
+	].
     ].
     aStream nextPut:$).
 
     "/ no need to store bitPerSample/samplesPerPixel in all situations
     needBPS := true.
 
-    self depth == 1 
-        ifTrue:[ needBPS := false ]
-        ifFalse:[
-            ((photometric == #palette) 
-                and:[ (bitsPerSample size == 1)
-                and:[ ((bitsPerSample at:1) == self depth)
-                and:[ samplesPerPixel == 1 ]]])
-            ifTrue:[
-                needBPS := false.
-            ].
-        ].
+    self depth == 1
+	ifTrue:[ needBPS := false ]
+	ifFalse:[
+	    ((photometric == #palette)
+		and:[ (bitsPerSample size == 1)
+		and:[ ((bitsPerSample at:1) == self depth)
+		and:[ samplesPerPixel == 1 ]]])
+	    ifTrue:[
+		needBPS := false.
+	    ].
+	].
 
     needBPS ifTrue:[
-        needSemi ifTrue:[aStream nextPutAll:';'].
-        aStream nextPutAll:' bitsPerSample:('. bitsPerSample storeOn:aStream. aStream nextPutAll:')'.
-        samplesPerPixel ~= bitsPerSample size ifTrue:[
-            aStream nextPutAll:'; samplesPerPixel:('. samplesPerPixel storeOn:aStream. aStream nextPutAll:')'. 
-        ].
-        needSemi := true.
+	needSemi ifTrue:[aStream nextPutAll:';'].
+	aStream nextPutAll:' bitsPerSample:('. bitsPerSample storeOn:aStream. aStream nextPutAll:')'.
+	samplesPerPixel ~= bitsPerSample size ifTrue:[
+	    aStream nextPutAll:'; samplesPerPixel:('. samplesPerPixel storeOn:aStream. aStream nextPutAll:')'.
+	].
+	needSemi := true.
     ].
 
     "/ assert that all bits are there...
@@ -12788,25 +12796,25 @@
     aStream nextPutAll:')'.
 
     colorMap notNil ifTrue:[
-        self depth <= 8 ifTrue:[
-            "/ cut off unused colors ...
-            usedValues := self usedValues.
-            colors := colorMap copyFrom:1 to:((usedValues max+1) min:colorMap size).
-
-            colorMapArray := OrderedCollection new.
-            colors do:[:clr| colorMapArray add:(clr redByte); add:(clr greenByte); add:(clr blueByte)].
-            aStream cr; spaces:12; nextPutAll:'colorMapFromArray:'.
-            colorMapArray asByteArray storeOn:aStream.
-        ] ifFalse:[
-            aStream ct; spaces:12; nextPutAll:'colorMap:('.
-            colorMap storeOn:aStream.
-            aStream nextPutAll:')'
-        ]
+	self depth <= 8 ifTrue:[
+	    "/ cut off unused colors ...
+	    usedValues := self usedValues.
+	    colors := colorMap copyFrom:1 to:((usedValues max+1) min:colorMap size).
+
+	    colorMapArray := OrderedCollection new.
+	    colors do:[:clr| colorMapArray add:(clr redByte); add:(clr greenByte); add:(clr blueByte)].
+	    aStream cr; spaces:12; nextPutAll:'colorMapFromArray:'.
+	    colorMapArray asByteArray storeOn:aStream.
+	] ifFalse:[
+	    aStream ct; spaces:12; nextPutAll:'colorMap:('.
+	    colorMap storeOn:aStream.
+	    aStream nextPutAll:')'
+	]
     ].
     mask notNil ifTrue:[
-        aStream cr; spaces:12; nextPutAll:'mask:('.
-        mask storeOn:aStream.
-        aStream nextPutAll:')'.
+	aStream cr; spaces:12; nextPutAll:'mask:('.
+	mask storeOn:aStream.
+	aStream nextPutAll:')'.
     ].
     aStream nextPutAll:'; yourself'
 
@@ -12915,44 +12923,44 @@
     |usedColors|
 
     samplesPerPixel == 3 ifTrue:[
-        photometric := photometricOrNil ? #rgb
+	photometric := photometricOrNil ? #rgb
     ] ifFalse:[
-        photometricOrNil isNil ifTrue:[
-            photometric := anImage photometric.
-        ] ifFalse:[
-            photometric := photometricOrNil.
-        ].
-        photometric == #palette ifTrue:[
-            self setColorMap:(anImage colorMap copy).
-            "
-             must generate/compress the colormap, if source image has higher depth
-             than myself.
-            "
-            (colorMap isNil
-            or:[anImage bitsPerPixel > self bitsPerPixel]) ifTrue:[
-                "
-                 get used colors are extracted into our colorMap
-                 (the at-put below will set the pixelValue according the
-                 new colorIndex
-                "
-                self setColorMap:(anImage usedColors asArray).
-                colorMap size > (1 bitShift:self bitsPerPixel) ifTrue:[
-                    'Image [warning]: possibly too many colors in image' errorPrintCR
-                ]
-            ]
-        ] ifFalse:[
-            (photometric == #blackIs0
-            or:[ photometric == #whiteIs0 ]) ifTrue:[
-            ] ifFalse:[
-                usedColors := anImage usedColors asArray.
-                usedColors size > (1 bitShift:self bitsPerPixel) ifTrue:[
-                    'Image [warning]: possibly too many colors in image' errorPrintCR.
-                    usedColors := usedColors copyTo:(1 bitShift:self bitsPerPixel).
-                ].
-                self setColorMap:usedColors.
-                photometric := #palette
-            ]
-        ]
+	photometricOrNil isNil ifTrue:[
+	    photometric := anImage photometric.
+	] ifFalse:[
+	    photometric := photometricOrNil.
+	].
+	photometric == #palette ifTrue:[
+	    self setColorMap:(anImage colorMap copy).
+	    "
+	     must generate/compress the colormap, if source image has higher depth
+	     than myself.
+	    "
+	    (colorMap isNil
+	    or:[anImage bitsPerPixel > self bitsPerPixel]) ifTrue:[
+		"
+		 get used colors are extracted into our colorMap
+		 (the at-put below will set the pixelValue according the
+		 new colorIndex
+		"
+		self setColorMap:(anImage usedColors asArray).
+		colorMap size > (1 bitShift:self bitsPerPixel) ifTrue:[
+		    'Image [warning]: possibly too many colors in image' errorPrintCR
+		]
+	    ]
+	] ifFalse:[
+	    (photometric == #blackIs0
+	    or:[ photometric == #whiteIs0 ]) ifTrue:[
+	    ] ifFalse:[
+		usedColors := anImage usedColors asArray.
+		usedColors size > (1 bitShift:self bitsPerPixel) ifTrue:[
+		    'Image [warning]: possibly too many colors in image' errorPrintCR.
+		    usedColors := usedColors copyTo:(1 bitShift:self bitsPerPixel).
+		].
+		self setColorMap:usedColors.
+		photometric := #palette
+	    ]
+	]
     ].
 
     "Created: 20.9.1995 / 00:58:42 / claus"
@@ -13185,9 +13193,9 @@
 repairPhotometric
     "/ kludge: repair a 'should not happen' situation...
     photometric isNil ifTrue:[
-        (self depth == 24 and:[ bitsPerSample size == 3 ]) ifTrue:[
-            photometric := #rgb
-        ].
+	(self depth == 24 and:[ bitsPerSample size == 3 ]) ifTrue:[
+	    photometric := #rgb
+	].
     ].
 ! !
 
@@ -13463,79 +13471,79 @@
 
     p := photometric.
     p isNil ifTrue:[
-        colorMap notNil ifTrue:[
-            p := #palette
-        ] ifFalse:[
-            "/ 'Image [warning]: no photometric - assume greyscale' infoPrintCR
-            p := #blackIs0
-        ]
+	colorMap notNil ifTrue:[
+	    p := #palette
+	] ifFalse:[
+	    "/ 'Image [warning]: no photometric - assume greyscale' infoPrintCR
+	    p := #blackIs0
+	]
     ].
 
     p == #blackIs0 ifTrue:[
-        maxPixel := (1 bitShift:self bitsPerPixel) - 1.
-        ^ Color gray:(pixelValue * (100 / maxPixel)).
+	maxPixel := (1 bitShift:self bitsPerPixel) - 1.
+	^ Color gray:(pixelValue * (100 / maxPixel)).
     ].
 
     p == #whiteIs0 ifTrue:[
-        maxPixel := (1 bitShift:self bitsPerPixel) - 1.
-        ^ Color gray:100 - (pixelValue * (100 / maxPixel)).
+	maxPixel := (1 bitShift:self bitsPerPixel) - 1.
+	^ Color gray:100 - (pixelValue * (100 / maxPixel)).
     ].
 
     p == #palette ifTrue:[
-        pixelValue >= colorMap size ifTrue:[
-            ^ Color black
-        ].
-        clr := colorMap at:(pixelValue + 1).
-        clr isNil ifTrue:[
-            ^ Color black.
-        ].
-        ^ clr.
+	pixelValue >= colorMap size ifTrue:[
+	    ^ Color black
+	].
+	clr := colorMap at:(pixelValue + 1).
+	clr isNil ifTrue:[
+	    ^ Color black.
+	].
+	^ clr.
     ].
 
     p == #rgb ifTrue:[
-        r := self redBitsOf:pixelValue.
-        g := self greenBitsOf:pixelValue.
-        b := self blueBitsOf:pixelValue.
-        "/ scale...
-        numRedBits := bitsPerSample at:1.
-        numGreenBits := bitsPerSample at:2.
-        numBlueBits := bitsPerSample at:3.
-        (r == 0) ifFalse:[ r := (100 / ((1 bitShift:numRedBits)-1) * r)].
-        (g == 0) ifFalse:[ g := (100 / ((1 bitShift:numGreenBits)-1) * g)].
-        (b == 0) ifFalse:[ b := (100 / ((1 bitShift:numBlueBits)-1) * b)].
-        ^ Color redPercent:r greenPercent:g bluePercent:b
+	r := self redBitsOf:pixelValue.
+	g := self greenBitsOf:pixelValue.
+	b := self blueBitsOf:pixelValue.
+	"/ scale...
+	numRedBits := bitsPerSample at:1.
+	numGreenBits := bitsPerSample at:2.
+	numBlueBits := bitsPerSample at:3.
+	(r == 0) ifFalse:[ r := (100 / ((1 bitShift:numRedBits)-1) * r)].
+	(g == 0) ifFalse:[ g := (100 / ((1 bitShift:numGreenBits)-1) * g)].
+	(b == 0) ifFalse:[ b := (100 / ((1 bitShift:numBlueBits)-1) * b)].
+	^ Color redPercent:r greenPercent:g bluePercent:b
     ].
 
     ((p == #rgba) or:[p == #argb]) ifTrue:[
-        r := self redBitsOf:pixelValue.
-        g := self greenBitsOf:pixelValue.
-        b := self blueBitsOf:pixelValue.
-        a := self alphaBitsOf:pixelValue.
-        "/ scale...
-        numRedBits := bitsPerSample at:1.
-        numGreenBits := bitsPerSample at:2.
-        numBlueBits := bitsPerSample at:3.
-        numAlphaBits := bitsPerSample at:4.
-        (r == 0) ifFalse:[ r := (100 / ((1 bitShift:numRedBits)-1) * r)].
-        (g == 0) ifFalse:[ g := (100 / ((1 bitShift:numGreenBits)-1) * g)].
-        (b == 0) ifFalse:[ b := (100 / ((1 bitShift:numBlueBits)-1) * b)].
-        (a == 0) ifFalse:[ a := (100 / ((1 bitShift:numAlphaBits)-1) * a)].
-        ^ Color redPercent:r greenPercent:g bluePercent:b alphaPercent:a
+	r := self redBitsOf:pixelValue.
+	g := self greenBitsOf:pixelValue.
+	b := self blueBitsOf:pixelValue.
+	a := self alphaBitsOf:pixelValue.
+	"/ scale...
+	numRedBits := bitsPerSample at:1.
+	numGreenBits := bitsPerSample at:2.
+	numBlueBits := bitsPerSample at:3.
+	numAlphaBits := bitsPerSample at:4.
+	(r == 0) ifFalse:[ r := (100 / ((1 bitShift:numRedBits)-1) * r)].
+	(g == 0) ifFalse:[ g := (100 / ((1 bitShift:numGreenBits)-1) * g)].
+	(b == 0) ifFalse:[ b := (100 / ((1 bitShift:numBlueBits)-1) * b)].
+	(a == 0) ifFalse:[ a := (100 / ((1 bitShift:numAlphaBits)-1) * a)].
+	^ Color redPercent:r greenPercent:g bluePercent:b alphaPercent:a
     ].
 
     p == #cmyk ifTrue:[
-        c := self cyanComponentOfCMYK:pixelValue.
-        m := self magentaComponentOfCMYK:pixelValue.
-        y := self yellowComponentOfCMYK:pixelValue.
-        k := self blackComponentOfCMYK:pixelValue.
-        ^ Color cyan:c magenta:m yellow:y black:k.
+	c := self cyanComponentOfCMYK:pixelValue.
+	m := self magentaComponentOfCMYK:pixelValue.
+	y := self yellowComponentOfCMYK:pixelValue.
+	k := self blackComponentOfCMYK:pixelValue.
+	^ Color cyan:c magenta:m yellow:y black:k.
     ].
 
     p == #cmy ifTrue:[
-        c := self cyanComponentOfCMY:pixelValue.
-        m := self magentaComponentOfCMY:pixelValue.
-        y := self yellowComponentOfCMY:pixelValue.
-        ^ Color cyan:c magenta:m yellow:y.
+	c := self cyanComponentOfCMY:pixelValue.
+	m := self magentaComponentOfCMY:pixelValue.
+	y := self yellowComponentOfCMY:pixelValue.
+	^ Color cyan:c magenta:m yellow:y.
     ].
 
     self error:'invalid (unsupported) photometric'
@@ -13973,7 +13981,7 @@
 
     colors := self usedColorsMax:4096.
     colors isNil ifTrue:[
-        self error:'too many colors in image'.
+	self error:'too many colors in image'.
     ].
     ^ colors
 
@@ -13995,39 +14003,39 @@
     |usedValues max colors|
 
     photometric == #rgb ifTrue:[
-        usedValues := IdentitySet new.
-        self valuesFromX:0 y:0 toX:(width-1) y:(height-1)
-          do:[:x :y :pixel |
-            usedValues add:pixel.
-            usedValues size > nMax ifTrue:[
-                "/ too many to be returned here (think of the mass of
-                "/ data to be returned by a 24bit image ... ;-)
-                ^ nil
-            ]
-        ].
-        "/ code below is slightly faster ...
-        "/ colors := usedValues collect:[:pixel | self colorFromValue:pixel].
-        colors := usedValues collect:[:pixel | |r g b|
-                                        r := self redBitsOf:pixel.
-                                        g := self greenBitsOf:pixel.
-                                        b := self blueBitsOf:pixel.
-                                        "/ must scale to byte value...
-                                        r := r bitShift:(8 - (bitsPerSample at:1)).
-                                        g := g bitShift:(8 - (bitsPerSample at:2)).
-                                        b := b bitShift:(8 - (bitsPerSample at:3)).
-                                        Color redByte:r greenByte:g blueByte:b
-                                     ].
-        ^ colors.
+	usedValues := IdentitySet new.
+	self valuesFromX:0 y:0 toX:(width-1) y:(height-1)
+	  do:[:x :y :pixel |
+	    usedValues add:pixel.
+	    usedValues size > nMax ifTrue:[
+		"/ too many to be returned here (think of the mass of
+		"/ data to be returned by a 24bit image ... ;-)
+		^ nil
+	    ]
+	].
+	"/ code below is slightly faster ...
+	"/ colors := usedValues collect:[:pixel | self colorFromValue:pixel].
+	colors := usedValues collect:[:pixel | |r g b|
+					r := self redBitsOf:pixel.
+					g := self greenBitsOf:pixel.
+					b := self blueBitsOf:pixel.
+					"/ must scale to byte value...
+					r := r bitShift:(8 - (bitsPerSample at:1)).
+					g := g bitShift:(8 - (bitsPerSample at:2)).
+					b := b bitShift:(8 - (bitsPerSample at:3)).
+					Color redByte:r greenByte:g blueByte:b
+				     ].
+	^ colors.
     ].
 
     usedValues := self usedValues asArray.
     photometric == #palette ifTrue:[
-        colors := usedValues collect:[:val | (colorMap at:val+1 ifAbsent:[Color black])] as:Set.
+	colors := usedValues collect:[:val | (colorMap at:val+1 ifAbsent:[Color black])] as:Set.
     ] ifFalse:[
-        "/ (photometric == #blackIs0 or:[photometric == #whiteIs0])
-
-        max := (1 bitShift:self depth) - 1.
-        colors :=  usedValues collect:[:val | (Color gray:(100 * val / max ))] as:Set.
+	"/ (photometric == #blackIs0 or:[photometric == #whiteIs0])
+
+	max := (1 bitShift:self depth) - 1.
+	colors :=  usedValues collect:[:val | (Color gray:(100 * val / max ))] as:Set.
     ].
     ^ colors
 
@@ -14175,26 +14183,26 @@
 "/    ].
 
     photometric == #rgb ifTrue:[
-        samplesPerPixel >= 3 ifTrue:[
-            "/ r,g,b  b at low end
-            redBits := bitsPerSample at:1.
-            greenBits := bitsPerSample at:2.
-            blueBits := bitsPerSample at:3.
-            pixel := (((r bitShift:greenBits) + g) bitShift:blueBits) + b.
-            ^ pixel
-        ]
+	samplesPerPixel >= 3 ifTrue:[
+	    "/ r,g,b  b at low end
+	    redBits := bitsPerSample at:1.
+	    greenBits := bitsPerSample at:2.
+	    blueBits := bitsPerSample at:3.
+	    pixel := (((r bitShift:greenBits) + g) bitShift:blueBits) + b.
+	    ^ pixel
+	]
     ].
 
     photometric == #rgba ifTrue:[
-        samplesPerPixel >= 4 ifTrue:[
-            "/ a,r,g,b  b at low end
-            redBits := bitsPerSample at:1.
-            greenBits := bitsPerSample at:2.
-            blueBits := bitsPerSample at:3.
-            alphaBits := bitsPerSample at:4.
-            pixel := (((((a bitShift:redBits) + r) bitShift:greenBits) + g) bitShift:blueBits) + b.
-            ^ pixel
-        ]
+	samplesPerPixel >= 4 ifTrue:[
+	    "/ a,r,g,b  b at low end
+	    redBits := bitsPerSample at:1.
+	    greenBits := bitsPerSample at:2.
+	    blueBits := bitsPerSample at:3.
+	    alphaBits := bitsPerSample at:4.
+	    pixel := (((((a bitShift:redBits) + r) bitShift:greenBits) + g) bitShift:blueBits) + b.
+	    ^ pixel
+	]
     ].
     ImageErrorSignal raiseErrorString:'format not supported'.
     ^ nil
@@ -14306,13 +14314,13 @@
     "/
     suffix := aFileName asFilename suffix.
     readerClass := MIMETypes imageReaderForSuffix:suffix.
-    readerClass isNil ifTrue:[        
-        "/
-        "/ no known extension - could ask user for the format here.
-        "/ currently default to tiff format.
-        "/
-        readerClass := self class defaultImageFileWriter.
-        'Image [warning]: unknown extension - cannot figure out format - using default (',readerClass name,')' errorPrintCR.
+    readerClass isNil ifTrue:[
+	"/
+	"/ no known extension - could ask user for the format here.
+	"/ currently default to tiff format.
+	"/
+	readerClass := self class defaultImageFileWriter.
+	'Image [warning]: unknown extension - cannot figure out format - using default (',readerClass name,')' errorPrintCR.
     ].
     ^ self saveOn:aFileName quality:qualityPercentOrNil using:readerClass
 
@@ -14356,9 +14364,9 @@
 
      anImage := Image fromFile:'goodies/bitmaps/gifImages/garfield.gif'.
      Image cannotRepresentImageSignal handle:[:ex |
-        self warn:'cannot save the image in this format'
+	self warn:'cannot save the image in this format'
      ] do:[
-        anImage saveOn:'myImage.xbm' using:XBMReader.
+	anImage saveOn:'myImage.xbm' using:XBMReader.
      ]
     "
 
@@ -14408,9 +14416,9 @@
 
      anImage := Image fromFile:'goodies/bitmaps/gifImages/garfield.gif'.
      Image cannotRepresentImageSignal handle:[:ex |
-        self warn:'cannot save the image in this format'
+	self warn:'cannot save the image in this format'
      ] do:[
-        anImage saveOn:'myImage.xbm' using:XBMReader.
+	anImage saveOn:'myImage.xbm' using:XBMReader.
      ]
     "
 
@@ -14479,63 +14487,63 @@
     device := aDrawable graphicsDevice.
 
     (aDrawable isForm and:[aDrawable depth == 1]) ifTrue:[
-        "/ a monochrome bitmap ?
-        visType := #StaticGray.
-        ddepth := 1.
+	"/ a monochrome bitmap ?
+	visType := #StaticGray.
+	ddepth := 1.
     ] ifFalse:[
-        (aDrawable isForm) ifFalse:[
-            "
-             get some attributes of the display device
-            "
-            visType := device visualType.
-            ddepth := device depth.
-        ] ifTrue:[
-            visType := aDrawable photometric.
-            ddepth := aDrawable depth.
-        ].
+	(aDrawable isForm) ifFalse:[
+	    "
+	     get some attributes of the display device
+	    "
+	    visType := device visualType.
+	    ddepth := device depth.
+	] ifTrue:[
+	    visType := aDrawable photometric.
+	    ddepth := aDrawable depth.
+	].
     ].
 
     "/ kludge for 15bit XFree server
     ddepth == 15 ifTrue:[
-        ddepth := 16
+	ddepth := 16
     ].
 
     aDrawable isForm ifTrue:[
-        photometric := aDrawable photometric.
-        samplesPerPixel := ddepth == 24 ifTrue:3 ifFalse:1.
-        bitsPerSample := ddepth == 24 ifTrue:#[8 8 8 ] ifFalse:[ByteArray with:bpp].
+	photometric := aDrawable photometric.
+	samplesPerPixel := ddepth == 24 ifTrue:3 ifFalse:1.
+	bitsPerSample := ddepth == 24 ifTrue:#[8 8 8 ] ifFalse:[ByteArray with:bpp].
     ] ifFalse:[
-        (visType == #StaticGray) ifTrue:[
-            (device blackpixel == 0) ifTrue:[
-                photometric := #blackIs0
-            ] ifFalse:[
-                photometric := #whiteIs0
-            ].
-            samplesPerPixel := 1.
-            bpp := "bitsPerPixel :=" ddepth.
-            bitsPerSample := ByteArray with:bpp.
-        ] ifFalse:[
-            ((visType == #PseudoColor) or:[(visType == #StaticColor) or:[visType == #GrayScale]]) ifTrue:[
-                photometric := #palette.
-                samplesPerPixel := 1.
-                bpp := "bitsPerPixel :=" ddepth.
-                bitsPerSample := ByteArray with:bpp.
-            ] ifFalse:[
-                ((visType == #TrueColor) or:[visType == #DirectColor]) ifTrue:[
-                    photometric := #rgb.
-                    samplesPerPixel := 3.
+	(visType == #StaticGray) ifTrue:[
+	    (device blackpixel == 0) ifTrue:[
+		photometric := #blackIs0
+	    ] ifFalse:[
+		photometric := #whiteIs0
+	    ].
+	    samplesPerPixel := 1.
+	    bpp := "bitsPerPixel :=" ddepth.
+	    bitsPerSample := ByteArray with:bpp.
+	] ifFalse:[
+	    ((visType == #PseudoColor) or:[(visType == #StaticColor) or:[visType == #GrayScale]]) ifTrue:[
+		photometric := #palette.
+		samplesPerPixel := 1.
+		bpp := "bitsPerPixel :=" ddepth.
+		bitsPerSample := ByteArray with:bpp.
+	    ] ifFalse:[
+		((visType == #TrueColor) or:[visType == #DirectColor]) ifTrue:[
+		    photometric := #rgb.
+		    samplesPerPixel := 3.
     "/                bpp := "bitsPerPixel :=" depth.
     "/                bitsPerSample := ByteArray with:device bitsRed
     "/                                       with:device bitsGreen
     "/                                       with:device bitsBlue
-                    bpp := "bitsPerPixel :=" 24.
-                    bitsPerSample := #(8 8 8).
-                ] ifFalse:[
-                    self error:'screen visual not supported'.
-                    ^ nil
-                ]
-            ]
-        ].
+		    bpp := "bitsPerPixel :=" 24.
+		    bitsPerSample := #(8 8 8).
+		] ifFalse:[
+		    self error:'screen visual not supported'.
+		    ^ nil
+		]
+	    ]
+	].
     ].
 
     "
@@ -14553,13 +14561,13 @@
     "
     spaceBitsPerPixel := bpp.
     (bpp > 8) ifTrue:[
-        spaceBitsPerPixel := 16.
-        (bpp > 16) ifTrue:[
-            spaceBitsPerPixel := 32.
-            (bpp > 32) ifTrue:[
-                spaceBitsPerPixel := bpp.
-            ]
-        ]
+	spaceBitsPerPixel := 16.
+	(bpp > 16) ifTrue:[
+	    spaceBitsPerPixel := 32.
+	    (bpp > 32) ifTrue:[
+		spaceBitsPerPixel := bpp.
+	    ]
+	]
     ].
 
     bytesPerLine := (w * spaceBitsPerPixel + 31) // 32 * 4.
@@ -14570,19 +14578,19 @@
      get the pixels
     "
     aDrawable isForm ifTrue:[
-        (aDrawable id isNil and:[aDrawable bits notNil]) ifTrue:[
-            info := Dictionary new
-                        at:#bitsPerPixel put:(aDrawable depth);
-                        at:#byteOrder put:#msbFirst;
-                        at:#bitOrder put:#msbFirst; 
-                        at:#bytesPerLine put:(aDrawable width * aDrawable depth + 7)//8;
-                        yourself.
-            inData := aDrawable bits.
-        ] ifFalse:[
-            info := device getBitsFromPixmapId:aDrawable id x:x y:y width:w height:h into:inData.
-        ]
+	(aDrawable id isNil and:[aDrawable bits notNil]) ifTrue:[
+	    info := Dictionary new
+			at:#bitsPerPixel put:(aDrawable depth);
+			at:#byteOrder put:#msbFirst;
+			at:#bitOrder put:#msbFirst;
+			at:#bytesPerLine put:(aDrawable width * aDrawable depth + 7)//8;
+			yourself.
+	    inData := aDrawable bits.
+	] ifFalse:[
+	    info := device getBitsFromPixmapId:aDrawable id x:x y:y width:w height:h into:inData.
+	]
     ] ifFalse:[
-        info := device getBitsFromViewId:aDrawable id x:x y:y width:w height:h into:inData.
+	info := device getBitsFromViewId:aDrawable id x:x y:y width:w height:h into:inData.
     ].
 
     bitsPerPixelIn := info at:#bitsPerPixel.
@@ -14595,15 +14603,15 @@
     "/ mhmh - that's not needed
 
     bitsPerPixelIn < 8 ifTrue:[
-        bitOrder := info at:#bitOrder.
-        bitOrder ~~ #msbFirst ifTrue:[
-            inData
-                expandPixels:8
-                width:(inData size)
-                height:1
-                into:inData
-                mapping:(ImageReader reverseBits "TODO: reverseBitsForDepth:bitsPerPixelIn").
-        ].
+	bitOrder := info at:#bitOrder.
+	bitOrder ~~ #msbFirst ifTrue:[
+	    inData
+		expandPixels:8
+		width:(inData size)
+		height:1
+		into:inData
+		mapping:(ImageReader reverseBits "TODO: reverseBitsForDepth:bitsPerPixelIn").
+	].
     ].
 
     "
@@ -14619,108 +14627,108 @@
 
     ((bytesPerLine ~~ bytesPerLineIn)
     or:[bitsPerPixelIn ~~ bpp]) ifTrue:[
-        tmpData := inData.
-        inData := ByteArray uninitializedNew:(bytesPerLine * height).
-
-        srcRow := 1.
-        dstRow := 1.
-
-        bitsPerPixelIn ~~ bpp ifTrue:[
-            "/ for now, only 32 -> 24 is supported
-
-            maskR == 0 ifTrue:[
-                bitsR := device bitsRed.
-                bitsG := device bitsGreen.
-                bitsB := device bitsBlue.
-                maskR := (1 bitShift:bitsR) - 1.
-                maskG := (1 bitShift:bitsG) - 1.
-                maskB := (1 bitShift:bitsB) - 1.
-                shR := device shiftRed negated.
-                shG := device shiftGreen negated.
-                shB := device shiftBlue negated.
-            ] ifFalse:[
-                shR := (maskR lowBit - 1) negated.
-                bitsR := maskR highBit - maskR lowBit + 1.
-                maskR := maskR bitShift:shR.
-                shG := (maskG lowBit - 1) negated.
-                bitsG := maskG highBit - maskG lowBit + 1.
-                maskG := maskG bitShift:shG.
-                shB := (maskB lowBit - 1) negated.
-                bitsB := maskB highBit - maskB lowBit + 1.
-                maskB := maskB bitShift:shB.
-            ].
-            shR2 := (8 - bitsR).
-            shG2 := (8 - bitsG).
-            shB2 := (8 - bitsB).
-
-            ((bitsPerPixelIn == 32) and:[bpp == 24]) ifTrue:[
-                "/ 'reformatting 32->24...' printNL.
-                1 to:h do:[:hi |
-                    srcIndex := srcRow.
-                    dstIndex := dstRow.
-
-                    1 to:w do:[:wi |
-                        lword := tmpData unsignedInt32At:srcIndex MSB:isMSB.
-                        r := (lword bitShift:shR) bitAnd:maskR.
-                        g := (lword bitShift:shG) bitAnd:maskG.
-                        b := (lword bitShift:shB) bitAnd:maskB.
-
-                        inData at:dstIndex   put:r.
-                        inData at:dstIndex+1 put:g.
-                        inData at:dstIndex+2 put:b.
-                        srcIndex := srcIndex + 4.
-                        dstIndex := dstIndex + 3.
-                    ].
-                    dstRow := dstRow + bytesPerLine.
-                    srcRow := srcRow + bytesPerLineIn
-                ]
-            ] ifFalse:[
-                ((bitsPerPixelIn == 16) and:[bpp == 24]) ifTrue:[
-                    "/ 'reformatting 16->24...' printNL.
-                    1 to:h do:[:hi |
-                        srcIndex := srcRow.
-                        dstIndex := dstRow.
-
-                        1 to:w do:[:wi |
-                            word := tmpData unsignedInt16At:srcIndex MSB:isMSB.
-                            r := (word bitShift:shR) bitAnd:maskR.
-                            g := (word bitShift:shG) bitAnd:maskG.
-                            b := (word bitShift:shB) bitAnd:maskB.
-
-                            inData at:dstIndex   put:(r bitShift:shR2).
-                            inData at:dstIndex+1 put:(g bitShift:shG2).
-                            inData at:dstIndex+2 put:(b bitShift:shB2).
-
-                            srcIndex := srcIndex + 2.
-                            dstIndex := dstIndex + 3.
-                        ].
-                        dstRow := dstRow + bytesPerLine.
-                        srcRow := srcRow + bytesPerLineIn
-                    ]
-                ] ifFalse:[
-                    ('Image [warning]: unsupported depth combination: ' , bitsPerPixelIn printString , ' -> ' ,
-                                                        bpp printString) errorPrintCR.
-                    self shouldImplement.
-                    ^ nil
-                ]
-            ].
-        ] ifFalse:[
-            "/
-            "/ repad in the buffer
-            "/
-            1 to:h do:[:hi |
-                inData replaceFrom:dstRow to:(dstRow + bytesPerLine - 1)
-                              with:tmpData startingAt:srcRow.
-                dstRow := dstRow + bytesPerLine.
-                srcRow := srcRow + bytesPerLineIn
-            ]
-        ]
+	tmpData := inData.
+	inData := ByteArray uninitializedNew:(bytesPerLine * height).
+
+	srcRow := 1.
+	dstRow := 1.
+
+	bitsPerPixelIn ~~ bpp ifTrue:[
+	    "/ for now, only 32 -> 24 is supported
+
+	    maskR == 0 ifTrue:[
+		bitsR := device bitsRed.
+		bitsG := device bitsGreen.
+		bitsB := device bitsBlue.
+		maskR := (1 bitShift:bitsR) - 1.
+		maskG := (1 bitShift:bitsG) - 1.
+		maskB := (1 bitShift:bitsB) - 1.
+		shR := device shiftRed negated.
+		shG := device shiftGreen negated.
+		shB := device shiftBlue negated.
+	    ] ifFalse:[
+		shR := (maskR lowBit - 1) negated.
+		bitsR := maskR highBit - maskR lowBit + 1.
+		maskR := maskR bitShift:shR.
+		shG := (maskG lowBit - 1) negated.
+		bitsG := maskG highBit - maskG lowBit + 1.
+		maskG := maskG bitShift:shG.
+		shB := (maskB lowBit - 1) negated.
+		bitsB := maskB highBit - maskB lowBit + 1.
+		maskB := maskB bitShift:shB.
+	    ].
+	    shR2 := (8 - bitsR).
+	    shG2 := (8 - bitsG).
+	    shB2 := (8 - bitsB).
+
+	    ((bitsPerPixelIn == 32) and:[bpp == 24]) ifTrue:[
+		"/ 'reformatting 32->24...' printNL.
+		1 to:h do:[:hi |
+		    srcIndex := srcRow.
+		    dstIndex := dstRow.
+
+		    1 to:w do:[:wi |
+			lword := tmpData unsignedInt32At:srcIndex MSB:isMSB.
+			r := (lword bitShift:shR) bitAnd:maskR.
+			g := (lword bitShift:shG) bitAnd:maskG.
+			b := (lword bitShift:shB) bitAnd:maskB.
+
+			inData at:dstIndex   put:r.
+			inData at:dstIndex+1 put:g.
+			inData at:dstIndex+2 put:b.
+			srcIndex := srcIndex + 4.
+			dstIndex := dstIndex + 3.
+		    ].
+		    dstRow := dstRow + bytesPerLine.
+		    srcRow := srcRow + bytesPerLineIn
+		]
+	    ] ifFalse:[
+		((bitsPerPixelIn == 16) and:[bpp == 24]) ifTrue:[
+		    "/ 'reformatting 16->24...' printNL.
+		    1 to:h do:[:hi |
+			srcIndex := srcRow.
+			dstIndex := dstRow.
+
+			1 to:w do:[:wi |
+			    word := tmpData unsignedInt16At:srcIndex MSB:isMSB.
+			    r := (word bitShift:shR) bitAnd:maskR.
+			    g := (word bitShift:shG) bitAnd:maskG.
+			    b := (word bitShift:shB) bitAnd:maskB.
+
+			    inData at:dstIndex   put:(r bitShift:shR2).
+			    inData at:dstIndex+1 put:(g bitShift:shG2).
+			    inData at:dstIndex+2 put:(b bitShift:shB2).
+
+			    srcIndex := srcIndex + 2.
+			    dstIndex := dstIndex + 3.
+			].
+			dstRow := dstRow + bytesPerLine.
+			srcRow := srcRow + bytesPerLineIn
+		    ]
+		] ifFalse:[
+		    ('Image [warning]: unsupported depth combination: ' , bitsPerPixelIn printString , ' -> ' ,
+							bpp printString) errorPrintCR.
+		    self shouldImplement.
+		    ^ nil
+		]
+	    ].
+	] ifFalse:[
+	    "/
+	    "/ repad in the buffer
+	    "/
+	    1 to:h do:[:hi |
+		inData replaceFrom:dstRow to:(dstRow + bytesPerLine - 1)
+			      with:tmpData startingAt:srcRow.
+		dstRow := dstRow + bytesPerLine.
+		srcRow := srcRow + bytesPerLineIn
+	    ]
+	]
     ] ifFalse:[
-        (bytesPerLine * height) ~~ inData size ifTrue:[
-            tmpData := inData.
-            inData := ByteArray uninitializedNew:(bytesPerLine * height).
-            inData replaceFrom:1 to:bytesPerLine * height with:tmpData startingAt:1
-        ]
+	(bytesPerLine * height) ~~ inData size ifTrue:[
+	    tmpData := inData.
+	    inData := ByteArray uninitializedNew:(bytesPerLine * height).
+	    inData replaceFrom:1 to:bytesPerLine * height with:tmpData startingAt:1
+	]
     ].
     self bits:inData.
 
@@ -14728,26 +14736,26 @@
     "/  if not #palette we are done, the pixel values are the rgb/grey values
     "/
     photometric == #palette ifTrue:[
-        "/
-        "/ what we now have are the color numbers - still need the r/g/b values.
-        "/ find out, which colors are in the picture
-        "/
-        usedPixels := inData usedValues.
-        mapSize := usedPixels max + 1.
-
-        "get the palette"
-        map := Array new:mapSize.
-        usedPixels do:[:colorIndex |
-            |i|
-
-            i := colorIndex + 1.
-            device 
-                getRGBFrom:colorIndex 
-                into:[:r :g :b |
-                    map at:i put:(Color red:r green:g blue:b)
-                ]
-        ].
-        self setColorMap:map.
+	"/
+	"/ what we now have are the color numbers - still need the r/g/b values.
+	"/ find out, which colors are in the picture
+	"/
+	usedPixels := inData usedValues.
+	mapSize := usedPixels max + 1.
+
+	"get the palette"
+	map := Array new:mapSize.
+	usedPixels do:[:colorIndex |
+	    |i|
+
+	    i := colorIndex + 1.
+	    device
+		getRGBFrom:colorIndex
+		into:[:r :g :b |
+		    map at:i put:(Color red:r green:g blue:b)
+		]
+	].
+	self setColorMap:map.
     ].
 
     "Modified: / 9.1.1998 / 21:32:36 / stefan"
@@ -14801,8 +14809,8 @@
      (especially True- and DirectColor may be wrong).
      Late note: 24bit rgb now also works.
      WARNING: with doGrab true, this temporarily grabs the display
-              and it may not work from within a buttonMotion
-              (use with a false grabArg then)."
+	      and it may not work from within a buttonMotion
+	      (use with a false grabArg then)."
 
     |curs rootView prevGrab|
 
@@ -14821,22 +14829,22 @@
     "
     rootView := aDevice rootView.
     doGrab ifTrue:[
-        prevGrab := aDevice activePointerGrab.
-        aDevice grabPointerInView:rootView withCursor:curs.
+	prevGrab := aDevice activePointerGrab.
+	aDevice grabPointerInView:rootView withCursor:curs.
     ].
 
     "
      get the pixels
     "
     [
-        self from:rootView in:aRectangle.
+	self from:rootView in:aRectangle.
     ] ensure:[
-        doGrab ifTrue:[
-            aDevice ungrabPointer.
-            prevGrab notNil ifTrue:[
-                 aDevice grabPointerInView:prevGrab.
-            ]
-        ]
+	doGrab ifTrue:[
+	    aDevice ungrabPointer.
+	    prevGrab notNil ifTrue:[
+		 aDevice grabPointerInView:prevGrab.
+	    ]
+	]
     ]
 
     "
--- a/ImageReader.st	Wed Jun 01 07:00:26 2016 +0200
+++ b/ImageReader.st	Fri Jun 03 11:57:48 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
 	      All Rights Reserved
@@ -16,7 +18,8 @@
 Object subclass:#ImageReader
 	instanceVariableNames:'width height data byteOrder inStream outStream photometric
 		samplesPerPixel bitsPerSample colorMap mask maskPixel
-		dimensionCallBack dimensionHolder progressHolder imageSequence'
+		dimensionCallBack dimensionHolder progressHolder imageSequence
+		metaData'
 	classVariableNames:'ReverseBits'
 	poolDictionaries:''
 	category:'Graphics-Images-Readers'
@@ -1843,24 +1846,27 @@
 
     depth := self bitsPerPixel.
     (depth notNil and:[data notNil]) ifTrue:[
-	image := Image newForDepth:depth.
-	image depth:depth.
-	inStream isFileStream ifTrue:[
-	    image fileName:inStream pathName.
-	].
-	image
-	    width:width
-	    height:height
-	    photometric:photometric
-	    samplesPerPixel:samplesPerPixel
-	    bitsPerSample:bitsPerSample
-	    colorMap:colorMap
-	    bits:data
-	    mask:mask.
+        image := Image newForDepth:depth.
+        image depth:depth.
+        inStream isFileStream ifTrue:[
+            image fileName:inStream pathName.
+        ].
+        image
+            width:width
+            height:height
+            photometric:photometric
+            samplesPerPixel:samplesPerPixel
+            bitsPerSample:bitsPerSample
+            colorMap:colorMap
+            bits:data
+            mask:mask.
 
-	imageSequence notNil ifTrue:[
-	    image imageSequence:imageSequence.
-	].
+        imageSequence notNil ifTrue:[
+            image imageSequence:imageSequence.
+        ].
+        (metaData notNil and:[metaData notEmpty]) ifTrue:[
+            image metaData:metaData
+        ].    
     ].
     ^ image
 
@@ -2195,3 +2201,4 @@
 version_CVS
     ^ '$Header$'
 ! !
+
--- a/WindowSensor.st	Wed Jun 01 07:00:26 2016 +0200
+++ b/WindowSensor.st	Fri Jun 03 11:57:48 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
               All Rights Reserved
@@ -305,6 +307,10 @@
         ($- $: 16rF7)      "/ divide           
         ($: $- 16rF7)      "/ divide           
         ($x $x 16rD7)      "/ multiply           
+        ($, $" 16r201E)    "/ german opening quote
+        ($< $" 16r201C)    "/ german closing quote
+"/        ($- $- $. 16r2013) "/ slightly longer dash (double length) 
+"/        ($- $- $- 16r2013) "/ longer dash (fourfold length) 
 
         "/ diacriticals: Compose diacrit character
         "/ grave