final RenderingHints newHints = new RenderingHints(JAI.KEY_TILE_CACHE,scaleTC);
newHints.add(ImageUtilities.DONT_REPLACE_INDEX_COLOR_MODEL);
// using filtered subsample operator to do a subsampling
final ParameterBlockJAI pb = new ParameterBlockJAI("filteredsubsample");
pb.addSource(src);
pb.setParameter("scaleX", new Integer(downsampleStep));
pb.setParameter("scaleY", new Integer(downsampleStep));
pb.setParameter("qsFilterArray", lowPassFilter);
pb.setParameter("Interpolation", new InterpolationNearest());
return JAI.create("filteredsubsample", pb,newHints);