All Projects → OrlovEvgeny → TinyJPG

OrlovEvgeny / TinyJPG

Licence: MIT License
images jpg or jpeg compressed and watcher fsnotify

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to TinyJPG

Compress Images
Minify size your images. Image compression with extension: jpg/jpeg, svg, png, gif. NodeJs
Stars: ✭ 331 (+353.42%)
Mutual labels:  compression, jpeg, image-compression
Imager
Automated image compression for efficiently distributing images on the web.
Stars: ✭ 266 (+264.38%)
Mutual labels:  compression, jpeg, image-compression
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 (-58.9%)
Mutual labels:  jpg, jpeg, jpeg-image
Essential Image Optimization
Essential Image Optimization - an eBook
Stars: ✭ 1,950 (+2571.23%)
Mutual labels:  compression, jpeg, image-compression
Precomp Cpp
Precomp, C++ version - further compress already compressed files
Stars: ✭ 250 (+242.47%)
Mutual labels:  jpg, compression
Epeg
Insanely fast JPEG/ JPG thumbnail scaling with the minimum fuss and CPU overhead. It makes use of libjpeg features of being able to load an image by only decoding the DCT coefficients needed to reconstruct an image of the size desired.
Stars: ✭ 220 (+201.37%)
Mutual labels:  jpg, jpeg
wordpress-plugin
Speed up your WordPress website. Optimize your JPEG and PNG images automatically with TinyPNG.
Stars: ✭ 78 (+6.85%)
Mutual labels:  jpg, compression
tinify-net
.NET client for the Tinify API.
Stars: ✭ 45 (-38.36%)
Mutual labels:  tinyjpg, image-compression
Optimise Images
Batch image resizer, optimiser and profiler using ImageMagick convert, OptiPNG, JpegOptim and optional ZopfliPNG, Guetzli and MozJPEG.
Stars: ✭ 64 (-12.33%)
Mutual labels:  jpg, jpeg
Compressor
An android image compression library.
Stars: ✭ 6,745 (+9139.73%)
Mutual labels:  compression, image-compression
tinify-ruby
Ruby client for the Tinify API.
Stars: ✭ 41 (-43.84%)
Mutual labels:  tinyjpg, image-compression
Jpegkit Android
Efficient JPEG operations for Android without the risk of an OutOfMemoryException.
Stars: ✭ 154 (+110.96%)
Mutual labels:  jpg, jpeg
Stm32 graphics display drivers
STM32 LCD drivers (currently: spi(dma), gpio, fsmc(dma), st7735, st7783, ili9325, ili9328, ili9341, ili9486, ili9488, hx8347g)
Stars: ✭ 151 (+106.85%)
Mutual labels:  jpg, 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 (-72.6%)
Mutual labels:  compression, jpeg
Jpeg Autorotate
Node module to rotate JPEG images based on EXIF orientation.
Stars: ✭ 127 (+73.97%)
Mutual labels:  jpg, jpeg
HEIF
Mac OS X: Convert any image to HEIF/HEIC format
Stars: ✭ 58 (-20.55%)
Mutual labels:  jpg, jpeg
imagezero
Fast Lossless Color Image Compression Library
Stars: ✭ 49 (-32.88%)
Mutual labels:  compression, image-compression
neural-imaging
[CVPR'19, ICLR'20] A Python toolbox for modeling and optimization of photo acquisition & distribution pipelines (camera ISP, compression, forensics, manipulation detection)
Stars: ✭ 109 (+49.32%)
Mutual labels:  jpeg, image-compression
srcset.sh
A command line script that generates multiple responsive versions of an image at width breakpoints -- 320,480,640,768,960,1024,1280,1440 pixels wide -- that match common Mobile and widescreen desktop/laptop viewports using Imagemagick's convert utility and outputs the needed <img/> tag
Stars: ✭ 20 (-72.6%)
Mutual labels:  compression, jpeg
Jpegsnoop
JPEGsnoop: JPEG decoder and detailed analysis
Stars: ✭ 282 (+286.3%)
Mutual labels:  jpg, jpeg

