ImageAlpha converts 24-bit PNG to paletted 8-bit with full alpha channel. This greately reduces file sizes with only minor loss of quality. Such images are compatible with all browsers, and even. ImageAlphaで処理が完了後に自動的にImageOptimで処理が開始されるのでそのままチェックを入れた状態で「保存」を押しましょう。 1つ前のステップで名前を変更してない場合は上書き保存しますよと言う警告が出ますが、元画像が無くなっても問題ない場合は. 图片压缩程序 pngqunt 和其他几个工具的 Mac OSX 平台图形界面前端。 Kraken.io. 使用顶级算法,健壮,闪速的图片优化与压缩程序。 PNGGauntlet. 为加快站点速度压缩图片。 PNGoo. 带批处理功能的 pngqunt 程序 Windows 平台图形界面前端。 Pngyu. In the above Gaussian function, alpha (a) is the magnitude of the bell curve (scale that we want the view to be in the center of the screen), x is the child’s horizontal center, b is the.
Meter=Image
displays either an image defined by a measure value, or any named image. If W
and/or H
are included in the meter options, the image will be scaled to fit the meter size.
Supported image formats are .png, .jpg, .bmp, .gif (no animation supported), .tif, .webP, and .ico.
Note: If no file extension is included, .png is assumed.
Options
All general meter options are valid.
All general image options are valid for ImageName
.
MeasureName
, MeasureName2
, ..., MeasureNameN
Name(s) of the measure(s) bound to the meter. The value of a measure or measures will define the image file to be used in the meter. The value can define a full path and name of any supported image file, or just the name if the ImagePath option is used or the image file is in the current skin folder.
ImageName
Default: %1.png

Name of an image file. This can be a full path and name of any supported image file, or just the name of the file if the ImagePath option is used or the image file is in the current skin folder.
Note: If a MeasureNameN
option is defined, it will override any named file in the ImageName
option. Generally, MeasureNameN
and ImageName
will not be used together in the same meter.
MeasureName
returns a file name with no extension, and the default .png is not desired, or when ImageName
is being used to define an image based on the combined values of the measures in MeasureNameN
and uses the %N
syntax as follows:Note: When ImageName
is hard-coded with an image file name, the image will be loaded and 'cached', to avoid reloading the image from disk on every meter update. If there is an external process that is changing the image file, while leaving the name the same, use DynamicVariables=1
on the meter to force the image to be reloaded from disk on every meter update.
PreserveAspectRatio
Default: 0
Controls how W
and H
scale the image when Tile=0
. Valid values are:
0
: The image is scaled to exactly fit the bounds specified byW
andH
without regard to aspect ratio.1
: The image is scaled to fit within the bounds specified byW
and/orH
while preserving the aspect ratio.2
: The image is scaled and cropped to fill the bounds specified byW
and/orH
while preserving the aspect ratio.
Note: If only one of either W
or H
is defined, then PreserveAspectRatio will default to 1
.

ScaleMargins
Format: Left, Top, Right, Bottom
Margins of the image to exclude from scaling when Tile=0
and PreserveAspectRatio=0
.
Example:ScaleMargins=10, 50, 10, 50

