Commits

Anonymous committed 1a7f6ff

tostring works with colorkey

  • Participants
  • Parent commits 2e27104

Comments (0)

Files changed (2)

 # BUG	= fixed a bug that was (or could have been) crashing
 
 November 12, 2001
-	image.tostring() now works with alpha/colorkey
+	image.tostring() "RGBA" works with colorkey
 
 November 3, 2001
         filled shape drawing now clips properly [BUG]
 					data[0] = (char)surf->format->palette->colors[color].r;
 					data[1] = (char)surf->format->palette->colors[color].g;
 					data[2] = (char)surf->format->palette->colors[color].b;
-					data[3] = hascolorkey ? (char)(color==colorkey)*255 : (char)255;
+					data[3] = hascolorkey ? (char)(color!=colorkey)*255 : (char)255;
 					data += 4;
 				}
 			}break;
 					data[0] = (char)(((color & Rmask) >> Rshift) << Rloss);
 					data[1] = (char)(((color & Gmask) >> Gshift) << Gloss);
 					data[2] = (char)(((color & Bmask) >> Bshift) << Bloss);
-					data[3] = hascolorkey ? (char)(color==colorkey)*255 : 
+					data[3] = hascolorkey ? (char)(color!=colorkey)*255 : 
 								(char)(Amask ? (((color & Amask) >> Ashift) << Aloss) : 255);
 					data += 4;
 				}
 					data[0] = (char)(((color & Rmask) >> Rshift) << Rloss);
 					data[1] = (char)(((color & Gmask) >> Gshift) << Gloss);
 					data[2] = (char)(((color & Bmask) >> Bshift) << Bloss);
-					data[3] = hascolorkey ? (char)(color==colorkey)*255 :
+					data[3] = hascolorkey ? (char)(color!=colorkey)*255 :
 								(char)(Amask ? (((color & Amask) >> Ashift) << Aloss) : 255);
 					data += 4;
 				}
 					data[0] = (char)(((color & Rmask) >> Rshift) << Rloss);
 					data[1] = (char)(((color & Gmask) >> Gshift) << Rloss);
 					data[2] = (char)(((color & Bmask) >> Bshift) << Rloss);
-					data[3] = hascolorkey ? (char)(color==colorkey)*255 :
+					data[3] = hascolorkey ? (char)(color!=colorkey)*255 :
 								(char)(Amask ? (((color & Amask) >> Ashift) << Rloss) : 255);
 					data += 4;
 				}