JPEGmini Server On-Premise

JPEGmini Server On-Premise

JPEGmini Server On-Premise

(for AWS docs click here)

TECHNOLOGY OVERVIEW

TECHNOLOGY OVERVIEW

JPEGmini is a patented photo optimization technology, which significantly reduces the size of photographs without affecting their perceptual quality. The technology works in the domain of baseline JPEG, resulting in files that are fully compatible with any browser, photo software or device that support the standard JPEG format.

JPEGmini is capable of reducing the size of standard JPEG photos by up to 80% (5X), while preserving their perceptual visual quality. The JPEGmini algorithm imitates the perceptual qualities of the human visual system, ensuring that each photo is compressed to the maximum extent possible by removing redundancies, without creating any visual artifacts in the process. This enables fully automatic, maximal compression of millions of photos with no human intervention required.

INSTALLATION

INSTALLATION

Prerequisites

The JPEGmini Server software requires a Linux operating system. Since we are using a cloud-based licensing, the computer on which JPEGmini is running should be connected to the Internet. The current user should have elevated permissions (root or sudo) for the installation.

Installing the JPEGmini Server Software

If you are using Red Hat Linux, execute the following command:

If you are using Debian Linux, execute the following command:

Uninstalling the JPEGmini Server Software

If you are using Red Hat Linux, execute the following command:

If you are using Debian Linux, execute the following command:

LICENSING

LICENSING

License Configuration

In order to run JPEGmini Server for the first time, you will need to enter your license key. This license key is provided together with your software. If you didn’t receive the license key, please contact JPEGmini support.In order to do so run the following command :

Please note:
* The current user should have elevated permissions (root or sudo) for the first activation.
* After JPEGmini is activated with the license key for the first time sudo is not required (and not recommended) in order to use it.
* JPEGmini will automatically get the updated license from the JPEGmini servers once every 24 hours, in case of a failure to do so it will retry once every hour.

OPERATING INSTRUCTIONS

OPERATING INSTRUCTIONS

General

The JPEGmini Server application takes a JPEG file as input, and outputs a smaller JPEG file with the extension “_mini.jpg”. The application can also be used on a folder of photos. When processing is finished, the application reports the sizes of the original and re-compressed photos, and the reduction factor achieved.
Note: If you are using the low-latency version of JPEGmini, which is called JPEGminiRT, substitute jpegmini_rt instead of jpegmini in all of the examples below.

Supported Formats

The JPEGmini Server supports input files in standard JPEG format. Supported resolutions are from 32x32 pixels up to 60 Megapixels.

Typical Usage

Typical usage only requires specifying the input file name:

jpegmini –f=test.jpg

The output in this case will be the file `test_mini.jpg`.
The application can also be executed on a complete folder, for example:

jpegmini –f=User/TestImages

In this case, all files in the folder `User/TestImages` will be processed by jpegmini.

Command Line Options

Command Line Options

The jpegmini application supports the following command line options:

-help: Displays usage instructions. Any other flags used in combination with –help will be ignored.

-f: Specifies the input JPEG file name or folder name which will be processed by jpegmini.

-f=<file name>: Specifies an input JPEG file name (jpegmini will process only the specified input JPEG file).

-f=<folder path>: Specifies the input JPEG folder name (jpegmini will process all the JPEG files in the specified folder).

-r: Specifies whether to recursively process all subfolders in a specified folder (relevant only when using the -f=<folder path> command line option to specify an input folder name).

-r=1: Recursively process all subfolders in the specified folder [default].

-r=0: Process the specified folder only, without its subfolders.

-o: Specifies the file name or folder name for the output images. When this flag is not used, by default the output file names are the same as the input file names with the postfix “_mini”, and they are placed in the same folder as the input files.

-o=<file name>: Specifies the name for the output JPEG file (relevant only when using the -f=<file name> command line option to specify an input file name).

-o=<folder path>: Specifies the folder in which the output JPEG files will be placed.

-logfile=<file name>: Specifies the destination file for writing the jpegmini log information printouts (See the “Application Printouts” section below). If this flag is not specified, by default jpegmini sends the log information printouts to the console.

-lvl:Specifies the level of log information that jpegmini will print to the console or to the specified log file (in case the -logfile=<file name> command line option was used).

-lvl=0: No logs

-lvl=1: Basic log level [default]

-lvl=2: Advanced log level

-csvfile=<file name>: Specifies the destination file for writing a summary of processing results in CSV format. The processing summary file is written in addition to the log information output. The processing summary file includes 5 fields for each processed file:

filein: Name of input file

filout: Name of output file

sizein: Size of input file in bytes

sizeout: Size of output file in bytes

err: Error code in HEX (0x0 for success)

-rsz:Resize the image before recompression.

-rsz=<x>: Resize the image to x% of the original width and height, preserving the aspect ratio. The value of x is from 1 to 99.

-rsz=width x height: Resize the image to width x height pixels, without preserving the aspect ratio. width and height must be larger than 31, and smaller than the original image’s width and height.

-qual:Specifies the quality of the output JPEG image.

-qual=0:Best Quality [default]. Produces an output image that is perceptually identical to the input image.

-qual=1:High Quality. Produces an image with a higher compression ratio than “Best Quality”, which still has a high quality, and provides a good tradeoff between quality and file size.

