Skip to main content
Participant
November 21, 2023
Frage

Modify “Copy to SVG” script in Photoshop

  • November 21, 2023
  • 1 Antwort
  • 269 Ansichten

Looking to modify the output of "Copy to SVG" to have relative positions to it's parent folder instead of absolute.

I  want to keep the image name to retain what it's named in PS and not what is currently in "xlink:href=" and have it save to a txt file.

 

Has anyone done this already or have a script that does something similar? I've attached the original script.

 

Current output:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="2000" height="3500" viewBox="0 0 2000 3500">
<defs>
<clipPath id="clip-Canvas">
<rect width="2000" height="3500"/>
</clipPath>
</defs>
<g id="Canvas" clip-path="url(#clip-Canvas)">
<rect width="2000" height="3500" fill="rgba(0,0,0,0)"/>
<g id="A1100_MCE_1_2">
<g id="A1100_MCE_TXT">
<image id="A1100BCKFUL" width="1394" height="3216" transform="translate(444 149)" xlink:href="Canvas-image.png"/>
</g>
<g id="A1100_MCE_2">
<image id="A1100CBL0200" width="1382" height="2369" transform="translate(446 826)" xlink:href="Canvas-image2.png"/>
</g>
<g id="A1100_MCE_1">
<image id="A1100CBL0100" width="1382" height="2369" transform="translate(446 826)" xlink:href="Canvas-image3.png"/>
</g>
<g id="A3200_LWR_PNL">
<g id="A3200_CBL_J1">
<g id="A3200_CBL_J1_ON">
<image id="A3200CBL0100" width="190" height="218" transform="translate(844 2886)" xlink:href="Canvas-image4.png"/>
</g>
<g id="A3200_CBL_J1_OFF">
<image id="A3200CBL0101" width="92" height="132" transform="translate(943 2972)" xlink:href="Canvas-image5.png"/>
</g>
</g>
<g id="A3200_CBL_J2">
<g id="A3200_CBL_J2_ON">
<image id="A3200CBL0200" width="193" height="222" transform="translate(1007 2882)" xlink:href="Canvas-image6.png"/>
</g>
<g id="A3200_CBL_J2_OFF">
<image id="A3200CBL0201" width="114" height="129" transform="translate(1088 2975)" xlink:href="Canvas-image7.png"/>
</g>
</g>
</g>
</g>
</g>
</svg>

 

 

Dieses Thema wurde für Antworten geschlossen.

1 Antwort

jane-e
Community Expert
Community Expert
November 21, 2023

@NomisFromCanada 

 

Moved to Photoshop > Scripting

 

BTW, export to SVG format was discontinued in Photoshop 22.5 in 2021. SVG is vector and is best Saved from Adobe Illustrator.

 

Jane