'Java converting image (.jpg, .png) to file (WEBCAM CAPTURED)

How can I achieve this one? I wanted to convert image into file example code is here.

Image image = webcam.getImage().getScaledInstance(image_label.getWidth(), image_label.getHeight(), Image.SCALE_SMOOTH);

I wanted to make it like

file = image;

so that I can write the image into file and store in a particular folder. thank you everyone!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source