Skip to content

Instantly share code, notes, and snippets.

View michaelchaize's full-sized avatar

Michael Chaize michaelchaize

  • InVision
  • San Francisco, USA
  • X @mchaize
View GitHub Profile
@michaelchaize
michaelchaize / LayerPNG24.jsx
Created May 31, 2013 14:59
This is the JavaScript code used to control Photoshop. It exports the selected layer to a transparent PNG file.
#target photoshop
// EXPORT PNG 24 TRANSPARENT
// Function to launch the "Layer > Rasterize > with style"
// Produced with the JavaScript listener
function raterizeLayerStyle(){
var idrasterizeLayer = stringIDToTypeID( "rasterizeLayer" );
var desc5 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
<!DOCTYPE html>
<html>
<head>
<title>DEMO APPLICATION</title>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Access-Control-Allow-Origin" content="*"/>
<link rel="stylesheet" href="css/jquery.mobile-1.1.0.css" />
<link rel="stylesheet" href="css/style.css" />
<!-- we will use cordova to package the mobile application-->
<script src="js/vendor/phoneGap/cordova-1.6.0.js"></script>