Hi,
I just get a small CQ5 project of resizing the smartImage. Right now, I have two options.
One
Node jcrContent = currentNode.getNode("image/jcr:content"); String imagePath = jcrContent.getPath(); Resource imageRes = resourceResolver.getResource(imagePath); Image img = new Image(imageRes); img.setItemName(Image.NN_FILE, "image"); img.setSrc(img.getPath()); img.setSelector("img");
Once it is done, i will just use <image src="<%= img.getSrc() %>" width="35%" heigh="35%" /> to display a easy resized picture.
Option Two, extend the AbstractImageServlet to do a real resizing work.(This I havn't done yet).
My question is do these two approaches achive the same image quanlity?
Thank you