RandomGradientGenerator randGradientGen = RandomGradientGeneratorList.getRandomGradientGeneratorInstance(pGradientGeneratorname, true);
for (int i = 0; i < maxCount; i++) {
int palettePoints = 7 + (int) (Math.random() * 24.0);
boolean fadePaletteColors = Math.random() > 0.06;
RandomFlameGeneratorSampler sampler = new RandomFlameGeneratorSampler(IMG_WIDTH / 2, IMG_HEIGHT / 2, prefs, randGen, randSymmGen, randGradientGen, palettePoints, fadePaletteColors, pQuality);
RandomFlameGeneratorSample sample = sampler.createSample();
FlameThumbnail thumbnail;
thumbnail = new FlameThumbnail(sample.getFlame(), null);
SimpleImage img = thumbnail.getPreview(3 * prefs.getTinaRenderPreviewQuality() / 4);
if (prefs.getTinaRandomBatchRefreshType() == RandomBatchRefreshType.INSERT) {
randomBatch.add(0, thumbnail);
imgList.add(0, img);
}