-qual=2: Medium Quality. Provides the highest compression level (smallest file size) at the expense of image quality.

-shc:Specifies whether to skip highly compressed images. When this flag is turned on, the application analyzes the input image to determine if it has already undergone heavy compression. If this is the case, the input file will be copied to the output without applying JPEGmini processing. The purpose of this option is to prevent the overhead of processing input files for which JPEGmini cannot provide a significant additional compression gain.

-shc=0: Don’t skip highly compressed images.

-shc=1: Skip highly compressed images [default].

-rmt:Specifies whether to remove metadata from the JPEG image. Removing metadata deletes the auxiliary information associated with the JPEG image, such as date, location, camera model, etc. Removing metadata can further reduce the output file size, especially for small input files.

-rmt=0: Don’t remove metadata from the JPEG file [default].

-rmt=1: Remove metadata from the JPEG file.

-prg:Specifies the progressive nature of the output JPEG image.

-prg=0: Never create a Progressive JPEG output.

-prg=1: Create a Progressive JPEG output only when the input is Progressive JPEG [default]

Application Printouts

Application Printouts

During its execution, the application prints out the following information:

  • Application version

  • Name and size of input JPEG file

  • Name and size of output JPEG file

  • Recompression ratio: The ratio between the input and output file sizes, and the difference between them in percent.


Below is an example of a typical printout for a file processed by JPEGmini.

During its execution, the application prints out the following information:

  • Application version

  • Name and size of input JPEG file

  • Name and size of output JPEG file

  • Recompression ratio: The ratio between the input and output file sizes, and the difference between them in percent.

Below is an example of a typical printout for a file processed by JPEGmini.

During its execution, the application prints out the following information:

  • Application version

  • Name and size of input JPEG file

  • Name and size of output JPEG file

  • Recompression ratio: The ratio between the input and output file sizes, and the difference between them in percent.

Below is an example of a typical printout for a file processed by JPEGmini.

Reading input file test\image1.jpg, file size=1498 KB
Writing output file test\image1_mini.jpg, file size=376 KB
Recompression ratio: 3.98X (74% saving)

When executing JPEGmini on a folder (using the -f=<folder path> command line option), the above information is displayed for each processed file. After completing the processing of all files in the folder, the application prints out the following summary information:

  • Total number of processed files

  • Total size of input files

  • Total size of output files

  • Recompression ratio: The ratio between the total size of the input files and the total size of the output files, and the difference between them in percent.

Below is an example of a typical folder summary report displayed by JPEGmini.

------------------------------------------
Summary report for folder test [including subfolders]:
Total number of files: 23
Total size of input files: 79356 KB
Total size of output files: 33370 KB
Recompression ratio: 2.38X (57% saving)

Note that this summary information refers to all the files which were processed by JPEGmini during the current execution, including files in subfolders (if the –r=1 option was used).

USAGE NOTES

USAGE NOTES

  1. Our licensing solution requires that the computer on which JPEGmini is running should be connected to the Internet. By default, the license cache file is used, and the license is read from the local cache. But when the license is retrieved for the first time, or when the cache is refreshed, a delay of a few seconds can be expected as the software validates its license with our cloud-based licensing server.

  2. The recompression ratios achieved depend on the image resolution, quality and content, and therefore are different for each image. However, the perceptual quality of the resulting image will always be the same as the original, when -qual=0 (Best quality) is used.

  3. JPEGmini generates the highest recompression ratios for first-generation JPEG images that are created by digital cameras (stand-alone devices or embedded in cellphones). Using JPEGmini on images that have been edited, re-sized or processed by image editing software may cause lower recompression ratios.

  4. If JPEGmini skips input images without processing them (for example if their resolution is not supported, or if they are highly compressed and the –shc flag is turned on), the input images are copied to the output with the extension “_copy.jpg”.

  1. JPEGmini only supports JPEG images as input. Non-JPEG images can be converted to JPEG and then optimized by JPEGmini. In this case, it is recommended to convert the images to JPEG at a JPEG quality (QF) of 100.

The recompression ratios achieved depend on the image resolution, quality and content, and therefore are different for each image. However, the perceptual quality of the resulting image will always be the same as the original, when -qual=0 (Best quality) is used.

JPEGmini generates the highest recompression ratios for first-generation JPEG images that are created by digital cameras (stand-alone devices or embedded in cellphones). Using JPEGmini on images that have been edited, re-sized or processed by image editing software may cause lower recompression ratios.

If JPEGmini skips input images without processing them (for example if their resolution is not supported, or if they are highly compressed and the –shc flag is turned on), the input images are copied to the output with the extension “_copy.jpg”.

JPEGmini only supports JPEG images as input. Non-JPEG images can be converted to JPEG and then optimized by JPEGmini. In this case, it is recommended to convert the images to JPEG at a JPEG quality (QF) of 100.

EXIT CODES

Below is a list of exit codes for the JPEGmini Server.



AUTHOR

The JPEGmini Server is developed by Beamr Imaging Ltd.

SUPPORT

If you have any questions about installing or using the JPEGmini Server, please contact support@jpegmini.com.

The benchmarks were measured by running one process of the JPEGmini Photo Server on the following configuration:

Instance Type:Amazon c3.large instance
OS:Ubuntu 14.04 Server
Storage: Magnetic disk
* Performance may vary depending on system configuration and type of images.