Build Status Maintainability

TinyJPG Filesystem watcher and image compress

JPEG image compress watcher based Filesystem event notification github.com/rjeczalik/notify

Example compress quality 82%

original before size 1.47 MB (1,536,181 bytes) compressed after 277.56 KB (284,223 bytes)
screenshot screenshot

Install binary

Installation dependency

~ $ apt install libmagickwand-dev imagemagick

Install TinyJPG for v0.0.9:

curl -L https://raw.githubusercontent.com/OrlovEvgeny/TinyJPG/master/tinyjpg_install.sh | sh -s - v0.0.9

If you prefer Ansible:

tasks:
- name: TinyJPG installed
  sudo: yes
  shell: "curl -L https://raw.githubusercontent.com/OrlovEvgeny/TinyJPG/master/tinyjpg_install.sh | sh -s - v0.0.9"

Edit config File

~ $ vim /etc/tinyjpg/config.yml
##
# TinyJPG v0.0.9
#
# worker - maximum amount workers, Default value - 5
# verbose - verbose log, Default value - true
# worker_buffer - maximum buffer queue workers, Default value - 100
# event_buffer - maximum buffer an event reported by the underlying filesystem notification subsystem, Default value - 100
##
general:
  worker: 5
  worker_buffer: 100
  event_buffer: 300
  verbose: false
  error_log: '/var/log/tinyjpg/error.log'
  info_log: '/var/log/tinyjpg/info.log'

###
# Image compress settings
#
# paths - directories you need to track
# prefix - prefix of files to be processed, Default value all files - *
# example use
#
#   prefix:
#      - 'orig'
#      - 'medium'
#      - 'full'
#
# quality - This param image quality level in percentage.
# If the original image quality is lower than the quality of the parameter - quality
# the image will not be processed
###
compress:
  paths:
    - '/home/www/example.com/uploads'
    - '/home/www/site.org/uploads'
  prefix:
    - '*'
  quality: 82

check that everything is fine

~ $ tinyjpg -help

    Usage of build/tinyjpg:
      -config string
            config file path
      -event_buffer int
            buffer an event reported (default 300)
      -path string
            uploads folder path, default - /home/www (default "/home/www")
      -quality int
            image quality level in percentage (default 82)
      -worker int
            maximum amount workers (default 5)
      -worker_buffer int
            maximum buffer queue workers (default 500)

Use

I recommend using supervisor

example config

~ $ vim /etc/supervisor/conf.d/tinyjpg.conf

write

[program:tinyjpg]
command=/usr/local/bin/tinyjpg -config=/etc/tinyjpg/config.yml
environment=ENVIRONMENT=production
autorestart=true
user=root
redirect_stderr=true
stderr_logfile=/var/log/tinyjpg/log.err.log
stdout_logfile=/var/log/tinyjpg/log.out.log
~ $ mkdir -p /var/log/tinyjpg
~ $ service supervisor restart

or use Tmux

~ $ tinyjpg -config=/etc/tinyjpg/config.yml

deprecated

or use CLI mode

# deprecated
~ $ tinyjpg -path=/home/www/example.com/images -worker=10

Args:

  • path - required. Path to watch new files, default /home/www
  • worker - optional. Amount start workers process, default 5

Build Source

For compilation you need to install Golang1.8

~ $ apt install libmagickwand-dev imagemagick
~ $ git clone https://github.com/OrlovEvgeny/TinyJPG && cd TinyJPG
~ $ go get -u github.com/rjeczalik/notify
~ $ mkdir build && go build -o ./build/tinyjpg *.go
~ $ mv /build/tinyjpg  /usr/local/bin/tinyjpg

permission for execution

~ $ chmod +x /usr/local/bin/tinyjpg

License:

MIT

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