Author Topic: ScrCnv (automatic screenshot converter)  (Read 13102 times)

0 Members and 1 Guest are viewing this topic.

Offline SyavX

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 337
ScrCnv (automatic screenshot converter)
« on: January 23, 2012, 06:10:03 am »
ScrCnv
Download

ScrCnv ? is a tool for automatic conversion of Soldat screenshots.

Features:
  • "on-the-fly" screenshots conversion, right after they have been taken;
  • force displaying of scoreboard (F1 menu) at the end of the match1;
  • with "Delete" option enabled original screenshot files wouldn't even be written to disk (e.g. to conserve the use of your HDD/SSD);
  • with "SmartDeletion" feature you are able to prevent saving endgame screenshots of unwanted maps and/or map restarts;
  • with "SmartRenaming" feature you are able to structurize your screenshot files/folders in various ways;
  • up to 35% better 24-bit PNG compression level (compared with current Soldat's encoder);
  • 8-bit PNG encoding (with optional dithering);
  • browse most important folders (Soldat, \screns, \demos, \profiles);
  • run any *.exe file (except of Soldat.exe and unins####.exe) via tray menu;
  • close Soldat via tray menu;
  • app's tray menu is integrated with Soldat's tray icon (click RMB to show it);
  • auto-launch with Soldat.
1 ? for now, ForceF1 feature doesn't work when match ends because of points limit in non-team based game modes (DM, PM & RM).









Code: (ScrCnv.ini) [Select]
[General]
; Conversion format:
; 0 - PNG, 1 - JPEG, 2 - JPEG 2000
Format = 0
;
; Encoding quality (for JPEG & JPEG 2000 formats only):
; 0 - worst, 10 - maximum
Quality = 10
;
; Image color depth (for PNG format only):
; 8 - 8-bit, 24 - 24-bit
Depth = 8
;
; Apply dithering (for 8-bit PNG format only):
; 0 - disabled, 1 - enabled
Dithering = 0
;
; Delete original screenshots:
; 0 - disabled, 1 - enabled
Delete = 1
;
; Force displaying of scoreboard (F1 menu) at the end of the match:
; 0 - disabled, 1 - enabled
ForceF1 = 1
;
; Log debug messages into ScrCnv.log file:
; 0 - disabled, 1 - enabled
Debug = 0

[SmartDeletion]
; Delete 'endgame' screenshots following the rules described below:
; 0 - disabled, 1 - enabled
Enabled = 1
;
; Time in seconds within which the 'endgame' screenshots will be automatically deleted.
; So, if you don't want to store 'endgame' screens created while early map restarts
; (e.g. first minute of the game), then set value to '60':
Time = 60
;
; A space-separated list of maps, 'endgame' screenshots of which will be automatically deleted
; (e.g. 'HallOfHeroes Lothic'):
Maps =

[SmartRenaming]
; Rename converted screenshots using file name masks and placeholders listed below:
; 0 - disabled, 1 - enabled
Enabled = 1
;
; Placeholders that could be used in rename masks for different game modes:
; %yyyy   - year   number, 4 digits
; %yy     - year   number, 2 digits
; %mm     - month  number with     leading zeros
; %m      - month  number without  leading zeros
; %dd     - day    number with     leading zeros
; %d      - day    number without  leading zeros
; %hh     - hour   number with     leading zeros
; %h      - hour   number without  leading zeros
; %ii     - minute number with     leading zeros
; %i      - minute number without  leading zeros
; %ss     - second number with     leading zeros
; %s      - second number without  leading zeros
; %mmmm   - month         full     localized name
; %mmm    - month         short    localized name
; %ww     - day of week   full     localized name
; %w      - day of week   short    localized name
;
; %map    - map name (e.g. 'ctf_Ash')
; %type   - screenshot type ('endgame' or 'screenshot')
; %mode   - game mode ('DM', 'PM', 'TM', 'CTF', 'RM', 'INF', 'HTF')
; %score1 - score of Team 1 (CTF, HTF, INF & TM modes only)
; %score2 - score of Team 2 (CTF, HTF, INF & TM modes only)
; %score3 - score of Team 3 (TM mode only)
; %score4 - score of Team 4 (TM mode only)
;
; Tip: Use empty string to prevent files from being saved
DM = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
PM = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
TM = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
CTF = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
RM = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
INF = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type
HTF = %yyyy-%mm-%dd_%hh-%ii-%ss_%map_%type

This tool is not the first try to make an automated screenshots conversion tool for Soldat (take a look at Soldat Screenshot Converter by Toumaz), but it has a list of advantages.

Advantages:
  • doesn't require renaming of Soldat.exe;
  • doesn't require administrator permissions;
  • doesn't require .Net Framework;
  • doesn't overwrite recent screenshots
Install:
  • extract the "IdnDL.dll" file from the attached archive into a Soldat folder.
Uninstall:
  • delete "IdnDL.dll" and "ScrCnv.ini" files from a Soldat folder.
Compatibility:
  • v0.4.1 ? Soldat 1.7.1
  • v0.4 ? Soldat 1.7.0
  • v0.3 ? Soldat 1.6.6
  • v0.2 ? Soldat 1.5.0 - 1.6.2 (tested with 1.5.0, 1.6.0 and 1.6.2 versions)
Changelog:
+ Added feature | - Removed feature | ~ Fixed feature | % Modified feature | * Comment

Version 0.4.1 [build 759] (15 Jul 2016):
+ Added compatibility to work with Soldat 1.7.1

Version 0.4 [build 757] (06 Feb 2016):
+ Added GUI config
+ Added more placeholders for SmartRenaming feature (see ScrCnv.ini)
- Removed Separate feature (could be done with SmartRenaming now)
% Modified SmartRenaming to create folders structure for custom save paths
% Modified interception method of screenshot files creation (should work faster and more stable now)

Version 0.3 [build 378] (02 Mar 2014):
+ Added Separate feature
+ Added ForceF1 feature
+ Added SmartDeletion feature
+ Added SmartRenaming feature
+ Added Browse, Run, Close functions
+ Added intergated tray menu with Soldat's tray icon
* Code has been rewritten. Next changelogs will use this version as their base

Version 0.2 (09 Feb 2012):
+ Added "Rename converted BMPs" option (adds current map name & scores in CTF/HTF/INF modes)
+ Added "Open 'screens' folder" function

Version 0.1 (23 Jan 2012):
* Initial release


This software is provided "AS-IS", without any express or implied warranty.
In no event shall the author be held liable for any damages arising from the use of this software.


« Last Edit: June 14, 2018, 04:47:04 pm by SyavX »

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5007
Re: ScrCnv (automatic screenshot converter)
« Reply #1 on: January 23, 2012, 08:13:23 am »
Features:
  • "on-the-fly" screenshot conversion, right after they have been created;
I'm liking what you've done here, but I have a question. How does the on the fly screenshot detector work? Something similar to inotify on Windows?[/list]
Careful with that axe, Eugene.

Offline SyavX

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 337
Re: ScrCnv (automatic screenshot converter)
« Reply #2 on: January 23, 2012, 08:28:07 am »
It's hard for me to compare a way it works in Linux, but it looks similar:
FindFirstChangeNotification and/or ReadDirectoryChangesW

Offline machina

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1089
  • The world isn't nice. Why should I be...?
Re: ScrCnv (automatic screenshot converter)
« Reply #3 on: January 23, 2012, 02:27:57 pm »
Nice, but didn't Toumaz do the same thing long time ago? Why is that one app better?

Offline Dusty

  • Veteran
  • *****
  • Posts: 1015
Re: ScrCnv (automatic screenshot converter)
« Reply #4 on: January 23, 2012, 03:04:32 pm »
Nice, but didn't Toumaz do the same thing long time ago? Why is that one app better?

 :-\ is this what the community has become?

This tool is not the first try to make an automated screenshots conversion tool for Soldat (take a look at Soldat Screenshot Converter by Toumaz), but it has a list of advantages.

Advantages:
  • no need to rename Soldat.exe;
  • doesn't require administrator permissions;
  • no need of  .Net Framework;
  • recent screenshots lost (overwriting) issue has been bypassed (that's why there are temporary BMPs)

Offline machina

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1089
  • The world isn't nice. Why should I be...?
Re: ScrCnv (automatic screenshot converter)
« Reply #5 on: January 24, 2012, 09:28:23 am »
Okay, fine logo so it's cooler than Toumaz's converter!

Offline Prodigyx

  • Soldier
  • **
  • Posts: 188
    • SoldatX Brasil
Re: ScrCnv (automatic screenshot converter)
« Reply #6 on: January 24, 2012, 10:25:59 am »
Good job, man!

I loved the features and advantages  :)
SoldatX - SX Brasil - www.soldatx.com

Offline Vv00t-SN

  • Camper
  • ***
  • Posts: 374
  • I aim to please!
    • fuck you skoskav & everyone else fucking with my profile all the time.
Re: ScrCnv (automatic screenshot converter)
« Reply #7 on: January 24, 2012, 02:32:23 pm »
Okay, fine logo so it's cooler than Toumaz's converter!

youre pretty much immune to any reading whatsoever, are you then?

either this kid has a lightbulb up his butt, or his colon has a great idea.
Soldat Quote DB: http://qdb.soldatgather.com/

Offline Prodigyx

  • Soldier
  • **
  • Posts: 188
    • SoldatX Brasil
Re: ScrCnv (automatic screenshot converter)
« Reply #8 on: February 01, 2012, 10:01:37 am »
SoldatX - SX Brasil - www.soldatx.com

Offline SyavX

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 337
Re: ScrCnv (automatic screenshot converter)
« Reply #9 on: February 01, 2012, 03:02:00 pm »
I have no idea why this has happened.
1. Is this a single converted file with such black bars or there are others?
2. If there are other corrupted files, were they converted in PNG format too?
3. Could you provide me the original BMP(s)?

Offline SyavX

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 337
Re: ScrCnv (automatic screenshot converter)
« Reply #10 on: February 09, 2012, 03:50:02 pm »
Version 0.2 (09 Feb 2012):
+ Added "Rename converted BMPs" option (adds current map name & scores for CTF/HTF/INF modes)1
+ Added "Open 'screens' folder" function

1 ? works for Soldat 1.6.2 only


See first post for the download link...
« Last Edit: June 14, 2018, 04:47:43 pm by SyavX »

Online Thomas

  • Major
  • *
  • Posts: 76
    • mnus.de
Re: ScrCnv (automatic screenshot converter)
« Reply #11 on: February 09, 2012, 04:51:49 pm »
It's hard for me to compare a way it works in Linux, but it looks similar:
FindFirstChangeNotification and/or ReadDirectoryChangesW
That's about what inotify does. Too bad it doesn't work on windows (I'd need it for a dropbox-clone)

Offline Illuminatus

  • Camper
  • ***
  • Posts: 440
  • ...soldat-freak since 2004...
Re: ScrCnv (automatic screenshot converter)
« Reply #12 on: February 10, 2012, 12:58:39 pm »
+ Added "Rename converted BMPs" option (adds current map name & scores for CTF/HTF/INF modes)
Awesomeness! :D
No difference between man and mouse - both end up in pussy.

Offline machina

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1089
  • The world isn't nice. Why should I be...?
Re: ScrCnv (automatic screenshot converter)
« Reply #13 on: February 10, 2012, 01:46:58 pm »
+ Added "Rename converted BMPs" option (adds current map name & scores for CTF/HTF/INF modes)
Wow, exactly it's very useful...

Offline SyavX

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 337
Re: ScrCnv (automatic screenshot converter)
« Reply #14 on: March 02, 2014, 03:26:29 pm »
Version 0.3 [build 378] (02 Mar 2014):
+ Added Separate feature
+ Added ForceF1 feature
+ Added SmartDeletion feature
+ Added SmartRenaming feature
+ Added Browse, Run, Close functions
+ Added intergated tray menu with Soldat's tray icon
* Code has been rewritten. Next changelogs will use this version as their base


See first post for the download link...
« Last Edit: April 22, 2014, 02:42:23 pm by SyavX »

Offline nosejj

  • Camper
  • ***
  • Posts: 430
    • Soldat Discord!
Re: ScrCnv (automatic screenshot converter)
« Reply #15 on: March 02, 2014, 07:05:52 pm »
SmartDeletion - Amazing job! NICE!

Where exactly do I feel the line for custom smart-renaming?
I want to use: %dd-%mm%yyyy (%hh-%ii) - %map - Score %score1 - %score2 .


If you could add an option to make the program have the photos spreaded in folders, each date has it's own folder. That would be super!
Or generally the ability to spread the photos through folders, whether it's by server/gamemode/date/whatever. this way people can make it whatever's comfy for them.
« Last Edit: March 02, 2014, 07:13:10 pm by nosejj »

Offline SyavX

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 337
Re: ScrCnv (automatic screenshot converter)
« Reply #16 on: March 04, 2014, 02:19:00 pm »
Where exactly do I feel the line for custom smart-renaming?
See [SmartRenaming] section in ScrCnv.ini file.
All of possible settings with full descriptions are available there too.



If you could add an option to make the program have the photos spreaded in folders, each date has it's own folder. That would be super!
Or generally the ability to spread the photos through folders, whether it's by server/gamemode/date/whatever. this way people can make it whatever's comfy for them.

I've send you a PM (via forums and later in IRC) more than a week ago about your mod-pack (you included only ScrCnv's settings file instead of it's main .dll file) and provided you a link to an alpha version of ScrCnv v0.3 to test it's new features, since you were suggesting something similar in the past. But I had no response from you...

I'm not sure is it worth bothering with changing/adding more features, as there is not much activity in here.

Offline nosejj

  • Camper
  • ***
  • Posts: 430
    • Soldat Discord!
Re: ScrCnv (automatic screenshot converter)
« Reply #17 on: January 28, 2015, 08:58:35 am »
Hmm, yeah, I'll update it now.

One more suggestion, currently it's able to insert images into folders of different game modes. what about a folder for each month and in it each date? (x:\soldat\screens\january\1st\)

Come to think of it also, it'd be great to have a similar tool for demos, as in cut demos which are shorter than x:xx, etc.

Offline SyavX

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 337
Re: ScrCnv (automatic screenshot converter)
« Reply #18 on: February 02, 2015, 05:46:13 pm »
Hmm, yeah, I'll update it now.
ScrCnv v0.3 isn't compatible with current game version (1.6.8). Soldat won't load it automatically, and even if it was loaded, some functions won't work. Don't forget that this tool is a hack (a good one, but still it is) and should be used with compatible game version(s).


One more suggestion, currently it's able to insert images into folders of different game modes. what about a folder for each month and in it each date? (x:\soldat\screens\january\1st\)

I've added more date placeholders. Here is a documentation from current dev version:
%yyyy   - year   number, 4 digits
%yy     - year   number, 2 digits
%mm     - month  number with     leading zeros
%m      - month  number without  leading zeros
%dd     - day    number with     leading zeros
%d      - day    number without  leading zeros
%hh     - hour   number with     leading zeros
%h      - hour   number without  leading zeros
%ii     - minute number with     leading zeros
%i      - minute number without  leading zeros
%ss     - second number with     leading zeros
%s      - second number without  leading zeros
%mmmm   - month  full  localized name
%mmm    - month  short localized name
%ww     - day    full  localized name
%w      - day    short localized name



Come to think of it also, it'd be great to have a similar tool for demos, as in cut demos which are shorter than x:xx, etc.
Yeah, something similar has been already suggested by ool years ago. But I was postponing implementation of this feature again and again, because I wasn't satisfied with a way ScrCnv worked with screenshots...

And for this reason I've tried to rewrite it again. It works great except of instability and periodic Soldat crashes :D

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5007
Re: ScrCnv (automatic screenshot converter)
« Reply #19 on: February 02, 2015, 11:15:56 pm »
ScrCnv v0.3 isn't compatible with current game version (1.6.8). Soldat won't load it automatically, and even if it was loaded, some functions won't work. Don't forget that this tool is a hack (a good one, but still it is) and should be used with compatible game version(s).

You gonna rewrite it to add compatibility to 1.6.8 then? And I'm guessing SXS.DLL is the name of a generic library that Soldat automatically tries to load if its present, which is how you get around having to rename soldat.exe etc?
Careful with that axe, Eugene.