How to apply stroke property to the image frame in illustrator.

New Here ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

Hi all, how can we write a script to apply stroke property to the image frame in illustrator.?can anyone please help me. There is no stroke property in illustrator. 

TOPICS
Scripting

Views

210

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

I'm not sure if this is what you are looking for (it's not a script) but you could create a Graphic Style and apply it to an image. See screenshot.

 

You will need to add a new stroke in the Appearance panel, then add an effect to that stroke by choosing the new stroke, then , fx > Convert to Shape > Rectangle. Set as shown in the screenshot. Once you have an appearance you like, save it as a Graphic Stlye by opening the GS panel and with the image selected, click the plus button to save the style so that you can apply it to other images.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

Thank you for the reply. But I'm asking how to write a code for applying stroke color and weight on image frame in illustrator. How can we implement stroke property in image frame on illustrator. Because in illustrator image frame has no stroke property. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

Illustrator doesn’t have image “frames” in the InDesign sense. Create a new path with the same size and position as the image’s bounds, and stroke that.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

Thank you. But I've place the image on illustrator I want to apply stroke for that image. Could you please share the code for that. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 12, 2022 Feb 12, 2022

Copy link to clipboard

Copied

Bonjour Abpujar,

Il faudrait au moins expliquer quel est votre projet.

Les propriétés du cadre de l'image sont: (origine des règles en haut à gauche)

cadre.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

hi thank you for the response, I've placed the image in indesign and applied strokes and fill color to that image. Now i'm trying to write a script to recreate that image in illustrator through the code. now i'm able to recreate the image in illustrator but the strokes and fill colors are not recreating . only the image will be recreated. can you help to recreate the image along with stroke and fill color. 

Left Image- illustrator

Right image - indesign

IMG_20220214_153305.jpg

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

Would a Graphic Style combined with an Action or Script that applies the Graphic Style be sufficient?

Apply a stroke to the image and use the Effect > Path > Outline Object on the stroke.

Image stroked.png

 

 

 

 

 

 

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

Thank you for the reply. We can manually apply strokes to image in illustrator using mask or rectangular tool. But my question is, I had placed the image and applied strokes and fill color to that image in indesign. And I want to recreate that same image in illustrator. I can able to recreate the image but the strokes and fill color is not recreating along with the image.. Can you help me to write a script to Appling strokes and fill color to that placed image. The image placed in indesign should be recreate as it is in illustrator. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

You can also copy from InDesign and Paste in Illustrator.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

No we can't copy the indesign script to illustrator I guess. Because The property will be different. In indesign we are using image frame to place the image. But in illustrator there is no image frame here We can directly place the image.please let meknow how to write script to apply strokes to the placed image in illustrator. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 14, 2022 Feb 14, 2022

Copy link to clipboard

Copied

LATEST

Sorry, I am afraid I don't understand your workflow. Clicking a script is as fast as clicking a Graphic Style.

Unless you want to add a border unattended to thousands of images.

I can than even imagine a batch action in Photoshop that can add a border and be applied to a folder of images

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines