Scanlators! Optimize your PNG's to losslessly decrease file size before uploading!

Member
Joined
Aug 21, 2019
Messages
30
@doppler Sorry for the late response, you found some interesting flags there. I would personally keep the original script because it does the job I intended for it, just remove the extra data. Leave the rest to the scanlators. I will maybe add in that -nodate flag for my personal script.

I won't use the color stuff though, to many fully colored pages and it looks worse.

I have been using the pinga gui lately to convert the stuff i archive to WebP which works really great, I do it manually per chapter for what quality setting I use and it mostly looks the same except for some minor details that I don't care about. Sometimes it can't seem to make png's smaller though... until you preview it enough times and it finally does.
 
Dex-chan lover
Joined
Mar 24, 2018
Messages
623
@erati
Well then this will blow your mind. This change is based on the following link: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/start

start "" /normal /wait /min C:\pinga\pingo.exe -q -nodate -pngpalette=40 -notrans -s9 "%%a"
)
echo %Time%
pause

These changes give total control over the process. You must follow the link and read. Forgetting /wait could bog your system down to the point it dies. Or /min would cause seizures by flashing windows too fast. But let talk about this change.

Start - allows the use of child process to perform the operation. Which is based on two other flags of importance.
/normal - The almost most important switch. Decides how much power goes into the child process, ranges from low to realtime. NEVER USE REALTIME!!!!! It's there, just never use it.
/wait - The most important flag when using a for next loop in the cmd line. Without this flag the script continues after launching the process. 200 png's, 200 process. This will kill the system faster than realtime would.
/min - To avoid seizures from flashing windows. Try it once (not use it) on a small batch. You will quickly understand.

I added echo %Time% so I would know when the script quit.

Path not taken: /affinity - Set the processors that maybe used. Default is all cores. This is a hex number using bits to state the enabled cores. It's complicated google it. I understand, you may not. But using affinity you can reserve cores to not use. This will leave your system in a usable state IE: Not bogged down. Reserve core 0 and 1 on an 8 core I7 the value would be 'FC'. Cores 3-8 are used.

I have used the cmdline START directive to do things in parallel when ever possible. Otherwise the script is all sequentially processed. This horse has now been totally beaten into dust nothing more to add.
 

Users who are viewing this thread

Top