Tile
Default: 0
If set to 1
, the image is tiled (repeated) within the bounds defined by W
and H
.
Hint: Using the SolidColor option, along with W and H options, an image meter may be used to draw squares, rectangles or lines without needing any ImageName
or MeasureName
.
However, no manipulations can be done to the resulting square, rectangle or line with any general image options. Only actual images loaded from a file can be manipulated. (e.g. ImageRotate)
Deprecated Features
The following options have been deprecated and should not be used. They are still supported, but may be removed in future versions.
Path
The Path option to define the location of images is replaced by the ImagePath option in general image options.
Example
Mask Image
Note: This MaskImage functionality is better done with the far more powerful and flexible Container option. MaskImage will continue to be supported, but is no longer recommended.
MaskImageName
Default: None
Name of an image file to use as a mask for the primary image defined with MeasureName or ImageName. The size and shape of MaskImageName will be used to mask and define the size and shape of the primary image.
MaskImageName can be a full path and name of any supported image file, or just the name of the file if the MaskImagePath option is used, or the image file is in the current skin folder.
If MaskImageName is defined, then W
and H
define the size of the mask image, and the size of the meter. Whatever is defined as the primary image with ImageName or MeasureName is then masked into the mask image, displaying in any non-transparent areas of MaskImageName using a 'fill' method that sizes and crops the image to fit while preserving the aspect ratio.
If either the primary image or mask image has areas of transparency or partial transparency, those 'alpha channel' values are applied to the final image. When both images have a shared area with full or partial transparency, the 'most transparent' value is applied.
Notes:
MaskImageName cannot be bound to the meter from a measure with MeasureNameN and %1, %2 etc.
If MaskImageName is defined, then ScaleMargins and Tile options cannot be used on the meter.
MaskImagePath
Default: None
Folder path where an image is located. (e.g. MaskImagePath=#@#Images
).
MaskImageFlip
Default: None
Flips the image. Valid values are None
, Horizontal
, Vertical
or Both
.
MaskImageRotate
Default: 0.0
Rotates the image by the specified angle in degrees. Negative angles can be used for counter-clockwise rotation.
Automates ImageOptim, ImageAlpha, and JPEGmini for Mac to make batch optimisation of images part of your automated build process.
Table of Contents
📣 Summary
While other image optimization tools are available from the command line, ImageOptim-CLI exists because the current benchmarks suggest that ImageOptim, ImageAlpha and JPEGmini currently outperform those alternatives over lossless and lossy optimizations.
ImageOptim-CLI is written in TypeScript and AppleScript but is distributed as a self-contained executable binary, you don't need Node.js installed to use ImageOptim-CLI.
Check out this short video demo of ImageOptim-CLI to see how it works.
🌩 Installation
Manual
Otherwise, you can install manually by downloading the latest release then adding ImageOptim-CLI to your $PATH.
Saving somewhere in your home directory such as ~/imageoptim-cli
is recommended, but not essential. Saving to /Applications
is not recommended, do not do this.
🕹 Usage
⚠️ JPEGmini and support for assistive devices
You may be presented with the following message the first time you run ImageOptim-CLI with the --jpegmini
flag.
To automate JPEGmini we need to add Terminal.app (or iTerm.app etc) to the 'support for assistive devices' whitelist.
Image Alpha Centauri
The JPEGmini OS X Apps don't include a command line API, so a real user is simulated by entering synthetic clicks and keyboard commands instead. This requires your permission and is easily set up in System Preferences as shown by these guides.
💡 Related Projects
Grunt Plugin
The ImageOptim-CLI Grunt plugin is grunt-imageoptim.
Comparison of image optimization tools
ImageOptim-CLI features in this comparison of the performance of image optimisation tools alongside Kraken.io, CodeKit, grunt-contrib-imagemin, Smush.it, and TinyPNG.
Article for Smashing Magazine
Alfred Workflow
The ImageOptim-CLI Workflow for Alfred app is alfred-image-optim-workflow
❓ FAQs
Imageoptim Pc
General
Do ImageOptim, ImageAlpha, or JPEGmini come bundled with the ImageOptim-CLI installation?
You will need to install these applications separately.
Do I have to pay to use ImageOptim-CLI?
The CLI, ImageOptim and ImageAlpha are all free. JPEGmini is a paid-for product but you can use ImageOptim-CLI and choose not to run JPEGmini.
The WebP image format looks promising, can you get ImageOptim-CLI to convert images to it?
WebP looks great and may well overtake the formats handled by ImageOptim-CLI, but converting images to WebP is outside ImageOptim-CLI's chosen remit.
Can you get ImageOptim-CLI to skip images it has already processed, if they haven't changed?
JPEGmini does this today, but for ImageOptim and ImageAlpha I feel a feature like this belongs in those applications rather than this automator.
ImageOptim
ImageOptim makes the fans on my Mac run at full power.
Optimising images is a pretty intensive process, so instead of optimising one image at a time (which would take forever) — ImageOptim optimises many images at the same time until all of them are done.
A side effect of this is that the fans come on at full power to keep your machine cool while it's maxed out.
ImageAlpha
I don't think ImageAlpha is running, I can't see anything.
ImageOptim-CLI uses ImageAlpha's internal installation of pngquant so it's normal that nothing is shown on screen.
It's also possible that if you look in the Activity Monitor you will not see pngquant
displayed but it is being run. In my experience it's only when you run ImageOptim-CLI on a very large number of PNGs that you have enough time to spot it. ensure that Activity Monitor's Update Frequency is set to Very Often (1 sec).
JPEGmini
Can I use ImageOptim-CLI with JPEGmini Lite, the free version of JPEGmini?
Yes.
I upgraded from JPEGmini Lite to JPEGmini but ImageOptim-CLI still says JPEGmini is not installed.
Performing the in-app upgrade leaves the app named as jpegmini-lite, so ImageOptim-CLI can't determine whether it's the free or full version. It is better to instead buy the full version of JPEGmini separately.
ImageOptim-CLI says “To automate JPEGmini we need to enable GUI Scripting”, how do I do that?

See this tutorial on how to manage Accessibility preferences and GUI Scripting. In the case of OS X Mavericks, you will want to add the Applications JPEGmini and Terminal (or equivalent such as iTerm).
Windows and Linux
Can I use ImageOptim-CLI on Windows or Linux?
ImageOptim-CLI is responsible for automating 3 OS X applications so is inherently bound to OS X for that reason.
Are there any plans for ImageOptim-CLI to support Windows or Linux?
It would first require ImageOptim, ImageAlpha, and JPEGmini to be available for those platforms.
Image Alpha&omega Frederic M
I don't have OS X, can you recommend an alternative to ImageOptim-CLI?
@addyosmani wrote a really thorough article on tools for image optimization which discusses a wide range of options in great detail.
⚙️ Contributing
Rainmeter Image Skin
Have an idea? Found a bug? Please see the Contributing Guide for information on how to install the project and start writing code.
🙋🏿♀️ Getting Help
Get help with issues by creating a Bug Report or discuss ideas by opening a Feature Request.
👀 Other Projects
If you find my Open Source projects useful, please share them
- eslint-formatter-git-log
ESLint Formatter featuring Git Author, Date, and Hash - eslint-plugin-move-files
Move and rename files while keeping imports up to date - eslint-plugin-prefer-arrow-functions
Convert functions to arrow functions - Jasmine-Matchers
Write Beautiful Specs with Custom Matchers - karma-benchmark
Run Benchmark.js over multiple Browsers, with CI compatible output - self-help
Interactive Q&A Guides for Web and the Command Line - syncpack
Manage multiple package.json files, such as in Lerna Monorepos and Yarn Workspaces
🤓 Author
I'm Jamie Mason from Leeds in England, I began Web Design and Development in 1999 and have been Contracting and offering Consultancy as Fold Left Ltd since 2012. Who I've worked with includes Sky Sports, Sky Bet, Sky Poker, The Premier League, William Hill, Shell, Betfair, and Football Clubs including Leeds United, Spurs, West Ham, Arsenal, and more.
