bufferedimage - How to set or draw multiple small images over a big image in Java? -


i working spring mvc developer. requirement set multiple small images on different positions on big image.

for example have big image , small images. have coordinates , height/width of small images. set these small images on big image on different coordinates. have save image small images on it.

i have tried play buffered image didn't how this. please me , provide simple code if possible.

thank in advance.

    file f = new file(fullpath+"/"+imagehotspot.getimageobject().getfilepath());     bufferedimage buff1 = imageio.read(f);     graphics2d g2d = buff1.creategraphics();     file statusicon = new file(bigstatusicon);     bufferedimage buff2 = imageio.read(statusicon);         g2d.setcomposite(alphacomposite.getinstance(alphacomposite.src_over));         g2d.drawimage(buff2, 10, 10,null);                                          g2d.dispose();     file outputfile = new file(fullpath+"/images/hotspotimages/image.jpg");     imageio.write(buff1, "jpg", outputfile); 


Comments