Jump to content

Hi There

Welcome to Klub Exile. If you happened to make your way to the site either from Lovers Lab or a Search on Google, we are glad you found us.  To unlock the entire site you will need to have a account registered.  Don't worry it is free but in the mean time you can read up on why we made the site and other little tidbits.  Feel free to join or Discord Server also if you have any more questions.  Thanks for stopping by and See You on the other side.

admin admin

john374

Member Level 3
  • Posts

    381
  • Joined

  • Last visited

  • Days Won

    1
  • XP

    7,830 [ Donate ]

File Comments posted by john374

  1. 11 hours ago, vi363R said:

    Hi yes sure:

    1 go to https://pngquant.org/ and download the command-line binary for windows
    2 this gives you a zip file called pngquant-windows.zip 
    3 extract it into a folder
    4 in that folder create a new empty text file (using right click context menu
    5 rename the new text file's extension to .bat
    6 right click it and choose edit (opens notepad) or edit with notepad++ if you have that
    7 in the file copy-paste the script above (everything between and excluding the lines of slashes.

    8 save as .bat

    9 drop png file(s) on the batch script (or a shortcut to it)  to optimize the files

    note: pngquant.exe needs to be in the same folder than the script .bat file

    There are some options in the script
    - strip removes metadata (which is not required)
    - speed Speed/quality trade-off from 1 (brute-force) to 10 (fastest). The default is 3. Speed 10 has 5% lower quality, but is 8 times faster than the default. I use 7.
    - force to overwrite without prompt
    - ext .png for the extension, otherwise default extesion will be or8.png
    - verbose to see what it's doing
    - skip if larger is quiet obvious, only overwrite file if smaller
    - the 16 is the amount of colors you like to have in the output, minimum is 2, I vary between 4 and 256, depending on the texture, for most basic clothes it can be really down to 8, 16 or 32, good thing is: it keeps transparency, even with very low amount of colors 
    - pause keeps the windows batch window open when operation is complete

    during testing, keep backups!! cannot be undone.

    thanks! very easy and simple to set up. unfortunately i get an error when i try to add more than 100 png files, and i've been able to add a lot more to the GUI version. I've been adding more each time, trying not to crash it and currently processing about 2,000. still, command line and scripts will be useful with all of the options. thanks for explaining.

    • Thumbs Up 1
  2. On 3/18/2023 at 3:39 PM, vi363R said:

    hi @sexybastardo, thanks for the tip, I've created some batch scripts for the command line version, which works a bit faster than the application. also drag and drop (on the script). example below:

    ///////////////////////////////////////////////////////////////////

    @echo off
    set path=%~d0%~p0
    :start
    "%path%pngquant.exe" --strip --ext .png --force --speed 7 --skip-if-larger --verbose 16  %1
    shift
    if NOT x%1==x goto start
    pause

    ///////////////////////////////////////////////////////////////////

    note: pngquant.exe needs to be in the folder of the script file

    hey, could you explain briefly how to use the command line version and this script on our activemod folder? the GUI version seems pretty limited and to us laymen these github projects can sometimes seem like they're written in an alien language

×
×
  • Create New...

Important Information

WARNING! Adult Only Content You must be 18 years of age or older to enter. By accepting you agree to Klub Exile's Terms of Use and Guidelines upon creating an account.