I want to overlay a PNG/TIF image over a JPG image, I am able to achieve this using standard java library, but the resulting image(JPG) that is formed in low on quality. Can I achieve image overlaying using javafx, the resulting image with same quality as that of the original background ?
I tried something similar, create a scene and store it as an image. See my blog post.
Instead of the components I used, you could use an ImageView with your first image and another one with your second on top.
Your problem does not seem to be a JavaFX (or Swing) issue.
You need to look in the ImageIO documentation to see how you can specify the quality as a parameter when saving an image as a JPEG file.
You are probably getting a degraded result because you just use ImageIO.write to create a JPEG with default settings.