Click here to Skip to main content
Click here to Skip to main content
Go to top

Virtual Screenshot Manager

, 7 Jun 2013
Rate this:
Please Sign up or sign in to vote.
Captures, searches, and manages all your screenshots in one place.

Introduction

Screenshots are an important way to store important information for future reference. This is easy until the time we have a small number of screenshots. But when you have a large number of screenshots, you would probably like to manage them and find a way to search out any of your screenshots by a simple search. Virtual Screenshot Manager makes this possible.

Gallery

Using the Code

We will now discuss the important part of coding . We start with the main functionality, i.e., capturing the full or cropped screen.

Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
Robot robot = new Robot();
BufferedImage img = robot.createScreenCapture(new Rectangle(size));

Here we take a screenshot. The portion for which we take a screenshot will be described by the var
size.

Now when we have made a screenshot, we save it to a predefined location.

File save_path = new File(imgPath+"1.jpg");
ImageIO.write(img, "JPG", save_path);

Now this image will be saved. When you save the next image, you update the counter so that the next one gets saved as 2.jpg.

Next, we open a popup asking to enter information about this screenshot which we may use to search the image later.

We write all screenshot information as below:

FileOutputStream fout = new FileOutputStream("ImageInfo.dat");
ObjectOutputStream oos = new ObjectOutputStream(fout);
al.add(imd);
oos.writeObject(al);
oos.close();

Here, imd is an object which contains information about the cropped image. We write this inside a serialized class which we can later read to either display or search the screenshot.

Now to show images, we use:

list1 = new JLabel(new ImageIcon(Img + ".jpg"));

This will display a new screenshot. Likewise, we may show the remaining screenshots. For my software, I am numbering the screenshots.

For searching, we give a search term and use it to check the dat files.

Points of Interest

I learned how easy it is to learn NetBeans and it can do wonderful things. This is all from my side for now. Please let me have your valuable feedback.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

csanuragjain
Software Developer
India India
I am a Java software developer. I like to make new software which can be really helpful to people. You may get in touch with me at http://www.martcode.com

Comments and Discussions

 
GeneralMy vote of 5 Pinmember Gun Gun Febrianza7-Jun-13 18:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 7 Jun 2013
Article Copyright 2013 by csanuragjain
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid