• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

Optimize workflow for comparing file-sizes Win10

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,017
I know that this sounds like being nitpicky, but when you have to do this for the 100th time it really gets annoying:
  1. using a PC with Win10, Explorer with ClassicShell + Icaros installed
  2. I render overlay-graphics in the .png-format
  3. I drag & drop the rendered .png on a .bat-file to automatically crop/resize/use filters/etc and then it gets compressed by 'pngcrush'
  4. I want to compare file-sizes because sometimes GIMP creates better compressed files (usually on small images)
  5. Win10 Explorer does not show me the exact file-size in the status-bar, instead it does shorten it to KB. The detailed-view does the same thing.
  6. I have to open the file-properties every time to see the exact file-size. The size that matter is the on shown in the file-properties behind 'Size:' in brackets: (xxx.xxx bytes)
What I'm looking for is a way to modify the Explorer to show the actually file-size in bytes in the status-bar ... that would be perfect. Any other ideas?

Google does not spit out any useful results. I doubt Microsoft Windows does support this (because ). Looks like a 3rd party solution is needed ... again ... for basic stuff ... but hey at least they add a link to fucking Candy Crush to your start-menu after a fresh installation right?! #storeuninstalled Sadly DAZ Studio is the only software that forces me to stay on Windows ... meh this is going off-topic ...
 

FallenLondon

Active Member
Aug 5, 2016
716
502
It can't be done in Windows Explorer, so third party is your only option. But why would you want to know the filesize in bytes instead of kilobytes? If the difference is so small as to not show up in kilobytes it really doesn't matter for the harddisk space used. Files on your hdd take up a multiple of 4 kB (assuming NTFS default cluster size). So a zero-byte file uses up the same amount of harddisk-space as a 3 kB file: 4 kB.
 
  • Like
Reactions: f95zoneuser463

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,017
try a replacement for the explorer
i personally use
This is good ... except for the price. Never heard of it before. Testing it right now. Plus points for being portable and tabs.

... But why would you want to know the filesize in bytes instead of kilobytes? If the difference is so small as to not show up in kilobytes it really doesn't matter for the harddisk space used. Files on your hdd take up a multiple of 4 kB (assuming NTFS default cluster size). So a zero-byte file uses up the same amount of harddisk-space as a 3 kB file: 4 kB.
Yes that is all correct, I understand how file-systems work. But Hard-disk space used is irrelevant because my files will get zipped by Ren'Py into one big archive. The goal is to reduce the archive size for the game-release. Windows 10 tends to cut off the file-size more the bigger the file gets. For example on a typical 1080p image I'd say you can save up to 100 KB by pngcrushing. Windows 10 may still not show a difference unless you check the file-properties. That was driving me crazy. (or I pick .jpg and lose quality *doh*)

The numbers that I am working with currently, all pngcrushed:
Master-Image folder, holds raw images, many 4K, some 6K, synced with limited cloud storage space: 502 files, 2.306.992.404 bytes / 2.3 GB
Game-Image folder, holds final images, optimized for 1080p: 319 files, 248.257.464 bytes / 248 MB

I can't tell how much space has been saved, but I'm sure it is a couple of megabytes. That is worth it for me. Maybe I'm to old fashioned with these kind of things ... but if I see a good way to save space without sacrificing quality I will use it, always! Love pngcrush, especially when I forget to remove unused alpha channels from .png's ... that can save megabytes.

I don't want to start pointing fingers, but I know at least one prime example of a game on this board that is so terrible with picking the right file- and compression-formats. Developers should care more, nobody likes to download a 1 GB+ for an early version game. Video files in a .webm-container compressed with outdated VP8-video and vorbis-audio? *triggers me* People that use .gif's for videos? Pornhub promoting .gif's!? *triggers me* People that use uncompressed .bmp-files on the web? *triggers me* *scream inside*

Anyway, I think 'the66's suggestion solved my problem. Thanks!
Only a free solution would be even better.
 

the66

beware, the germans are cumming
Modder
Respected User
Donor
Jan 27, 2017
7,618
23,601
This is good ... except for the price. Never heard of it before. Testing it right now. Plus points for being portable and tabs.


Yes that is all correct, I understand how file-systems work. But Hard-disk space used is irrelevant because my files will get zipped by Ren'Py into one big archive. The goal is to reduce the archive size for the game-release. Windows 10 tends to cut off the file-size more the bigger the file gets. For example on a typical 1080p image I'd say you can save up to 100 KB by pngcrushing. Windows 10 may still not show a difference unless you check the file-properties. That was driving me crazy. (or I pick .jpg and lose quality *doh*)

The numbers that I am working with currently, all pngcrushed:
Master-Image folder, holds raw images, many 4K, some 6K, synced with limited cloud storage space: 502 files, 2.306.992.404 bytes / 2.3 GB
Game-Image folder, holds final images, optimized for 1080p: 319 files, 248.257.464 bytes / 248 MB

I can't tell how much space has been saved, but I'm sure it is a couple of megabytes. That is worth it for me. Maybe I'm to old fashioned with these kind of things ... but if I see a good way to save space without sacrificing quality I will use it, always! Love pngcrush, especially when I forget to remove unused alpha channels from .png's ... that can save megabytes.

I don't want to start pointing fingers, but I know at least one prime example of a game on this board that is so terrible with picking the right file- and compression-formats. Developers should care more, nobody likes to download a 1 GB+ for an early version game. Video files in a .webm-container compressed with outdated VP8-video and vorbis-audio? *triggers me* People that use .gif's for videos? Pornhub promoting .gif's!? *triggers me* People that use uncompressed .bmp-files on the web? *triggers me* *scream inside*

Anyway, I think 'the66's suggestion solved my problem. Thanks!
Only a free solution would be even better.
erm.. you are amongst pirates here.. so.. shush..
user: f95zoneuser463
key: xy01-ST00-678b-6bb2-ff46-9822-sh18-0703
 

HiEv

Member
Sep 1, 2017
384
778
Only a free solution would be even better.
You could also grab the free version of xplorer² (the 32-bit lite version):

It even defaults to displaying file sizes in bytes and you can turn on a preview window for images as well.
 

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,017
Unfortunately I ran into a couple of issues with XYplorer:
  • it does not handle my monitor-setup and crashes sometimes if the second screen is active, left side 27"-screen 1920x1080/16:9, right side second screen 24" rotated 90° 1920x1200/16:10, the setup looks like a rotated 'L'-shape, the F11-window for image previews bugs out too. I just got the 24"-screen back, a friend did repair it by replacing a capacitor in the power-supply. Without the second screen the program worked fine.
  • no dark theme support (dev currently works on it) unless one spends countless hours configuring many colors manually
  • very slow with thumbnail generation (windows default-method?) compared to Icaros
  • not really an XYplorer issues but still problematic with third-party solutions: many programs keep opening paths by using the default explorer no matter what (hardcoded I guess)
*back to explorer for now*

I know this is a shady site but I can't use the key. If I'd really end up using XYplorer I'd probably contact the dev and ask for a cheaper price. Most people are very cool and helpful as long you support them a least a little bit. I try to make sure everything about my project is perfectly legal. For every asset, music, sound or image that is not CC0 or created by myself a info is inside my license.txt. Thank god creative commons licenses made this possible and much easier in the last years.

You don't have permission to view the spoiler content. Log in or register now.
 

eonfow

New Member
Jul 1, 2018
8
66
Have you tried power shell? It comes with windows and it is easier to make scripts IMO, a lot of linux commands are available, although they are just aliases to actual windows commands.
In superuser site (stackoverflow) there is an answer on how to run batch scripts (.bat files) from powershell so you don't need to rewrite what you already have.

Then you can than just run "ls" to show the file size.


PS C:\Users\Bruno\Pictures> ls

Directory: C:\Users\Bruno\Pictures

Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 08/10/2014 22:08 341220 aqZ50gR_700b.png

(files...)

PS C:\Users\Bruno\Pictures> ls | findstr.exe ".jpg"
-a---- 15/08/2015 22:58 109460 boat-bot.jpg
-a---- 02/10/2015 20:51 51018 f39.jpg
PS C:\Users\Bruno\Pictures> ls | findstr.exe ".png"
-a---- 08/10/2014 22:08 341220 aqZ50gR_700b.png
-a---- 25/10/2015 20:08 2987 SHIREE.png
 
  • Like
Reactions: f95zoneuser463

f95zoneuser463

Member
Game Developer
Aug 14, 2017
219
1,017
The only thing I know about power shell is that Microsoft seems to push it. They replaced the classic "shift+right-click" to open a cmd.exe-window with power shell too (Win 10). Linux commands you say? I like that!

But I had a semi-automated (and somewhat complicated) .bat-file solution for this already. I ended up throwing it away a while ago. To be honest I'm not sure an semi- or fully-automated solution for this is a good idea. I had some things go wrong with it in the past. After the images plop out of the renderer I have to review them manually anyway. What I'm looking for is more like a fast visual help to compare the file-size without using any kind of script.

Another Idea I had was to modify the Registry to:
  • show custom Tool-tips aka Quick-infos for specific files (.png + .jpg would be enough). Seems possible:
  • make the tool-tips show up instantly, possible?
Unfortunately I'm out of time for this now ... will investigate more another time.

@
I know I should really look into power shell ... I grew up with MS DOS and Windows 3.1 where .bat-files where a thing ... makes me at bit stubborn to move on, this is like hard wired in my brain :D