All Projects → dwgoon → jpegio

dwgoon / jpegio

Licence: Apache-2.0 license
A python package for accessing the internal variables of JPEG file format such as DCT coefficients and quantization tables

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to jpegio

alfred-imagemin
Alfred workflow - Minify images with Imagemin
Stars: ✭ 29 (-43.14%)
Mutual labels:  jpeg
imagecodecs
Image transformation, compression, and decompression codecs. Forked from https://pypi.org/project/imagecodecs
Stars: ✭ 56 (+9.8%)
Mutual labels:  jpeg
jimp-compact
✏️ Lightweight version of Jimp -- An image processing library written entirely in JavaScript for Node.js
Stars: ✭ 55 (+7.84%)
Mutual labels:  jpeg
video thumbnail
This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
Stars: ✭ 159 (+211.76%)
Mutual labels:  jpeg
picojdec
Simple baseline JPEG decoder
Stars: ✭ 22 (-56.86%)
Mutual labels:  jpeg
dom-to-image-more
Generates an image from a DOM node using HTML5 canvas
Stars: ✭ 231 (+352.94%)
Mutual labels:  jpeg
Density Converter
A multi platform image density converting tool converting single or batches of images to Android, iOS, Windows or CSS specific formats and density versions given the source scale factor or width/height in dp. It has a graphical and command line interface and supports many image types (svg, psd, 9-patch, etc.) aswell as some lossless compressors like pngcrush.
Stars: ✭ 222 (+335.29%)
Mutual labels:  jpeg
jpgtxt
Generating jpg files that can be viewed both in image viewer and text editor (as ASCII art)
Stars: ✭ 24 (-52.94%)
Mutual labels:  jpeg
tyf
Manipulate EXIF and IFD metadata.
Stars: ✭ 16 (-68.63%)
Mutual labels:  jpeg
pixl
🚀 Lightweight image processing library in C++11
Stars: ✭ 31 (-39.22%)
Mutual labels:  jpeg
Guetzling
Guetzling is a simple script for macOS and Linux written in Bash, to automate (recursively finding files) the compression of jpegs using the Guetzli algorithm.
Stars: ✭ 20 (-60.78%)
Mutual labels:  jpeg
node-pdftocairo
📃 Node.js wrapper for pdftocairo - PDF to PNG/JPEG/TIFF/PDF/PS/EPS/SVG using cairo
Stars: ✭ 17 (-66.67%)
Mutual labels:  jpeg
StbSharp
C# port of the famous C framework
Stars: ✭ 62 (+21.57%)
Mutual labels:  jpeg
modjpeg-nginx
NGINX filter module for adding overlays and logos to JPEGs on-the-fly without degrading the quality of the image.
Stars: ✭ 18 (-64.71%)
Mutual labels:  jpeg
cairo jpg
Reading and writing JPEG files from/to Cairo surfaces.
Stars: ✭ 26 (-49.02%)
Mutual labels:  jpeg
Image Compression Cnn
Semantic JPEG image compression using deep convolutional neural network (CNN)
Stars: ✭ 237 (+364.71%)
Mutual labels:  jpeg
gfxprim
Open-source modular 2D bitmap graphics library with emphasis on speed and correctness.
Stars: ✭ 32 (-37.25%)
Mutual labels:  jpeg
whatsapp-jpeg-repair
A handy tool to fix jpeg files downloaded from WhatsApp and prevent errors upon opening these files in Adobe Photoshop.
Stars: ✭ 30 (-41.18%)
Mutual labels:  jpeg
go-jpeg-image-structure
Parse JPEG data into segments via code or CLI from pure Go. Read/export/write EXIF data. Read XMP and IPTC metadata.
Stars: ✭ 47 (-7.84%)
Mutual labels:  jpeg
sail
The missing small and fast image decoding library for humans (not for machines) ⛵ https://sail.software
Stars: ✭ 206 (+303.92%)
Mutual labels:  jpeg

JpegIO

A python package for accessing the internal variables of JPEG file format such as DCT coefficients and quantization tables.

Installation

It is recommended to install by compiling yourself. The installation process includes compiling C/C++ source codes.

python setup.py install

You can also use the pre-compiled wheels (If some errors occur, try compiling the package using the above command).

On Linux:

pip install dist/jpegio-x.x.x-cp3x-cp3x-linux_<your architecture>.whl

On Windows 10 x64:

pip install dist/jpegio-x.x.x-cp3x-cp3x-win_amd64.whl

On macOS x64:

pip install dist/jpegio-x.x.x-cp3x-cp3x-macosx_<version>_x86_64.whl

Making a wheel

You can use the following command for making a wheel for your own architecture such as x64 or ppc64le.

python setup.py bdist_wheel

The cooked wheel files are located at dist directory.

Dependency

This package requires other packages.

Usage example

import jpegio as jio

jpeg = jio.read("image.jpg")
coef_array = jpeg.coef_arrays[0]  
quant_tbl = jpeg.quant_tables[0]

# Modifying jpeg.coef_arrays...
# Modifying jpeg.quant_tables...

jio.write(jpeg, "image_modified.jpg")
  • coef_arrays is a list of numpy.ndarray objects that represent DCT coefficients of YCbCr channels in JPEG.
  • quant_tables is a list of numpy.ndarray objects that represent the quantization tables in JPEG.

You can also utilize other variables (one of the simplest ways for finding them is to use dir(img)). The names of member variables have been determined following the convention of libjpeg.

References

License

Apache License 2.0

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].