diff --git a/src/modules/Image/encodings/pnm.c b/src/modules/Image/encodings/pnm.c
index cd8171584746991243f5e9057ee824c1ebb5e81a..412a0a98e4a86455185dddf67d8077e53951fa92 100644
--- a/src/modules/Image/encodings/pnm.c
+++ b/src/modules/Image/encodings/pnm.c
@@ -1,9 +1,9 @@
-/* $Id: pnm.c,v 1.5 1997/11/29 21:33:36 grubba Exp $ */
+/* $Id: pnm.c,v 1.6 1998/01/06 21:39:30 mirar Exp $ */
 
 /*
 **! module Image
 **! note
-**!	$Id: pnm.c,v 1.5 1997/11/29 21:33:36 grubba Exp $
+**!	$Id: pnm.c,v 1.6 1998/01/06 21:39:30 mirar Exp $
 **! submodule PNM
 **!
 **!	This submodule keeps the PNM encode/decode capabilities
@@ -49,7 +49,7 @@
 
 #include "stralloc.h"
 #include "global.h"
-RCSID("$Id: pnm.c,v 1.5 1997/11/29 21:33:36 grubba Exp $");
+RCSID("$Id: pnm.c,v 1.6 1998/01/06 21:39:30 mirar Exp $");
 #include "pike_macros.h"
 #include "object.h"
 #include "constants.h"
@@ -275,10 +275,10 @@ void img_pnm_encode_P6(INT32 args)
 				  img->xsize*img->ysize*3);
    else
    {
-      char *c;
+      unsigned char *c;
       int n=img->xsize*img->ysize;
       rgb_group *s=img->img;
-      b=begin_shared_string(n*3);
+      c=(unsigned char*)(b=begin_shared_string(n*3));
       while (n--)
       {
 	 *(c++)=s->r;
diff --git a/src/modules/Image/image.h b/src/modules/Image/image.h
index 2abc64c24dd393b32dcf37f77280238ec5573598..2aaa53f6e76eeb5b4a9352d5cfdbab7ad39f8463 100644
--- a/src/modules/Image/image.h
+++ b/src/modules/Image/image.h
@@ -1,7 +1,7 @@
 /*
 **! module Image
 **! note
-**!	$Id: image.h,v 1.15 1997/11/23 05:28:29 per Exp $
+**!	$Id: image.h,v 1.16 1998/01/06 21:39:28 mirar Exp $
 */
 
 #ifdef PIKE_IMAGE_IMAGE_H
@@ -15,18 +15,19 @@
 
 #define QUANT_SELECT_CACHE 6
 
-#define COLOURTYPE unsigned char
+#define COLORTYPE unsigned char
 
 #define FS_SCALE 1024
 
 typedef struct 
 {
-   COLOURTYPE r,g,b;
+   COLORTYPE r,g,b;
+   COLORTYPE __padding_dont_use__;
 } rgb_group;
 
 typedef struct 
 {
-   unsigned char r,g,b,alpha;
+   COLORTYPE r,g,b,alpha;
 } rgba_group;
 
 typedef struct
diff --git a/src/modules/Image/matrix.c b/src/modules/Image/matrix.c
index ebf63c68f159b7ce3387a42126b326e73932dbc6..611487c89e41ce811a50b0ddd2aeeb84c239f68c 100644
--- a/src/modules/Image/matrix.c
+++ b/src/modules/Image/matrix.c
@@ -1,9 +1,9 @@
-/* $Id: matrix.c,v 1.11 1997/12/22 23:26:47 hubbe Exp $ */
+/* $Id: matrix.c,v 1.12 1998/01/06 21:39:29 mirar Exp $ */
 
 /*
 **! module Image
 **! note
-**!	$Id: matrix.c,v 1.11 1997/12/22 23:26:47 hubbe Exp $
+**!	$Id: matrix.c,v 1.12 1998/01/06 21:39:29 mirar Exp $
 **! class image
 */
 
@@ -245,17 +245,17 @@ void img_scale2(struct image *dest, struct image *source)
    dest->ysize=newy;
    for (y = 0; y < newy; y++)
      for (x = 0; x < newx; x++) {
-       pixel(dest,x,y).r = (COLOURTYPE)
+       pixel(dest,x,y).r = (COLORTYPE)
 	                    (((INT32) pixel(source,2*x+0,2*y+0).r+
 			      (INT32) pixel(source,2*x+1,2*y+0).r+
 			      (INT32) pixel(source,2*x+0,2*y+1).r+
 			      (INT32) pixel(source,2*x+1,2*y+1).r) >> 2);
-       pixel(dest,x,y).g = (COLOURTYPE)
+       pixel(dest,x,y).g = (COLORTYPE)
 	                    (((INT32) pixel(source,2*x+0,2*y+0).g+
 			      (INT32) pixel(source,2*x+1,2*y+0).g+
 			      (INT32) pixel(source,2*x+0,2*y+1).g+
 			      (INT32) pixel(source,2*x+1,2*y+1).g) >> 2);
-       pixel(dest,x,y).b = (COLOURTYPE)
+       pixel(dest,x,y).b = (COLORTYPE)
 	                    (((INT32) pixel(source,2*x+0,2*y+0).b+
 			      (INT32) pixel(source,2*x+1,2*y+0).b+
 			      (INT32) pixel(source,2*x+0,2*y+1).b+
diff --git a/src/modules/Image/polyfill.c b/src/modules/Image/polyfill.c
index 91322338399abaabf3206f5c8bda719c885b00a8..a79d890e66a910fdbea4b2f2d3fcd490025cb922 100644
--- a/src/modules/Image/polyfill.c
+++ b/src/modules/Image/polyfill.c
@@ -1,5 +1,5 @@
 #include "global.h"
-RCSID("$Id: polyfill.c,v 1.16 1997/12/22 23:26:50 hubbe Exp $");
+RCSID("$Id: polyfill.c,v 1.17 1998/01/06 21:39:30 mirar Exp $");
 
 /* Prototypes are needed for these */
 extern double floor(double);
@@ -29,7 +29,7 @@ extern double floor(double);
 /*
 **! module Image
 **! note
-**!	$Id: polyfill.c,v 1.16 1997/12/22 23:26:50 hubbe Exp $
+**!	$Id: polyfill.c,v 1.17 1998/01/06 21:39:30 mirar Exp $
 **! class image
 */
 
@@ -46,8 +46,11 @@ extern double floor(double);
 **!	will make a hole.
 **!
 **! note
-**!	Lines in the polygon may not be crossed without
-**!	midpoints.
+**!	Lines in the polygon may <i>not</i> be crossed without
+**!	the crossing coordinate specified in both lines.
+**!
+**! bugs
+**!	Inverted lines reported on Intel and Alpha processors.
 **!
 **! see also: setcolor
 */