PDA

View Full Version : illustrator javascript to convert images to transparant negatif gif



Yammaski
03-18-2010, 06:37 PM
I have over 1000 ai vector images (compound paths) that I need to convert to transparant "negatif" gif's.
The largest size of each (can be the width or the height) is 300 px.
A rectangle must be created with a width of 440 px and the height must become 102% of the existing image. This rectangle is to make the image negatif.
This transparant gif will be used in combination with different (background-)colors, so it looks like the imagecolor changes.

STEPS :

* open ai vector image
* set color to RGB
* scale uniform 70%
* add rectangle centered to page :
stroke=none
width=440 px
height=102% of opened image
* set fill color image and rectangle : #E6E6E6
* align image and rectangle horizontal & vertical
* select all
* make compound path
* save as transparant .gif

I can create actions in illustrator, but the difficult step is to make the rectangle 102% of the image, which is variable.

ORIGINAL :
http://www.frogstyling.be/X_Tests/baby%2015.gif

GOAL :
http://www.frogstyling.be/X_Tests/baby%2015_AI.png

djr33
03-19-2010, 05:20 AM
I'm not sure why this is a Javascript question.

Create an action that does all of those things. For the percent change, do exactly that: record the action of changing it based on "102%" width and that will be relative to its size.
If you aren't sure what to do about wide vs. tall images, then I suggest you just manually separate the images because that's difficult.

Is AI now allowing Javascript in the actions? I wouldn't know about the newest versions and I've only made actions in PS, but that seems a bit beyond what is possible (as far as I remember).

You could of course create an action that rotates the image 90% prior to doing any of this so that you would save yourself some time and be able to use a single action to modify all of the images, if that helps.