Official Soldat Forums

Soldat Fans => Fan Apps => Topic started by: Toumaz on July 17, 2009, 06:52:09 pm

Title: Soldat Screenshot Converter
Post by: Toumaz on July 17, 2009, 06:52:09 pm
Soldat Screenshot Converter is a tool that automatically converts any screenshots taken during your game session to PNG/JPG format, followed by deleting the BMP files that are made superfluous.

What might distinguish this application from many other generic batch converters is that it is fully automatic and non-obtrusive; as soon as you've exited your game SSC will get to work with converting your screenies. It'll save you the time and bother of manually converting them and immediately making sure there's no overly hefty BMP files nomming up all your disk space (users who automatically take a screenshot of the end-game score will know exactly what I'm talking about).

The download is attached to this post; scroll down!

Kudos to Deathdancer aka Dancing Walrus for inspiring me to code this. Cheers to Caphriel, Cory and Geoffrey for testing.



SSC v1.1 2009-07-18

SSC v1.0 2009-07-18



Installation Instructions
While the application itself will give you a lot of helpful nudges along the way in case you'd do something wrong, here goes:




Before you'll ask "hold up wtf wtf why do I need to rename my soldat executable" - let me explain how this works a bit more in-depth.

Pretty much all SSC does is to spawn the Soldat process and then check the Screens folder for newly created files. In order to have SSC run every time you start Soldat, the easiest way to integrate this with start menu shortcuts/clickers/etc. is to simply have SSC act as the game itself.

SSC will pass any arguments on to the actual game.exe - in other words, mods and clickers will still continue to work with no problems whatsoever - and then simply convert any newly created screenshots as soon as Soldat is shut down.

So the entire renaming process is simply in order to streamline the integration with Soldat, and make sure that SSC will run whenever you really intended to start Soldat directly. Oh, and it comes pre-equipped with icons with proper alpha transparency, too, and not the dirty paintjob Michal did around the time 1.4 was released!

