It is currently Mon Apr 15, 2024 7:46 am


All times are UTC - 5 hours [ DST ]


Switch to mobile style

Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Import (exported) SVG Path with load methods Script for GIMP
PostPosted: Thu Oct 13, 2016 6:36 pm  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
with pointers from ofnuts.
I give you relative loading methods for loading an (exported) .svg path.
which are RELATIVE (percentage), RELATIVE WIDTH KEEP ASPECT RATIO, RELATIVE HEIGHT KEEP ASPECT RATIO in additional to ABSOLUTE(pixels) which is the same as existing "Import..."
Right click a path (you have to have at least one path present even if it's just an empty path).
And choose "Import SVG Path with load method...."

Image download zipped .py file

more details...

_________________
TinT


Last edited by trandoductin on Wed Nov 28, 2018 12:58 pm, edited 2 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Import (exported) SVG Path with load methods Script for GIMP
PostPosted: Fri Oct 14, 2016 3:08 am  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2418
Just the linux testing ;)

This is possibly more useful than the save-load plugin. This using a 'plain' svg from inkscape.
Attachment:
frominkscape.jpg
frominkscape.jpg [ 78.82 KiB | Viewed 4474 times ]


A bit of a jumble on the canvas, but in the paths dialogue
imported absolute (selected and filled)
imported relative (stroked path)
imported keep aspect

There is that information pop-up, not a problem, but could it be suppressed.
Still needs an existing path. Just a node does.

A quick try in a Gimp 2.9, no warnings, which is a good sign.

_________________
Image


Top
 Post subject: Re: Import (exported) SVG Path with load methods Script for GIMP
PostPosted: Fri Oct 14, 2016 4:49 am  (#3) 
Offline
GimpChat Member

Joined: Sep 20, 2016
Posts: 293
I still dont understand the purpose of this script.
Checked the previous threads, but still not clear.

Installed the plug-in and tried it, but i dont get it.

Is this about scaling ?

What does ABSOLUTE(pixels) mean ?
Is it canvas-size ?


Top
 Post subject: Re: Import (exported) SVG Path with load methods Script for GIMP
PostPosted: Fri Oct 14, 2016 12:17 pm  (#4) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
ABSOLUTE (pixels) - for example if a a path was 10x20 rectangle path on a 50x50 image at time of export. When import using this method the path will be 10x20 rectangle doesn't matter what your current image size is. It doesn't scale anything at all.

RELATIVE (percentage) will scale based on your current image's width and height.
RELATIVE WIDTH KEEP ASPECT RATIO - will scale based on your current image's width but keeping aspect ratio. (so if for example the path was exported a perfect circle, the imported path would still be a circle because it's keeping aspect ratio).
RELATIVE HEIGHT KEEP ASPECT RATIO - will scale based on your current image's height but keeping aspect ratio.

_________________
TinT


Top
 Post subject: Re: Import (exported) SVG Path with load methods Script for GIMP
PostPosted: Fri Oct 14, 2016 12:19 pm  (#5) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
rich2005 wrote:
Just the linux testing ;)

This is possibly more useful than the save-load plugin. This using a 'plain' svg from inkscape.
Attachment:
frominkscape.jpg


A bit of a jumble on the canvas, but in the paths dialogue
imported absolute (selected and filled)
imported relative (stroked path)
imported keep aspect

There is that information pop-up, not a problem, but could it be suppressed.
Still needs an existing path. Just a node does.

A quick try in a Gimp 2.9, no warnings, which is a good sign.


:oops: I left a debug statement in there. will remove it soon.

Edit: debug message removed (release 2) (updated download link)

_________________
TinT


Top
 Post subject: Re: Import (exported) SVG Path with load methods Script for GIMP
PostPosted: Thu Nov 17, 2016 4:36 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2238
Location: Poland
This option was planned to solve - is it possible to add the option for selection?
When the selection exist the result is unpredictable....

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: Import (exported) SVG Path with load methods Script for GIMP
PostPosted: Thu Nov 17, 2016 1:31 pm  (#7) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
it works on selection, as long as you select a relative method as absolute only uses the top left corner of selection, it doesn't scale according to selection bounding box (because it's absolute). Relative methods work.
Make sure you have latest version (2).

_________________
TinT


Top
 Post subject: Re: Import (exported) SVG Path with load methods Script for GIMP
PostPosted: Thu Nov 17, 2016 3:29 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Mar 16, 2015
Posts: 613
Location: On Earth,specifically Queensland,Australia
Image Tran this is a fantastic plugin. :hi5 :tyspin

_________________
Image


Top
 Post subject: Re: Import (exported) SVG Path with load methods Script for GIMP
PostPosted: Thu Nov 17, 2016 4:20 pm  (#9) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
Interestingly, if you don't pay attention to your path selection size in whatever SVG program you're using, the path could be totally off the grid or invisible in GIMP because it lies outside or beyond the background layer's parameters.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts script to load text file and create text layer

6

No new posts Exported PNG pixelated

10

No new posts Attachment(s) Exported Image Resolution

4

No new posts Attachment(s) 300ppi automatically changes to 72ppi when exported

3

No new posts Attachment(s) Gimp curves import

2



* Login  



Powered by phpBB3 © phpBB Group