All Projects → kornelski → Jpeg Compressor

kornelski / Jpeg Compressor

Licence: gpl-3.0
Research JPEG encoder

Projects that are alternatives of or similar to Jpeg Compressor

Convert Svg
Node.js packages for converting SVG into other formats using headless Chromium
Stars: ✭ 133 (-25.7%)
Mutual labels:  jpeg
Jpegkit Android
Efficient JPEG operations for Android without the risk of an OutOfMemoryException.
Stars: ✭ 154 (-13.97%)
Mutual labels:  jpeg
Stm32f4 uvc camera
STM32F4-Discovery USB Device UVC Camera examples
Stars: ✭ 173 (-3.35%)
Mutual labels:  jpeg
Pyecharts Snapshot
renders the output of pyecharts as png, jpeg, gif, svg, eps, pdf and raw base64
Stars: ✭ 142 (-20.67%)
Mutual labels:  jpeg
Caesium Clt
Caesium Command Line Tools - Lossy/lossless image compression tool using mozjpeg and zopflipng
Stars: ✭ 149 (-16.76%)
Mutual labels:  jpeg
Image Optimizer
Easily optimize images using PHP
Stars: ✭ 2,127 (+1088.27%)
Mutual labels:  jpeg
Alma
ALgoloid with MAcros -- a language with Algol-family syntax where macros take center stage
Stars: ✭ 132 (-26.26%)
Mutual labels:  experimental
Vue Hooks Foodapp
A food app using a few hooks in Vue to show how they can work (experimental)
Stars: ✭ 179 (+0%)
Mutual labels:  experimental
Stm32 graphics display drivers
STM32 LCD drivers (currently: spi(dma), gpio, fsmc(dma), st7735, st7783, ili9325, ili9328, ili9341, ili9486, ili9488, hx8347g)
Stars: ✭ 151 (-15.64%)
Mutual labels:  jpeg
Essential Image Optimization
Essential Image Optimization - an eBook
Stars: ✭ 1,950 (+989.39%)
Mutual labels:  jpeg
Doctron
Docker-powered html convert to pdf(html2pdf), html to image(html2image like jpeg,png),which using chrome(golang) kernel, add watermarks to pdf, convert pdf to images etc.
Stars: ✭ 141 (-21.23%)
Mutual labels:  jpeg
Metadata Extractor
Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Stars: ✭ 1,972 (+1001.68%)
Mutual labels:  jpeg
Lisp Chat
An experimental minimal chat written in Common Lisp
Stars: ✭ 160 (-10.61%)
Mutual labels:  experimental
Hrconvert2
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats.
Stars: ✭ 132 (-26.26%)
Mutual labels:  jpeg
Omxiv
OpenMax image viewer for the Raspberry Pi
Stars: ✭ 175 (-2.23%)
Mutual labels:  jpeg
Jpeg Quantsmooth
JPEG artifacts removal based on quantization coefficients.
Stars: ✭ 134 (-25.14%)
Mutual labels:  jpeg
Minet
CVPR2020, Multi-scale Interactive Network for Salient Object Detection
Stars: ✭ 155 (-13.41%)
Mutual labels:  experimental
Rawspeed
fast raw decoding library
Stars: ✭ 179 (+0%)
Mutual labels:  jpeg
Goluago
[on hold] Port of Lua 5.1 interpreter to Go Language Toolchain. [Work In Progress.] See also: http://lua.org and http://golang.org
Stars: ✭ 177 (-1.12%)
Mutual labels:  experimental
Ddc
The Disco Discus Compiler
Stars: ✭ 164 (-8.38%)
Mutual labels:  experimental

Research JPEG encoder

Codename "Nether Poppleton"


The goal of this encoder is to produce files with best filesize/quality ratio, regardless of encoding speed or memory cost.

Experimental features:

  • Luma-weighed chroma subsampling — thin red lines on white or black background don't become desaturated.
  • Less aggressive DC quantization — less banding (but more blurriness) at very low qualities.
  • Derining by overflowing — less noise around black text on white background.

Usage

Download binary or compile with

make

Run

./encoder source.png output.jpg 50

Examples

These are carefully chosen examples that show certain improvements. They're not indicative of overall performance (and ImageMagick's JPEG encoder is generally okay).

Deringing

JPEG shouldn't be used for line art, but people still do it. Now they can fail less at it.

ImageMagick = 7721B (left), this encoder = 7349B (right)

ImageMagick This encoder

Deringing is implemented by overshooting the white color (technique described here in detail). This way distortions are introduced out of visible range.

Subsampling

Color can be saved at half resolution. Poor subsampling darkens and desaturates red lines.

Original (left), ImageMagick = 7277B (middle), this encoder = 7173B (right)

OriginalImageMagick This encoder

This is done by weighing chroma by luma level. It can be improved further by subsampling with gamma correction and with luma corrections for out-of-range values produced by changes in chroma.

Low DC quantization

Standard JPEG encoders are not tuned for very low quality. Bad quality doesn't have to be that bad.

ImageMagick = 5033B (left), this encoder = 4890B (right)

ImageMagick This encoder

This is done merely by tweaking quantization tables. Further improvements are possible.


Not quite failed experiments

Lossy RLE on DC

I've created algorithm for proper unbiased lossy RLE compression (I can make lossy BMP, lossy PCX and lossy IFF ILBM files!), and wanted to see if it could work when applied to JPEGs DC coefficients. It kinda does a bit, but it often becomes noticeable at 1% file size gain, so overall it may not be worth the effort. Here's a 7% improvement in file size (if you can't see the difference you're sitting too close to the monitor):

Standard Blurred

Grass and rocks at the bottom became flat and bland, but it's hard to see any difference in the trees. Any idea how to detect areas of the image that tolerate this degradation? I've tried looking for noisy areas based on amplitude of selected AC coefficients, but grass and trees have almost the same ACs.

Failed experiments

Blurring DC quantization

JPEG stores average brightness per each 8x8 block, and heavy compression reduces number of brightness levels available (DC quantization), causing obvious blockyness.

I've tried to apply blur that smoothes edges introduced by quantization. Here's an exaggreated example that looks nice:

Standard Blurred

Unfortunately with proper quantization tables there isn't enough fidelity in higher frequencies to make a difference, and bits spent on soft edges could as well be spent on better DC in a first place.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].