Tinypng Photoshop Plugin Full Version

Tinypng Photoshop Plugin Full Version Rating: 4,2/5 6970 votes

Photoshop's script engine is a flexible alternative to batch automation. We show how to create a script to compress many PNG files with the TinyPNG plugin for Photoshop. TinyPNG is a web service that compresses PNG images very efficiently by reducing the number of colours in the image. Since the beginning of 2014 it's also available as an. Descargar biblia tu andar diario pdf merger.

The plugin supports scripting, which makes it suitable for Photoshop actions. Actions can be used in combination with batch automation to compress a large number of images. An alternative is to write scripts to automate the compression. In this article we describe how to use Photoshop and the TinyPNG plugin with JavaScript. Creating and running JavaScript in Photoshop Scripts for Photoshop can be created and edited with a text editor or with Adobe's development environment, called Adobe ExtendScript Toolkit.

Install the TinyPNG plugin and you will be ready to go. A new menu option will appear in Photoshop from where you can preview, select a folder and save your compressed images.

A script has a.jsx extension and should start with the line #target photoshop. # target photoshop alert ( 'Hello world!' ); You can run this script by saving it to hello.jsx and then double-clicking on the file. You will be prompted to confirm you want to run it in Photoshop. You can also run it by dragging the file directly to Photoshop.

This will work in Mac OS X as well as Windows. The scripts are written in JavaScript and have access to Photoshop's built-in functionality as well as plugins that support scripting. Adobe has an API reference and documentation about on their website. Figuring out how to script a Photoshop feature Most Photoshop features can be scripted, but how to write the correct code isn't always straightforward. By installing Adobe's Scripting Listener plugin we can record the exact code that is necessary to perform a certain operation. You can download it from Adobe's documentation page.

Plug-insDownload

Copy it to Photoshop's Plug-ins folder, then restart Photoshop. Now we execute the actions that we want to use in our script. In this case we want to use the TinyPNG plugin for Photoshop. Therefore we open a PNG file and compress it with TinyPNG. The file locations do not matter, because we can easily change them later. With the Scripting Listener plugin installed, the sequence of steps necessary to these actions will be recorded to a file called ScriptingListenerJS.log on the desktop.

The result looks like this. // ======================================================= var idOpn = charIDToTypeID ( 'Opn ' ); var desc1 = new ActionDescriptor (); var idnull = charIDToTypeID ( 'null' ); desc1. PutPath ( idnull, new File ( '/Users/rolftimmermans/Desktop/example.png' ) ); executeAction ( idOpn, desc1, DialogModes. NO ); // ======================================================= var idExpr = charIDToTypeID ( 'Expr' ); var desc2 = new ActionDescriptor (); var idUsng = charIDToTypeID ( 'Usng' ); var desc3 = new ActionDescriptor (); var idIn = charIDToTypeID ( 'In ' ); desc3.

PutPath ( idIn, new File ( '/Users/rolftimmermans/Desktop' ) ); var idtinY = charIDToTypeID ( 'tinY' ); desc2. PutObject ( idUsng, idtinY, desc3 ); executeAction ( idExpr, desc2, DialogModes. NO ); We are only interested in the second half. It describes precisely which steps are needed in order to script the TinyPNG plugin. It will contain many calls to charIDToTypeID with arguments consisting of four characters. These four-character codes are the internal identifiers of the Photoshop operations and the settings that we intend to automate. After recording we immediately remove the Scripting Listener plugin again, because otherwise it would keep recording everything!