Skip to main content
;;
Source Link
xiota
  • 27.1k
  • 4
  • 42
  • 129

You can use ImageMagick with the auto-level or level flags.

convert input.jpg -auto-level output.jpg
convert input.jpg -level 1%,99% output.jpg

On Linux or Mac, you can use a bash control structure to perform the operation on multiple image files.

for f in *.jpg ; do
   convert "$f" -level 1%,99% "${f%.jpg}-level.jpg"
done

I don't know the equivalent command forFor Windows, you can install a bash shell, like Cygwin or Windows Subsystem for Linux. Anyone

Anyone who knows the native cmd or PowerShell commands for Windows, feel free to edit to add.

You can use ImageMagick with the auto-level or level flags.

convert input.jpg -auto-level output.jpg
convert input.jpg -level 1%,99% output.jpg

On Linux or Mac, you can use a bash control structure to perform the operation on multiple image files.

for f in *.jpg ; do
   convert "$f" -level 1%,99% "${f%.jpg}-level.jpg"
done

I don't know the equivalent command for Windows. Anyone who knows, feel free to edit to add.

You can use ImageMagick with the auto-level or level flags.

convert input.jpg -auto-level output.jpg
convert input.jpg -level 1%,99% output.jpg

On Linux or Mac, you can use a bash control structure to perform the operation on multiple image files.

for f in *.jpg ; do
   convert "$f" -level 1%,99% "${f%.jpg}-level.jpg"
done

For Windows, you can install a bash shell, like Cygwin or Windows Subsystem for Linux.

Anyone who knows the native cmd or PowerShell commands for Windows, feel free to edit to add.

Source Link
xiota
  • 27.1k
  • 4
  • 42
  • 129

You can use ImageMagick with the auto-level or level flags.

convert input.jpg -auto-level output.jpg
convert input.jpg -level 1%,99% output.jpg

On Linux or Mac, you can use a bash control structure to perform the operation on multiple image files.

for f in *.jpg ; do
   convert "$f" -level 1%,99% "${f%.jpg}-level.jpg"
done

I don't know the equivalent command for Windows. Anyone who knows, feel free to edit to add.