Sadly, SSC will require you to run it as an administrator (http://jacks-clan.com/images/vista-admin.gif) since it needs to do some registry edits in order to maintain the soldat:// URL handler which Soldat will otherwise re-create pointing to game.exe.

Oh, and you'll need the .NET framework, too. Don't have it installed nor do you want to install it? Don't download this application.



Anyhow, enough blabbering!
Here's a series of screenshots to show how this actually works in action:

(http://your-images.org/pics/526994c8e27874f32774b7fa230f9739.png)
Upon startup, SSC will start Soldat and then snugly position itself next to it in the tray, and you really don't need to care about it. However, if you're Curious George, double clicking it will yield...

(http://your-images.org/pics/ff91753ac0e0b9c268212dd40befb52b.png)
...this. Nothing fancy; merely gives you a few instructions on how it works in case you need that little extra push along the road.

(http://your-images.org/pics/f0259edf8ed6ac3d70ca999614b45635.png)
SSC will detect screenshots and list the number of screens it'll process once you quit Soldat.

(http://your-images.org/pics/e7ca276f0215326d4489a97d9726b2a3.png)
And as soon as you Soldat is exited, that's exactly what it'll get to work with! Again, SSC is non-obtrusive; you'll only see this dialog if you've explicitly asked the window to appear by double-clicking the tray icon.

(http://your-images.org/pics/7a9a520165e3972856f30a99ecc23ca0.png)
And as soon as it's all done with its dirty work, it'll inform you that all screenshots have been converted, and wish you a happy life.



Download down below!
Title: Re: Soldat Screenshot Converter
Post by: Geoffrey on July 17, 2009, 07:06:39 pm
A pleasure to use.
Title: Re: Soldat Screenshot Converter
Post by: DarkCrusade on July 17, 2009, 07:13:52 pm
Would be cool now if the program would automatically do screenshots of the endscores. It is cool, though :)
Title: Re: Soldat Screenshot Converter
Post by: Biggles on July 17, 2009, 07:24:02 pm
Amazing! this saves me lots of time :) thanks alot!
Title: Re: Soldat Screenshot Converter
Post by: DorkeyDear on July 17, 2009, 10:54:31 pm
I love the way you worded it :D
Also great idea for those who hate all that extra memory being used, but still want them screenies.
Title: Re: Soldat Screenshot Converter
Post by: jrgp on July 17, 2009, 11:29:23 pm
Cool work. Added to Fan Apps list.
Title: Re: Soldat Screenshot Converter
Post by: xmRipper on July 17, 2009, 11:52:06 pm
Awesome idea. Love you :P
Title: Re: Soldat Screenshot Converter
Post by: n2j3 on July 18, 2009, 04:21:16 am
Great stuff as usual Toumaz.

Would be cool now if the program would automatically do screenshots of the endscores. It is cool, though :)
Can't you enable that option in soldat's config?
Title: Re: Soldat Screenshot Converter
Post by: Toumaz on July 18, 2009, 05:19:30 am
Would be cool now if the program would automatically do screenshots of the endscores. It is cool, though :)
Um. As n2j3 already said, End_Screenshot=1 in Soldat.ini. SSC will convert those, too.
Title: Re: Soldat Screenshot Converter
Post by: Mr.Spoon on July 18, 2009, 05:30:04 am
There's also "Automatically take screenshots of final game score" in the setup... which i thought was well known by now, eh?
If you don't see it, it is under the "more"-tab.

Okay, maybe that's just what n2j3 meant... damn.
Title: Re: Soldat Screenshot Converter
Post by: Toumaz on July 18, 2009, 08:07:04 am
SSC v1.1 has been released, dealing with a rather major bug in v1.0 as well as adding some functionality.
Title: Re: Soldat Screenshot Converter
Post by: ~Niko~ on July 18, 2009, 08:44:12 am
You could also use "Convert all BMP's to PNG's" button. Because I have around 350 BMP screenies that I'd like to convert to PNG :P

Though this is awesome! From 900kb to an avarage of 250kb. Amazing!
Title: Re: Soldat Screenshot Converter
Post by: Toumaz on July 18, 2009, 08:48:17 am
You could also use "Convert all BMP's to PNG's" button. Because I have around 350 BMP screenies that I'd like to convert to PNG :P
Right click the tray icon, Queue old BMP:s.
Title: Re: Soldat Screenshot Converter
Post by: ~Niko~ on July 18, 2009, 09:46:02 am
You could also use "Convert all BMP's to PNG's" button. Because I have around 350 BMP screenies that I'd like to convert to PNG :P
Right click the tray icon, Queue old BMP:s.
300MB to 100MB, awesome! :P
Title: Re: Soldat Screenshot Converter
Post by: homerofgods on July 18, 2009, 11:56:46 am
Oyeah, using it allready
Title: Re: Soldat Screenshot Converter
Post by: Toumaz on July 18, 2009, 02:00:45 pm
Since I'm sorta stupid and accidentally left some debug code in there, download the latest version zip again.
Title: Re: Soldat Screenshot Converter
Post by: ~Niko~ on July 18, 2009, 06:35:34 pm
Since I'm sorta stupid and accidentally left some debug code in there, download the latest version zip again.
I'm noob here. What's that debug code, and why is it removed?
Title: Re: Soldat Screenshot Converter
Post by: Toumaz on July 18, 2009, 07:12:12 pm
Since I'm sorta stupid and accidentally left some debug code in there, download the latest version zip again.
I'm noob here. What's that debug code, and why is it removed?
I accidentally left in a message box containing some path information popping up upon startup. :P
Title: Re: Soldat Screenshot Converter
Post by: scarface09 on July 20, 2009, 05:19:37 pm
Cool!
Title: Re: Soldat Screenshot Converter
Post by: MetsuriTossavainen on July 21, 2009, 10:55:34 am
Oh yea!
Title: Re: Soldat Screenshot Converter
Post by: w0hl on July 25, 2009, 04:22:34 am
like it! <3  :o
Title: Re: Soldat Screenshot Converter
Post by: Shard on July 28, 2009, 09:06:28 am
Im running soldat mod launcher to run soldat every time(I has a mod I love but I want to keep soldat the same, like not overwrite original files). So the fact you have to rename the .exe's, might be a problem for me, but I would love to have this program. Help plz
Title: Re: Soldat Screenshot Converter
Post by: Toumaz on July 28, 2009, 09:08:31 am
Im running soldat mod launcher to run soldat every time(I has a mod I love but I want to keep soldat the same, like not overwrite original files). So the fact you have to rename the .exe's, might be a problem for me, but I would love to have this program. Help plz

Please read the main post a bit more carefully.

Quote
SSC will pass any arguments on to the actual game.exe - in other words, mods and clickers will still continue to work with no problems whatsoever - and then simply convert any newly created screenshots as soon as Soldat is shut down.
Title: Re: Soldat Screenshot Converter
Post by: rayanaga on August 03, 2009, 07:14:00 pm
Nice job Toumaz. :D
This will totally save me from manually converting those screenshots and save me some time to do other....stuff. ^^
Title: Re: Soldat Screenshot Converter
Post by: enchant on August 15, 2009, 02:34:18 am
some files are missing :(
i have got only the last game's screen shot.
but i played a lot of games...
Title: Re: Soldat Screenshot Converter
Post by: Toumaz on August 15, 2009, 03:33:56 am
some files are missing :(
i have got only the last game's screen shot.
but i played a lot of games...
Indeed; there's a bug in there somewhere that I haven't gotten around to fixing just yet. I'd recommend not using it until that's fixed; which will probably never happen. :P
Title: Re: Soldat Screenshot Converter
Post by: Illuminatus on August 25, 2009, 01:39:45 pm
Indeed; there's a bug in there somewhere that I haven't gotten around to fixing just yet. I'd recommend not using it until that's fixed; which will probably never happen. :P
So what now? Sometimes screens aren't converted but deleted?
Aww...I wanna use this tool - pls fix it!

PS: You think it's too risky to just give it a try on my 1187 screens (2,62 GB) ?
Worked quite well.
First tried 1 screen - null problemo. (PNG looks exactly the same as BMP, JPG sucks)
How about 10? - great.
Now 100 - superb.
200 - et voila.
400 - hm... it says 400 converted...but I think one is missing because in total they're only 710...
OK, 300 - yeah, works again.
The rest, 176 - done!

result:
1186 of 1187 converted (never mind the missing one - maybe me made some counting mistake)
Before: 2,62 GB
After: 686 MB

I love u, Toumaz  :-*
Title: Re: Soldat Screenshot Converter
Post by: Toumaz on August 25, 2009, 02:54:22 pm
So what now? Sometimes screens aren't converted but deleted?
Correct, and for the time being, I'm all too lazy to try and track it down. People have said their automatic endgame screens aren't converted but instead deleted, which is kinda ... very bad.
Title: Re: Soldat Screenshot Converter
Post by: Shard on October 15, 2009, 11:54:33 am
OK, I have about 5 gbs of screens. Under half of them are endgame. Are you 100% sure the endagme ones will be delted and not converted?
Title: Re: Soldat Screenshot Converter
Post by: Toumaz on October 15, 2009, 01:00:16 pm
Nope! I can't really figure out what I might be doing wrong in the code, either, come the entire missing screenshot issue, so try stuff at your own risk, pretty much. The program might blow up your PC, too.
Title: Re: Soldat Screenshot Converter
Post by: jrgp on October 15, 2009, 03:00:16 pm
Nope! I can't really figure out what I might be doing wrong in the code, either, come the entire missing screenshot issue, so try stuff at your own risk, pretty much. The program might blow up your PC, too.

Maybe release the code since there are a bunch of people here who're quite comfortable with .NET and'll figure it out pretty quickly?
Title: Re: Soldat Screenshot Converter
Post by: Vv00t-SN on November 04, 2010, 02:28:04 pm
bug report:
The tool overwrites existing screenshots of the same name.

steps to reproduce:

1. existing screenshots in the screens dir at launch:
screenshot-10-11-04-01.png

2. Launch game, hit f4 to take screenshot:
Now we have
screenshot-10-11-04-01.png
screenshot-10-11-04-01.bmp
next to one another

3. Exit game
screenshot-10-11-04-01.bmp gets converted to screenshot-10-11-04-01.png, overwriting the original .png file.
Title: Re: Soldat Screenshot Converter
Post by: Toumaz on November 04, 2010, 03:36:16 pm
I'll have a look at it and post the source for whoever is desperate enough to wanna try to poke at it when I visit home in a week or two.
Title: Re: Soldat Screenshot Converter
Post by: machina on November 04, 2010, 05:04:44 pm
BMP is not so bad, so do we rly need it...?
Title: Re: Soldat Screenshot Converter
Post by: Illuminatus on November 04, 2010, 07:37:28 pm
It's not about BMP being bad. It's about BMP being BIG. So why having a big file if you can have a (much) smaller file which has almost no viewing differences?

My "Screens"-folder is at the moment....wow, fuck :o...3,51GB with 1597 BMP's. I definitely need to get rid of most of them and convert the "important" ones.
See, and once again we have one example why "we rly need it". :)
Title: Re: Soldat Screenshot Converter
Post by: machina on November 06, 2010, 04:38:09 am
It's not about BMP being bad. It's about BMP being BIG. So why having a big file if you can have a (much) smaller file which has almost no viewing differences?

My "Screens"-folder is at the moment....wow, f**k :o...3,51GB with 1597 BMP's. I definitely need to get rid of most of them and convert the "important" ones.
See, and once again we have one example why "we rly need it". :)
Ok, forget about it... Btw. they should add this addon into official version of Soldat... ;]
Title: Re: Soldat Screenshot Converter
Post by: Vv00t-SN on November 16, 2010, 12:57:59 pm
I'll have a look at it and post the source for whoever is desperate enough to wanna try to poke at it when I visit home in a week or two.
Id appreciate if someone could indeed fix it, since there is - afaik - no alternative that works the same way (i.e. automatically) ;)
Title: Re: Soldat Screenshot Converter
Post by: VirtualTT on November 16, 2010, 03:49:05 pm
There are so many batch image converters allowing you to convert whole image folder with just a few clicks...
I'm mostly using Fast stone image viewer (http://www.faststone.org/FSViewerDetail.htm)...
Title: Re: Soldat Screenshot Converter
Post by: Vv00t-SN on November 25, 2010, 12:50:45 pm
There are so many batch image converters allowing you to convert whole image folder with just a few clicks...
I'm mostly using Fast stone image viewer (http://www.faststone.org/FSViewerDetail.htm)...

Yes, and that is different from the way Toumaz' converter works!