Invert Black/White Colors of Binary Images
- To: mathgroup at smc.vnet.net
- Subject: [mg84163] Invert Black/White Colors of Binary Images
- From: Tara.Ann.Lorenz at gmail.com
- Date: Wed, 12 Dec 2007 01:19:13 -0500 (EST)
Hi, I am using the following code to create black and white images with 5% black pixels and 95% white pixels: blackcolor = Table[1, {45}]; whitecolor = Table[0, {855}]; arrayvalues = Join[blackcolor, whitecolor]; randompermutation := RandomSample[Range[1, 900]]; image := Partition[arrayvalues[[randompermutation]], 30]; t1 = Graphics[Raster[image]] How can I invert the coloring to have 5% white and 95% black?? Thank you, Tara