int placedHeight = 0;
//Loop again but this time, lets do the copy and paste
for(int i=0;i<srcs.length;i++){
img = images[i];
spriteImage.paste(img,1,placedHeight);
css += "#"+ids[i]+" {\n\tbackground: url("+baseRenderedFileName+"."+ResourceUtil.getExtension(strSrcs[i],"")+") 0px -"+placedHeight+"px no-repeat; width:"+img.getWidth()+"px; height:"+img.getHeight()+"px;\n} \n";
placedHeight += img.getHeight();
}