GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - BASH-Auto-Tools/bash-jpegmin: bash script using imagemagick, to find an optimal quality index jpeg

BranchesTags
Open more actions menu

Latest commit

 

History

27 Commits
27 Commits

Folders and files

NameName
Last commit message
Last commit date
images
images
 
 
scripts
scripts
 
 
test
test
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

JPEGMIN (Bash Script).

The script uses the ImageMagick to determine the best indicator of quality when converting lossless images to jpeg. For calculations using BC.

As a criterion for visual quality using correlation analysis of the state borders:

	convert -quality $q "$src" "$tmpfile"
	convert -edge 3 "$tmpfile" "$tmpfileedge"
	cmppct=`compare -metric NCC "$srcfileedge" "$tmpfileedge" /dev/null 2>&1

In terms of the correlation A correlation is based sigmoid:

NCCsigma=`echo "1-sqrt(1-$cmppct)" | bc`

Avoiding the correlation sigmoid from linearity well characterizes the state borders. In this particular case, the maximum deviation interested in q=60-100.

		cmppct=`echo "$q*0.01-1+sqrt(1-$cmppct)" | bc`

It characterizes the beginning of the process avoidance of artifacts at the borders.

PS: State borders - is not the only factor that determines the visual quality. Possible combined application and other filters for activating factors unrelated to the boundaries.

jpegmin-zt-test:

bash jpegmin-zt.sh lena.png
lena.png
lena-png

result:

lena-jpegmin.jpg
lena-jpegmin.jpg

88 -> .342574
Before:462KB After:58KB Saved:404KB(87%)

index:

bash jpemin-zt-test.sh lena.png
test-lena.png
lena-jpegmin.csv

About

bash script using imagemagick, to find an optimal quality index jpeg

Topics

bashjpegoptimizer

Resources

Readme
Unlicense
Activity
Custom properties

Stars

2 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.