Skip to content

VictorXPDE/lqual

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

lqual

Lower a image's quality.

Dependencies:

  • Pillow for manipulating the image.
  • pyinstaller optionally for generating a .exe file for Windows.

Installation:

Windows

Install Python (make sure you checked the box to add Python to PATH).

Download the project's source code here and then unzip it.

Open the extracted folder in explorer, press SHIFT + Right Click and then click "Open Powershell window here".

In Powershell, enter this command:

python -m pip install pillow pyinstaller

to install Pillow and pyinstaller. Enter

pyinstaller lqual --onefile

to generate a .exe file.

Now, in explorer, go to the dist folder and copy the .exe file to C:\Users\<your_user>\AppData\Local\Programs\Python\<python_version>\Scripts (Substitute the text in <> to its respective folders).

Linux

Clone the project's repository and give the script execution permissions.

$ git clone https://github.com/VictorXPDE/lqual
$ cd lqual
$ chmod +x lqual

Now copy the script to /usr/local/bin or any other directory in your $PATH

$ sudo cp lqual /usr/local/bin

Usage:

lqual [-h] -m MULTIPLIER -q QUALITY [-l] input [output]

-h, --help            show this help message and exit
-m MULTIPLIER, --multiplier MULTIPLIER
                      the number that is going to be multiplied with the original resolution (higher = lower resolution)
-q QUALITY, --quality QUALITY
                      the image's jpeg quality value (lower = lower quality)
-l, --low-res         use this if you don't want the image to be resized back to its original size

If output is not specified the image will be save in the current directory with the name output.jpg.