All Projects → JosePineiro → MozJpeg-wrapper

JosePineiro / MozJpeg-wrapper

Licence: MPL-2.0 license
mozjpeg wrapper for .NET coded in c#

Programming Languages

c
50402 projects - #5 most used programming language
C#
18002 projects

Projects that are alternatives of or similar to MozJpeg-wrapper

jpegio
A python package for accessing the internal variables of JPEG file format such as DCT coefficients and quantization tables
Stars: ✭ 51 (+264.29%)
Mutual labels:  jpeg
activecampaign-python
ActiveCampaign API wrapper written in python.
Stars: ✭ 25 (+78.57%)
Mutual labels:  wrapper
of
🍬 Promise wrapper with sugar 🍬
Stars: ✭ 13 (-7.14%)
Mutual labels:  wrapper
angsd-wrapper
Utilities for analyzing next generation sequencing data.
Stars: ✭ 13 (-7.14%)
Mutual labels:  wrapper
Grabber
A wrapper for Youtube-dl for Windows.
Stars: ✭ 22 (+57.14%)
Mutual labels:  wrapper
ansible-taskrunner
Ansible Taskrunner - ansible-playbook wrapper with YAML-abstracted python click cli options!
Stars: ✭ 14 (+0%)
Mutual labels:  wrapper
careful rm
A safe wrapper for rm that adds useful warnings and an optional recycle/trash mode
Stars: ✭ 22 (+57.14%)
Mutual labels:  wrapper
MeowDB.js
Database in JSON (Node.JS Library)
Stars: ✭ 12 (-14.29%)
Mutual labels:  wrapper
sodium-wrapper
C++17 wrappers for libsodium
Stars: ✭ 15 (+7.14%)
Mutual labels:  wrapper
BetterPhpDocParser
[DEPRECATED] Moved to
Stars: ✭ 45 (+221.43%)
Mutual labels:  wrapper
node-aplay
🎵 ALSA aplay wrapper for Node.js
Stars: ✭ 30 (+114.29%)
Mutual labels:  wrapper
sql capsule
Less ORM, more SQL
Stars: ✭ 27 (+92.86%)
Mutual labels:  wrapper
exif-rs
Exif parsing library written in pure Rust
Stars: ✭ 91 (+550%)
Mutual labels:  jpeg
dokan-delphi
Dokan Delphi Wrapper
Stars: ✭ 48 (+242.86%)
Mutual labels:  wrapper
stoor
Storage wrapper with support for namespacing, timeouts and multi get/set and remove.
Stars: ✭ 26 (+85.71%)
Mutual labels:  wrapper
python-qnapstats
Python API for obtaining QNAP NAS system stats
Stars: ✭ 45 (+221.43%)
Mutual labels:  wrapper
ig-markets
IG Markets API wrapper for Node.js
Stars: ✭ 23 (+64.29%)
Mutual labels:  wrapper
ReductionWrappers
R wrappers to connect Python dimensional reduction tools and single cell data objects (Seurat, SingleCellExperiment, etc...)
Stars: ✭ 31 (+121.43%)
Mutual labels:  wrapper
auto-mysql-backup
a wrapper for automysqlbackup
Stars: ✭ 19 (+35.71%)
Mutual labels:  wrapper
laravel-web3
Laravel SDK wrapper for the Web3 PHP API client that interacts with the Ethereum blockchain.
Stars: ✭ 85 (+507.14%)
Mutual labels:  wrapper

MozJpeg-wrapper

The most complete MozJpeg .NET wrapper in pure managed C#.

Exposes decoding API, encoding API and information API via turbojpeg-compatible API info for any JPEG file). In the future I'll update to expose more advanced Decoding API.

The wrapper is in safe managed code in one class. No need for external dll except turbojpeg_x86.dll and turbojpeg_x64.dll (included v3.2). The wrapper work in 32, 64 bit or ANY system (automatic select the apropiate library).

The code is fully commented and includes a simple example for using the wrapper.

Use

Load JPEG image for JPEG file

using (MozJpeg mozJpeg = new MozJpeg())
	this.pictureBox.Image = mozJpeg.Load(pathFileName);

Save bitmap to JPEG file with quality 85

using (MozJpeg mozJpeg = new MozJpeg())
	mozJpeg.Save(bmp, fileName, 85);

Decode JPEG date in byte array to bitmap and load in PictureBox container

byte[] rawJpeg = File.ReadAllBytes("test.jpg");
using (clsWebP mozJpeg = new rawJpeg())
	  this.pictureBox.Image = mozJpeg.Decode(rawJpeg);

Encode bitmap to byte array with quality 75, without JFIF, with accurate DCT, optimized scan and tuned for MS-SSIM (maximum compression and minimum size)

byte[] rawJpeg;
using (MozJpeg mozJpeg = new MozJpeg())
		rawJpeg = mozJpeg.Encode(bmp, 75, false, TJFlags.ACCURATEDCT |
		                         TJFlags.DC_SCAN_OPT2 | TJFlags.TUNE_MS_SSIM);
File.WriteAllBytes("test.webp", rawJpeg);

Get info from JPEG file

byte[] rawJpeg = File.ReadAllBytes("test.jpg");
using (clsWebP mozJpeg = new rawJpeg())
		mozJpeg.GetInfo(rawJpeg, out width, out height, out horizontalResolution,
		                out verticalResolution, out subsampl, out colorspace);

Thanks to pornel for his amazing code.

Without his work this wrapper would not have been possible.

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