Friday, February 19, 2010

Auto Save in Paint

[Update Start - 19-Feb-10]
  • It also supports drag and drop feature. Drop folders with images or just drop JPEG images on the list (named "Select") area, and they are queued for processing. Note - the list will be added with the data you are dropping subject to the option that you have selected (Folders or Files).
  • Sorry, but I missed out this - if your images are huge, and by that I mean, like 30 MB+ (an estimated figure), then obviously Paint will take long time to load the image. The time taken by Paint to load an image also depends on how much RAM your PC has and what is the speed of your processor. More RAM and faster processor will probably help in loading the images quickly.
  • The thing is, if it takes more than 30 secs to load an image in Paint, AutoSavePaint will ask you if wish to kill it. If you say yes, then it will move on to the next image in the list. Idea is that if an image takes that long, probably your PC is not fast enough or you have insufficient RAM. =D
  • Updated to v1.1 - Download link
[Update End]

I am very much into photography. But with digital images you have a problem - high resolution images take lot of space. Unless you want to ruin them, you do not modify them by reducing their size or content quality.

These images, if JPEG format, are mostly uncompressed (or poorly compressed) by the cameras. This is the reason why each one of them can be so huge in file size. If you are professional photographer, you must be already having hard disks of many tera-bytes of space to keep these pictures.

I accidently found out that 'Paint' application (on Windows platform, which supports JPEGs(!)) is the cheapest way to compress these images. Yes, I know that there are hundreds of applications which do so much better. But consider these facts -
1. MS Paint is light weight.
2. It doesn't lose the quality of JPEG fed to it (unless you are converting an image from another format).
3. The file size reduction is between 20% to 80% (as observed).

I have already recovered gigabytes of space from my previously saved images using Paint.

Now ask the question:
What is the problem then?

Answer: You have to open each file in Paint and save them individually. Paint doesn't open multiple images. And, opening multiple Paint instances can take up lot of memory. This is a big pain!

Till now. :)

I created a tiny application, 'Auto Save in Paint' (AutoSavePaint) which automates the above procedure. So, you feed it a list of JPEG images or a folder in which you might have thousands of JPEG images. Then, ask it to process them. The application will open each image in MS Paint, save it, and then close that image. This will go on till all the images have been processed.

You might say that you already have seen some tools which can process multiple files. To this I would say that they are mostly not free, shareware, ad-ware, eat up loads of memory themselves while loading, or are command line based. Even then, (so far) I have not seen any tool which compresses the JPEGs better than MS Paint - in simplest way. Sure, you can tweak the options in tools like GIMP and Photoshop to give you smallest file size output, but try doing that to 2000 pictures :)

Yes, if you are geek enough, you would be running some scripts or command line programs which can take care of automating the tasks. But, unfortunately, not everyone can deploy such solution easily.

Benefits of AutoSavePaint -
1. Small memory footprint (in layman's terms, very small in size)
2. Loads up quickly
3. Uses third party tool to do the dirty work (MS Paint in this case). Hence, lesser chances of introducing its own bugs =D
4. Automatically detects errors if Paint could not open any image. It happens too :-/ (blame Microsoft)
6. Provides report of what has been done.

Steps to use -
1. Start it.
2. Provide it folder(s) where JPEG images are kept, or give it list of files individually.
3. Press start button and sit back. Use stop button if you want to interrupt the process.

Points to note -
Do not use your PC while AutoSavePaint is working =D or you will see weird things happening.
Since MS Paint doesn't provide any convenient way to automate, I have used some programming tactics to achieve the result. Best time to use this utility will be when you are going to sleep or are stepping away from your PC for a while. Let it work on its own.

Cons or dependencies -
1. It needs .NET 2.0 framework. Most of the Windows OS these days already have it. If you do not have it (?!!) then you can download it from MS's website. Here is the link.
2. It works only on Windows OS.
3. Uses MS Paint. If you have uninstalled MS Paint by any chance (?!!) then you can not use this tool.

Please try it if you like, and do provide feedback :)
The link is http://www.datafilehost.com/download-d1ad5e29.html (look in the updates). The file name is AutoSavePaint.zip and its password is "Paint" (without quotes).


PS - Its in early phase, so please bear with me if you find any bug :) Send those bug details to me along with a little description of what happened exactly.

4 comments:

  1. hey, i came across this post, can you share your code ?
    I've been trying to do the same thing in .Net.

    thanks in advance,
    kauti

    ReplyDelete
  2. Hello! Please wait for the latest release coming up (v1.7). I'll be sharing the code with that release.

    Thanks!

    ReplyDelete
  3. this is a very good program, however is there a way that I can control the level of decreasing the filesize? I hope you can add-up custom resize from 20% to 80%. Thanks a lot.

    Two thumbs!

    ReplyDelete
  4. Hi anonymous! Unfortunately, the custom size option cannot be provided as the compression algorithm is in the external program, which is paint in this case, and not in my application. Thanks for the support :)

    ReplyDelete

Talk to me :)