New answers tagged


Here's another option using Rasterize. SeedRandom[1234]; img = Binarize[ Blur[ListDensityPlot[randomTiles, InterpolationOrder -> 0, Frame -> False, PlotRangePadding -> 0, ImageSize -> {1600, 1600}], 40]]; rimg = Rasterize[img, RasterSize -> 400, ImageSize -> 400] ImageDimensions[rimg]


Use ColorFunction -> Graylevel in ListDensityPlot to start from a black and white image, avoiding Binarize altogether. ask for a much higher number of pixels in your image with ImageSize; that alone causes considerable smoothing when you downsize the image; for further effect, apply e.g. MedianFilter with an appropriate parameter. SeedRandom[1234] ...


According to the documentation the correct option to set the coarseness of the rasterization is RasterSize, whereas ImageSize only controls the size at which the image is displayed. I'm not sure why I was using ImageSize previously, possibly RasterSize did not behave as advertised in an earlier version, or perhaps I didn't read the documentation carefully ...

Top 50 recent answers are included