0
0

More than 1 year has passed since last update.

vistaでillustrator その7

Posted at

概要

vistaでillustratorやってみる。
アートボード作って、jpg読んで、png出力してみた。

写真

ill6.png

サンプルコード


var docRef = documents.add(DocumentColorSpace.RGB, 800, 800);
var jpgFilePath = "/Users/ore/eki.jpg"
var rasterFile = File(jpgFilePath);
var myPlacedItem = docRef.placedItems.add();
myPlacedItem.file = rasterFile;
myPlacedItem.position = Array(0, docRef.height);
myPlacedItem.embed();
var pngOpt = new ExportOptionsPNG24();
pngOpt.artBoardClipping = true;
var filePath = new File("/Users/ore/ill6.png");
activeDocument.exportFile(filePath, ExportType.PNG24, pngOpt);
alert("ok");




以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0