It is currently Mon Nov 23, 2026 9:34 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Map Transform - using Template
PostPosted: Fri Dec 29, 2023 8:12 am  (#1) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4561
Location: Canada
You know how map object does different kinds of maps.
I thought what if people could create templates that define how to do a collection of perspective transforms using paths.
Then it allows for others to use their own image and apply to the template.
For example:
Image
Here I have an active vectors/path named 'original' (It's important that this is active [it doens't have to be named 'original' just has to be active layer] for the plug-in to work properly telling it that's the original so don't do any work on it but use it as reference or to select the area to be transformed)

Also it's important that this path is a 4 point path starting in the top left corner and going clock-wise.

It'll then loop through all other paths which I created by duplicating the 'original' path and then manually moving the points around to define my transforms and apply the perspective transform using the defined path. It's like making a collage out of different 4 pointed shapes.

Then select the layer that you want to use as transformations to make it active. In my case i selected the layer that contained the leopard with the side-way white T.

Then run plug-in.

And you'll get something like this:
Image

Here's the .xcf for my example that you can run plug-in on (or change the content of the active layer to map your own texture).
Attachment:
vitruvian-man.xcf [3.2 MiB]
Downloaded 82 times


Here's the Plug-in Code below (Plug-in will be available under /Python-Fu/Map Transform...):
#!/usr/bin/env python
# map-transform.py
# Created by TT
#
# License: GPLv3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# To view a copy of the GNU General Public License
# visit: http://www.gnu.org/licenses/gpl.html
#
#
# ------------
#| Change Log |
# ------------
# Rel 1: Initial release

from gimpfu import *
import random
import math
def get4Points(vectors):
   num_strokes,stroke_ids = pdb.gimp_vectors_get_strokes(vectors)
   #gets first stroke, assuming it has 4 points
   _type,num_points,controlpoints,closed = pdb.gimp_vectors_stroke_get_points(vectors,stroke_ids[0])
   #get 4 points
   fourpoints = []
   i = 1 #first point is at index 1 because control points are indexed 0,1,2 then 3,4,5 then 6,7,8 then 9,10,11
   for l in range(0,4):
      index = i*2 #because it's x and y index so we jump by 2
      fourpoints = fourpoints + [controlpoints[index],controlpoints[index+1]] #[x,y]
      i += 3 #jump by 3 controlpoints at a time
   #fourpoints should now contain 8 items (4 * [x,y])
   
   #we will swap the last two points because we're dealing with perspective transform so it doesn't go around
   #the square but it jumps from left to right corners.
   tempx = fourpoints[4]
   tempy = fourpoints[5]
   fourpoints[4] = fourpoints[6]
   fourpoints[5] = fourpoints[7]
   fourpoints[6] = tempx
   fourpoints[7] = tempy
   return fourpoints
def python_map_transform(image, layer):
   # pdb.gimp_image_undo_group_start(image)
   # pdb.gimp_context_push()
   #YOUR CODE BEGINS=======================
   ovectors = pdb.gimp_image_get_active_vectors(image) #original vector
   #pdb.gimp_message(ovectors.name)
   for v in image.vectors:
      if v.name != ovectors.name: #if the name is different from original vector, we do work on it
         layer_copy = pdb.gimp_layer_copy(layer,TRUE) #copy layer with TRUE alpha channel
         pdb.gimp_image_insert_layer(image,layer_copy,None,0)
         pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,ovectors) #select the original vector area to apply perspective to.
         fourpoints = get4Points(v) #get the 4 points to use as perpective transform
         transform_item = pdb.gimp_item_transform_perspective(layer_copy,*fourpoints) # *fourpoints is to unpack the array and passing it in as parameters
         pdb.gimp_floating_sel_anchor(transform_item) #anchors the transform floating selection so that it's a layer
   #pdb.gimp_message(get4Points(ovectors))

   #YOUR CODE ENDS ========================
   # pdb.gimp_context_pop()
   # pdb.gimp_image_undo_group_end(image)
   pdb.gimp_displays_flush()

    #return

register(
   "python_fu_map_transform",
   "Perspective Transforms Using Paths",
   "Perspective Transforms Using Paths",
   "TT",
   "TT",
   "2023.12.29",
   "<Image>/Python-Fu/Map Transform...",
   "*",      # Create a new image, don't work on an existing one
   [
   #INPUT BEGINS
   #INPUT ENDS
   ],
   [],
   python_map_transform)

main()

#           (PF_INT, "p0", "_INT:", 0), # PF_INT8, PF_INT16, PF_INT32  similar but no difference in Python.
#           (PF_FLOAT, "p02", "_FLOAT:", 3.141),
#           (PF_STRING, "p03", "_STRING:", "foo"),  # alias PF_VALUE
#           (PF_TEXT, "p04", "TEXT:", "bar"),
#           # PF_VALUE
#           # Pick one from set of choices
#           (PF_OPTION,"p1",   "OPTION:", 0, ["0th","1st","2nd"]), # initially 0th is choice
#           (PF_RADIO, "p16", "RADIO:", 0, (("0th", 1),("1st",0))), # note bool indicates initial setting of buttons
#           # PF_RADIO is usually called a radio button group.
#           # SLIDER, ADJUSTMENT types require the extra parameter of the form (min, max, step).
#           (PF_TOGGLE, "p2",   "TOGGLE:", 1), # initially True, checked.  Alias PF_BOOL
#           # PF_TOGGLE is usually called a checkbox.
#           (PF_SLIDER, "p3", "SLIDER:", 0, (0, 100, 10)),
#           (PF_SPINNER, "p4", "SPINNER:", 21, (1, 1000, 50)),  # alias PF_ADJUSTMENT
#           # Pickers ie combo boxes ie choosers from lists of existing Gimp objects
#           (PF_COLOR, "p14", "_COLOR:", (100, 21, 40) ), # extra param is RGB triple
#           # PF_COLOUR is an alias by aussie PyGimp author lol
#           (PF_IMAGE, "p15", "IMAGE:", None), # should be type gimp.image, but None works
#           (PF_FONT, "p17", "FONT:", 0),
#           (PF_FILE, "p18", "FILE:", 0),
#           (PF_BRUSH, "p19", "BRUSH:", 0),
#           (PF_PATTERN, "p20", "PATTERN:", 0),
#           (PF_GRADIENT, "p21", "GRADIENT:", 0),
#           (PF_PALETTE, "p22", "PALETTE:", 0),
#           (PF_LAYER, "p23", "LAYER:", None),
#           (PF_CHANNEL, "p24", "CHANNEL:", None),  # ??? Usually empty, I don't know why.
#           (PF_DRAWABLE, "p25", "DRAWABLE:", None),
#           # Mostly undocumented, but work
#           (PF_VECTORS, "p26", "VECTORS:", None),
#           (PF_FILENAME, "p27", "FILENAME:", 0),
#           (PF_DIRNAME, "p28", "DIRNAME:", 0)
#           # PF_REGION might work but probably of little use.  See gimpfu.py.

_________________
Image
Visualize your and others dreams coming true.


Last edited by trandoductin on Fri Dec 29, 2023 8:26 am, edited 1 time 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: Map Transform - using Template
PostPosted: Fri Dec 29, 2023 8:15 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Mar 23, 2012
Posts: 7388
Location: Göteborg at last!
WOW you're good! Thank you.


Top
 Post subject: Re: Map Transform - using Template
PostPosted: Fri Dec 29, 2023 8:17 am  (#3) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4561
Location: Canada
Here's another sample using the above .xcf circular texture that fit within the 'original' (4-point) vector.
Image

_________________
Image
Visualize your and others dreams coming true.


Top
 Post subject: Re: Map Transform - using Template
PostPosted: Fri Dec 29, 2023 8:28 am  (#4) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4561
Location: Canada
Erisian wrote:
WOW you're good! Thank you.

Thanks, my hope is that we can share templates and have some fun :D

_________________
Image
Visualize your and others dreams coming true.


Top
 Post subject: Re: Map Transform - using Template
PostPosted: Wed Jan 24, 2024 11:20 am  (#5) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4561
Location: Canada
here's updated version that allows you to draw your other paths in the same path
Image
other than the 'original' active path.
#!/usr/bin/env python
# map-transform.py
# Created by TT
#
# License: GPLv3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# To view a copy of the GNU General Public License
# visit: http://www.gnu.org/licenses/gpl.html
#
#
# ------------
#| Change Log |
# ------------
# Rel 1: Initial release

from gimpfu import *
import random
import math
def get4Points(vectors):
   num_strokes,stroke_ids = pdb.gimp_vectors_get_strokes(vectors)
   #gets first stroke, assuming it has 4 points
   controlpoints = []
   num_points = 0
   for z in range(0,num_strokes):
      _type,nps,cps,closed = pdb.gimp_vectors_stroke_get_points(vectors,stroke_ids[z])
      controlpoints = controlpoints + list(cps)
   num_points = len(controlpoints)
   #get 4 points
   farray = []
   for p in range(0,num_points/24):
      fourpoints = []
      i = 1 #first point is at index 1 because control points are indexed 0,1,2 then 3,4,5 then 6,7,8 then 9,10,11
      for l in range(0,4):
         index = i*2+(p*24) #because it's x and y index so we jump by 2
         fourpoints = fourpoints + [controlpoints[index],controlpoints[index+1]] #[x,y]
         i += 3 #jump by 3 controlpoints at a time
   
      #we will swap the last two points because we're dealing with perspective transform so it doesn't go around
      #the square but it jumps from left to right corners.
      tempx = fourpoints[4]
      tempy = fourpoints[5]
      fourpoints[4] = fourpoints[6]
      fourpoints[5] = fourpoints[7]
      fourpoints[6] = tempx
      fourpoints[7] = tempy
      farray.append(fourpoints)
   return farray
def python_map_transform(image, layer):
   pdb.gimp_image_undo_group_start(image)
   # pdb.gimp_context_push()
   #YOUR CODE BEGINS=======================
   ovectors = pdb.gimp_image_get_active_vectors(image) #original vector
   #pdb.gimp_message(ovectors.name)
   for v in image.vectors:
      if v.name != ovectors.name: #if the name is different from original vector, we do work on it
         farray = get4Points(v) #get the 4 points to use as perpective transform
         for p2 in range(0,len(farray)):
            fourpoints = farray[p2]
            layer_copy = pdb.gimp_layer_copy(layer,TRUE) #copy layer with TRUE alpha channel
            pdb.gimp_image_insert_layer(image,layer_copy,None,0)
            pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,ovectors) #select the original vector area to apply perspective to.
            transform_item = pdb.gimp_item_transform_perspective(layer_copy,*fourpoints) # *fourpoints is to unpack the array and passing it in as parameters
            pdb.gimp_floating_sel_anchor(transform_item) #anchors the transform floating selection so that it's a layer
   #pdb.gimp_message(get4Points(ovectors))

   #YOUR CODE ENDS ========================
   # pdb.gimp_context_pop()
   pdb.gimp_image_undo_group_end(image)
   pdb.gimp_displays_flush()

    #return

register(
   "python_fu_map_transform",
   "Perspective Transforms Using Paths",
   "Perspective Transforms Using Paths",
   "TT",
   "TT",
   "2023.12.29",
   "<Image>/Python-Fu/Map Transform...",
   "*",      # Create a new image, don't work on an existing one
   [
   #INPUT BEGINS
   #INPUT ENDS
   ],
   [],
   python_map_transform)

main()

#           (PF_INT, "p0", "_INT:", 0), # PF_INT8, PF_INT16, PF_INT32  similar but no difference in Python.
#           (PF_FLOAT, "p02", "_FLOAT:", 3.141),
#           (PF_STRING, "p03", "_STRING:", "foo"),  # alias PF_VALUE
#           (PF_TEXT, "p04", "TEXT:", "bar"),
#           # PF_VALUE
#           # Pick one from set of choices
#           (PF_OPTION,"p1",   "OPTION:", 0, ["0th","1st","2nd"]), # initially 0th is choice
#           (PF_RADIO, "p16", "RADIO:", 0, (("0th", 1),("1st",0))), # note bool indicates initial setting of buttons
#           # PF_RADIO is usually called a radio button group.
#           # SLIDER, ADJUSTMENT types require the extra parameter of the form (min, max, step).
#           (PF_TOGGLE, "p2",   "TOGGLE:", 1), # initially True, checked.  Alias PF_BOOL
#           # PF_TOGGLE is usually called a checkbox.
#           (PF_SLIDER, "p3", "SLIDER:", 0, (0, 100, 10)),
#           (PF_SPINNER, "p4", "SPINNER:", 21, (1, 1000, 50)),  # alias PF_ADJUSTMENT
#           # Pickers ie combo boxes ie choosers from lists of existing Gimp objects
#           (PF_COLOR, "p14", "_COLOR:", (100, 21, 40) ), # extra param is RGB triple
#           # PF_COLOUR is an alias by aussie PyGimp author lol
#           (PF_IMAGE, "p15", "IMAGE:", None), # should be type gimp.image, but None works
#           (PF_FONT, "p17", "FONT:", 0),
#           (PF_FILE, "p18", "FILE:", 0),
#           (PF_BRUSH, "p19", "BRUSH:", 0),
#           (PF_PATTERN, "p20", "PATTERN:", 0),
#           (PF_GRADIENT, "p21", "GRADIENT:", 0),
#           (PF_PALETTE, "p22", "PALETTE:", 0),
#           (PF_LAYER, "p23", "LAYER:", None),
#           (PF_CHANNEL, "p24", "CHANNEL:", None),  # ??? Usually empty, I don't know why.
#           (PF_DRAWABLE, "p25", "DRAWABLE:", None),
#           # Mostly undocumented, but work
#           (PF_VECTORS, "p26", "VECTORS:", None),
#           (PF_FILENAME, "p27", "FILENAME:", 0),
#           (PF_DIRNAME, "p28", "DIRNAME:", 0)
#           # PF_REGION might work but probably of little use.  See gimpfu.py.


Attachments:
brick-wall-template2.xcf [2.07 MiB]
Downloaded 72 times

_________________
Image
Visualize your and others dreams coming true.
Top
 Post subject: Re: Map Transform - using Template
PostPosted: Wed Jan 24, 2024 2:10 pm  (#6) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4561
Location: Canada
another template that I made
Image


Attachments:
namoamidabuddhapeople.xcf [2.64 MiB]
Downloaded 75 times

_________________
Image
Visualize your and others dreams coming true.
Top
 Post subject: Re: Map Transform - using Template
PostPosted: Thu Jan 25, 2024 9:13 am  (#7) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4561
Location: Canada
This version only uses 2 points each [rectangle] because I only needed rectangle for this one.
Don't need original, it's driven from active layer's width and height (so your active layer should only contain what you want scaled).
#!/usr/bin/env python
# map-transform2.py
# Created by TT
#
# License: GPLv3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# To view a copy of the GNU General Public License
# visit: http://www.gnu.org/licenses/gpl.html
#
#
# ------------
#| Change Log |
# ------------
# Rel 1: Initial release

from gimpfu import *
import random
import math
def get2Points(vectors,w,h):
   num_strokes,stroke_ids = pdb.gimp_vectors_get_strokes(vectors)
   controlpoints = []
   num_points = 0
   for z in range(0,num_strokes):
      _type,nps,cps,closed = pdb.gimp_vectors_stroke_get_points(vectors,stroke_ids[z])
      controlpoints = controlpoints + list(cps)
   num_points = len(controlpoints)
   farray = []
   
   for p in range(0,num_points/12):
      fourpoints = []
      i = 1 #first point is at index 1 because control points are indexed 0,1,2 then 3,4,5 then 6,7,8 then 9,10,11
      for l in range(0,2):
         index = i*2+(p*12) #because it's x and y index so we jump by 2
         fourpoints = fourpoints + [controlpoints[index],controlpoints[index+1]] #[x,y]
         i += 3 #jump by 3 controlpoints at a time
   
      fourpoints2 = [0,0,0,0,0,0,0,0]
      newheight = fourpoints[3]-fourpoints[1]; #get new height
      #set y
      fourpoints2[1] = fourpoints[1];
      fourpoints2[3] = fourpoints[1];
      fourpoints2[5] = fourpoints[3];
      fourpoints2[7] = fourpoints[3];
      newwidth = newheight*w/h
      #set x
      fourpoints2[0] = fourpoints[0]-newwidth/2;
      fourpoints2[2] = fourpoints[0]+newwidth/2;
      fourpoints2[4] = fourpoints[2]-newwidth/2;
      fourpoints2[6] = fourpoints[2]+newwidth/2;
      farray.append(fourpoints2)
   return farray
def python_map_transform(image,layer):
   pdb.gimp_image_undo_group_start(image)
   # pdb.gimp_context_push()
   #YOUR CODE BEGINS=======================
   for v in image.vectors:
      farray = get2Points(v,layer.width,layer.height) #get the 4 points to use as perpective transform
      for p2 in range(0,len(farray)):
         fourpoints = farray[p2]
         layer_copy = pdb.gimp_layer_copy(layer,TRUE) #copy layer with TRUE alpha channel
         pdb.gimp_image_insert_layer(image,layer_copy,None,0)
         pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,layer_copy) #select the original vector area to apply perspective to.
         transform_item = pdb.gimp_item_transform_perspective(layer_copy,*fourpoints) # *fourpoints is to unpack the array and passing it in as parameters
         pdb.gimp_floating_sel_to_layer(transform_item) #anchors the transform floating selection so that it's a layer
         pdb.gimp_image_remove_layer(image,layer_copy)
   #pdb.gimp_message(get4Points(ovectors))
   #YOUR CODE ENDS ========================
   # pdb.gimp_context_pop()
   pdb.gimp_image_undo_group_end(image)
   pdb.gimp_displays_flush()

register(
   "python_fu_map_transform2",
   "Perspective Transforms Using Paths 2 Points based on active layer.width and layer.height",
   "Perspective Transforms Using Paths 2 Points based on active layer.width and layer.height",
   "TT",
   "TT",
   "2024.1.25",
   "<Image>/Python-Fu/Map Transform 2 Points...",
   "*",      # Create a new image, don't work on an existing one
   [
   #INPUT BEGINS
   #INPUT ENDS
   ],
   [],
   python_map_transform)

main()

#           (PF_INT, "p0", "_INT:", 0), # PF_INT8, PF_INT16, PF_INT32  similar but no difference in Python.
#           (PF_FLOAT, "p02", "_FLOAT:", 3.141),
#           (PF_STRING, "p03", "_STRING:", "foo"),  # alias PF_VALUE
#           (PF_TEXT, "p04", "TEXT:", "bar"),
#           # PF_VALUE
#           # Pick one from set of choices
#           (PF_OPTION,"p1",   "OPTION:", 0, ["0th","1st","2nd"]), # initially 0th is choice
#           (PF_RADIO, "p16", "RADIO:", 0, (("0th", 1),("1st",0))), # note bool indicates initial setting of buttons
#           # PF_RADIO is usually called a radio button group.
#           # SLIDER, ADJUSTMENT types require the extra parameter of the form (min, max, step).
#           (PF_TOGGLE, "p2",   "TOGGLE:", 1), # initially True, checked.  Alias PF_BOOL
#           # PF_TOGGLE is usually called a checkbox.
#           (PF_SLIDER, "p3", "SLIDER:", 0, (0, 100, 10)),
#           (PF_SPINNER, "p4", "SPINNER:", 21, (1, 1000, 50)),  # alias PF_ADJUSTMENT
#           # Pickers ie combo boxes ie choosers from lists of existing Gimp objects
#           (PF_COLOR, "p14", "_COLOR:", (100, 21, 40) ), # extra param is RGB triple
#           # PF_COLOUR is an alias by aussie PyGimp author lol
#           (PF_IMAGE, "p15", "IMAGE:", None), # should be type gimp.image, but None works
#           (PF_FONT, "p17", "FONT:", 0),
#           (PF_FILE, "p18", "FILE:", 0),
#           (PF_BRUSH, "p19", "BRUSH:", 0),
#           (PF_PATTERN, "p20", "PATTERN:", 0),
#           (PF_GRADIENT, "p21", "GRADIENT:", 0),
#           (PF_PALETTE, "p22", "PALETTE:", 0),
#           (PF_LAYER, "p23", "LAYER:", None),
#           (PF_CHANNEL, "p24", "CHANNEL:", None),  # ??? Usually empty, I don't know why.
#           (PF_DRAWABLE, "p25", "DRAWABLE:", None),
#           # Mostly undocumented, but work
#           (PF_VECTORS, "p26", "VECTORS:", None),
#           (PF_FILENAME, "p27", "FILENAME:", 0),
#           (PF_DIRNAME, "p28", "DIRNAME:", 0)
#           # PF_REGION might work but probably of little use.  See gimpfu.py.

Image

_________________
Image
Visualize your and others dreams coming true.


Top
 Post subject: Re: Map Transform - using Template
PostPosted: Sun Feb 25, 2024 9:17 pm  (#8) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4561
Location: Canada
Decided to make plug-in to take paths that are composed of many strokes.
I'll use "original" path to map to all other paths.
Have the layer you want to map active (and it'll hide it make it invisible once it's done mapping to paths).
Image
#!/usr/bin/env python
# map-transform.py
# Created by TT
#
# License: GPLv3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# To view a copy of the GNU General Public License
# visit: http://www.gnu.org/licenses/gpl.html
#
#
# ------------
#| Change Log |
# ------------
# Rel 1: Initial release

from gimpfu import *
import random
import math
def get4Points(vectors):
   num_strokes,stroke_ids = pdb.gimp_vectors_get_strokes(vectors)
   #gets first stroke, assuming it has 4 points
   _type,num_points,controlpoints,closed = pdb.gimp_vectors_stroke_get_points(vectors,stroke_ids[0])
   #get 4 points
   fourpoints = []
   i = 1 #first point is at index 1 because control points are indexed 0,1,2 then 3,4,5 then 6,7,8 then 9,10,11
   for l in range(0,4):
      index = i*2 #because it's x and y index so we jump by 2
      fourpoints = fourpoints + [controlpoints[index],controlpoints[index+1]] #[x,y]
      i += 3 #jump by 3 controlpoints at a time
   #fourpoints should now contain 8 items (4 * [x,y])
   
   #we will swap the last two points because we're dealing with perspective transform so it doesn't go around
   #the square but it jumps from left to right corners.
   tempx = fourpoints[4]
   tempy = fourpoints[5]
   fourpoints[4] = fourpoints[6]
   fourpoints[5] = fourpoints[7]
   fourpoints[6] = tempx
   fourpoints[7] = tempy
   return fourpoints
def get4MultiPoints(vectors):
   num_strokes,stroke_ids = pdb.gimp_vectors_get_strokes(vectors)
   #gets first stroke, assuming it has 4 points
   cp = []
   for i in range(0,len(stroke_ids)):
      _type,num_points,controlpoints,closed = pdb.gimp_vectors_stroke_get_points(vectors,stroke_ids[i])
      cp = cp + list(controlpoints)
   #get 4 points
   arrof4points = []
   #cp = controlpoints[:]
   paths = len(cp)/24
   for j in range(0,paths):
      controlpoints = cp[j*24:j*24+24] #every 24 coordinate which represents a 4 point path
      fourpoints = []
      i = 1 #first point is at index 1 because control points are indexed 0,1,2 then 3,4,5 then 6,7,8 then 9,10,11
      for l in range(0,4):
         index = i*2 #because it's x and y index so we jump by 2
         fourpoints = fourpoints + [controlpoints[index],controlpoints[index+1]] #[x,y]
         i += 3 #jump by 3 controlpoints at a time
      #fourpoints should now contain 8 items (4 * [x,y])
      #we will swap the last two points because we're dealing with perspective transform so it doesn't go around
      #the square but it jumps from left to right corners.
      tempx = fourpoints[4]
      tempy = fourpoints[5]
      fourpoints[4] = fourpoints[6]
      fourpoints[5] = fourpoints[7]
      fourpoints[6] = tempx
      fourpoints[7] = tempy
      arrof4points.append(fourpoints)

   return arrof4points
def python_map_transform(image, layer):
   # pdb.gimp_image_undo_group_start(image)
   # pdb.gimp_context_push()
   #YOUR CODE BEGINS=======================
   #ovectors = pdb.gimp_image_get_active_vectors(image) #original vector
   originallayername = "original"
   ovectors = pdb.gimp_image_get_vectors_by_name(image,originallayername)
   #pdb.gimp_message(ovectors.name)
   for v in image.vectors:
      if v.name != originallayername: #if the name is different from original vector, we do work on it
         arrpoints = get4MultiPoints(v) #get the 4 points to use as perpective transform
         pdb.gimp_message(arrpoints);
         for fourpoints in arrpoints:
            layer_copy = pdb.gimp_layer_copy(layer,TRUE) #copy layer with TRUE alpha channel
            pdb.gimp_image_insert_layer(image,layer_copy,None,0)
            pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,ovectors) #select the original vector area to apply perspective to.
            transform_item = pdb.gimp_item_transform_perspective(layer_copy,*fourpoints) # *fourpoints is to unpack the array and passing it in as parameters
            pdb.gimp_floating_sel_anchor(transform_item) #anchors the transform floating selection so that it's a layer
   pdb.gimp_item_set_visible(layer,FALSE)           
   #pdb.gimp_message(get4Points(ovectors))

   #YOUR CODE ENDS ========================
   # pdb.gimp_context_pop()
   # pdb.gimp_image_undo_group_end(image)
   pdb.gimp_displays_flush()

    #return

register(
   "python_fu_map_transform_1",
   "Perspective Transforms Using Paths",
   "Perspective Transforms Using Paths",
   "TT",
   "TT",
   "2023.12.29",
   "<Image>/Python-Fu/Map Transform 1...",
   "*",      # Create a new image, don't work on an existing one
   [
   #INPUT BEGINS
   #INPUT ENDS
   ],
   [],
   python_map_transform)

main()

#           (PF_INT, "p0", "_INT:", 0), # PF_INT8, PF_INT16, PF_INT32  similar but no difference in Python.
#           (PF_FLOAT, "p02", "_FLOAT:", 3.141),
#           (PF_STRING, "p03", "_STRING:", "foo"),  # alias PF_VALUE
#           (PF_TEXT, "p04", "TEXT:", "bar"),
#           # PF_VALUE
#           # Pick one from set of choices
#           (PF_OPTION,"p1",   "OPTION:", 0, ["0th","1st","2nd"]), # initially 0th is choice
#           (PF_RADIO, "p16", "RADIO:", 0, (("0th", 1),("1st",0))), # note bool indicates initial setting of buttons
#           # PF_RADIO is usually called a radio button group.
#           # SLIDER, ADJUSTMENT types require the extra parameter of the form (min, max, step).
#           (PF_TOGGLE, "p2",   "TOGGLE:", 1), # initially True, checked.  Alias PF_BOOL
#           # PF_TOGGLE is usually called a checkbox.
#           (PF_SLIDER, "p3", "SLIDER:", 0, (0, 100, 10)),
#           (PF_SPINNER, "p4", "SPINNER:", 21, (1, 1000, 50)),  # alias PF_ADJUSTMENT
#           # Pickers ie combo boxes ie choosers from lists of existing Gimp objects
#           (PF_COLOR, "p14", "_COLOR:", (100, 21, 40) ), # extra param is RGB triple
#           # PF_COLOUR is an alias by aussie PyGimp author lol
#           (PF_IMAGE, "p15", "IMAGE:", None), # should be type gimp.image, but None works
#           (PF_FONT, "p17", "FONT:", 0),
#           (PF_FILE, "p18", "FILE:", 0),
#           (PF_BRUSH, "p19", "BRUSH:", 0),
#           (PF_PATTERN, "p20", "PATTERN:", 0),
#           (PF_GRADIENT, "p21", "GRADIENT:", 0),
#           (PF_PALETTE, "p22", "PALETTE:", 0),
#           (PF_LAYER, "p23", "LAYER:", None),
#           (PF_CHANNEL, "p24", "CHANNEL:", None),  # ??? Usually empty, I don't know why.
#           (PF_DRAWABLE, "p25", "DRAWABLE:", None),
#           # Mostly undocumented, but work
#           (PF_VECTORS, "p26", "VECTORS:", None),
#           (PF_FILENAME, "p27", "FILENAME:", 0),
#           (PF_DIRNAME, "p28", "DIRNAME:", 0)
#           # PF_REGION might work but probably of little use.  See gimpfu.py.


Attachments:
vitruvian-man-2.xcf [2.66 MiB]
Downloaded 45 times

_________________
Image
Visualize your and others dreams coming true.
Top
 Post subject: Re: Map Transform - using Template
PostPosted: Sun Feb 25, 2024 9:49 pm  (#9) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4561
Location: Canada
I thought it would be run to use unsplash.com images to map to paths instead of same texture all the time.
Image
#!/usr/bin/env python
# map-transform.py
# Created by TT
#
# License: GPLv3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# To view a copy of the GNU General Public License
# visit: http://www.gnu.org/licenses/gpl.html
#
#
# ------------
#| Change Log |
# ------------
# Rel 1: Initial release
import requests

def download_image(url, save_path):
    response = requests.get(url)
    if response.status_code == 200:
        with open(save_path, 'wb') as f:
            f.write(response.content)
        print("Image downloaded successfully!")
    else:
        print("Failed to download image. Status code:", response.status_code)

from gimpfu import *
import random
import math
def get4Points(vectors):
   num_strokes,stroke_ids = pdb.gimp_vectors_get_strokes(vectors)
   #gets first stroke, assuming it has 4 points
   _type,num_points,controlpoints,closed = pdb.gimp_vectors_stroke_get_points(vectors,stroke_ids[0])
   #get 4 points
   fourpoints = []
   i = 1 #first point is at index 1 because control points are indexed 0,1,2 then 3,4,5 then 6,7,8 then 9,10,11
   for l in range(0,4):
      index = i*2 #because it's x and y index so we jump by 2
      fourpoints = fourpoints + [controlpoints[index],controlpoints[index+1]] #[x,y]
      i += 3 #jump by 3 controlpoints at a time
   #fourpoints should now contain 8 items (4 * [x,y])
   
   #we will swap the last two points because we're dealing with perspective transform so it doesn't go around
   #the square but it jumps from left to right corners.
   tempx = fourpoints[4]
   tempy = fourpoints[5]
   fourpoints[4] = fourpoints[6]
   fourpoints[5] = fourpoints[7]
   fourpoints[6] = tempx
   fourpoints[7] = tempy
   return fourpoints
def get4MultiPoints(vectors):
   num_strokes,stroke_ids = pdb.gimp_vectors_get_strokes(vectors)
   #gets first stroke, assuming it has 4 points
   cp = []
   for i in range(0,len(stroke_ids)):
      _type,num_points,controlpoints,closed = pdb.gimp_vectors_stroke_get_points(vectors,stroke_ids[i])
      cp = cp + list(controlpoints)
   #get 4 points
   arrof4points = []
   #cp = controlpoints[:]
   paths = len(cp)/24
   for j in range(0,paths):
      controlpoints = cp[j*24:j*24+24] #every 24 coordinate which represents a 4 point path
      fourpoints = []
      i = 1 #first point is at index 1 because control points are indexed 0,1,2 then 3,4,5 then 6,7,8 then 9,10,11
      for l in range(0,4):
         index = i*2 #because it's x and y index so we jump by 2
         fourpoints = fourpoints + [controlpoints[index],controlpoints[index+1]] #[x,y]
         i += 3 #jump by 3 controlpoints at a time
      #fourpoints should now contain 8 items (4 * [x,y])
      #we will swap the last two points because we're dealing with perspective transform so it doesn't go around
      #the square but it jumps from left to right corners.
      tempx = fourpoints[4]
      tempy = fourpoints[5]
      fourpoints[4] = fourpoints[6]
      fourpoints[5] = fourpoints[7]
      fourpoints[6] = tempx
      fourpoints[7] = tempy
      arrof4points.append(fourpoints)

   return arrof4points
def python_map_transform(image, layer):
   # pdb.gimp_image_undo_group_start(image)
   # pdb.gimp_context_push()
   #YOUR CODE BEGINS=======================
   #ovectors = pdb.gimp_image_get_active_vectors(image) #original vector
   originallayername = "original"
   ovectors = pdb.gimp_image_get_vectors_by_name(image,originallayername)
   #pdb.gimp_message(ovectors.name)
   ofourpoints = get4Points(ovectors)
   for v in image.vectors:
      if v.name != originallayername: #if the name is different from original vector, we do work on it
         arrpoints = get4MultiPoints(v) #get the 4 points to use as perpective transform
         #pdb.gimp_message(arrpoints);
         for fourpoints in arrpoints:
            url = "https://source.unsplash.com/800x800"
            save_path = "image.jpg"  # Provide the path where you want to save the image
            download_image(url, save_path)
            layer_copy = pdb.gimp_file_load_layer(image,save_path)
            #layer_copy = pdb.gimp_layer_copy(layer,TRUE) #copy layer with TRUE alpha channel
            pdb.gimp_image_insert_layer(image,layer_copy,None,0)
            pdb.gimp_layer_add_alpha(layer_copy) #add this so it's not filled with alpha background
            pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,layer_copy) #select the original vector area to apply perspective to.
            transform_item = pdb.gimp_item_transform_perspective(layer_copy,*ofourpoints) # *fourpoints is to unpack the array and passing it in as parameters           
            pdb.gimp_floating_sel_anchor(transform_item) #anchors the transform floating selection so that it's a layer
            pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,ovectors) #select the original vector area to apply perspective to.
            transform_item = pdb.gimp_item_transform_perspective(layer_copy,*fourpoints) # *fourpoints is to unpack the array and passing it in as parameters
            pdb.gimp_floating_sel_anchor(transform_item) #anchors the transform floating selection so that it's a layer
   pdb.gimp_item_set_visible(layer,FALSE)           
   #pdb.gimp_message(get4Points(ovectors))

   #YOUR CODE ENDS ========================
   # pdb.gimp_context_pop()
   # pdb.gimp_image_undo_group_end(image)
   pdb.gimp_displays_flush()

    #return

register(
   "python_fu_map_transform_1",
   "Perspective Transforms Using Paths",
   "Perspective Transforms Using Paths",
   "TT",
   "TT",
   "2023.12.29",
   "<Image>/Python-Fu/Map Transform 1...",
   "*",      # Create a new image, don't work on an existing one
   [
   #INPUT BEGINS
   #INPUT ENDS
   ],
   [],
   python_map_transform)

main()

#           (PF_INT, "p0", "_INT:", 0), # PF_INT8, PF_INT16, PF_INT32  similar but no difference in Python.
#           (PF_FLOAT, "p02", "_FLOAT:", 3.141),
#           (PF_STRING, "p03", "_STRING:", "foo"),  # alias PF_VALUE
#           (PF_TEXT, "p04", "TEXT:", "bar"),
#           # PF_VALUE
#           # Pick one from set of choices
#           (PF_OPTION,"p1",   "OPTION:", 0, ["0th","1st","2nd"]), # initially 0th is choice
#           (PF_RADIO, "p16", "RADIO:", 0, (("0th", 1),("1st",0))), # note bool indicates initial setting of buttons
#           # PF_RADIO is usually called a radio button group.
#           # SLIDER, ADJUSTMENT types require the extra parameter of the form (min, max, step).
#           (PF_TOGGLE, "p2",   "TOGGLE:", 1), # initially True, checked.  Alias PF_BOOL
#           # PF_TOGGLE is usually called a checkbox.
#           (PF_SLIDER, "p3", "SLIDER:", 0, (0, 100, 10)),
#           (PF_SPINNER, "p4", "SPINNER:", 21, (1, 1000, 50)),  # alias PF_ADJUSTMENT
#           # Pickers ie combo boxes ie choosers from lists of existing Gimp objects
#           (PF_COLOR, "p14", "_COLOR:", (100, 21, 40) ), # extra param is RGB triple
#           # PF_COLOUR is an alias by aussie PyGimp author lol
#           (PF_IMAGE, "p15", "IMAGE:", None), # should be type gimp.image, but None works
#           (PF_FONT, "p17", "FONT:", 0),
#           (PF_FILE, "p18", "FILE:", 0),
#           (PF_BRUSH, "p19", "BRUSH:", 0),
#           (PF_PATTERN, "p20", "PATTERN:", 0),
#           (PF_GRADIENT, "p21", "GRADIENT:", 0),
#           (PF_PALETTE, "p22", "PALETTE:", 0),
#           (PF_LAYER, "p23", "LAYER:", None),
#           (PF_CHANNEL, "p24", "CHANNEL:", None),  # ??? Usually empty, I don't know why.
#           (PF_DRAWABLE, "p25", "DRAWABLE:", None),
#           # Mostly undocumented, but work
#           (PF_VECTORS, "p26", "VECTORS:", None),
#           (PF_FILENAME, "p27", "FILENAME:", 0),
#           (PF_DIRNAME, "p28", "DIRNAME:", 0)
#           # PF_REGION might work but probably of little use.  See gimpfu.py.


Attachments:
vitruvian-man-3.xcf [4.65 MiB]
Downloaded 57 times

_________________
Image
Visualize your and others dreams coming true.
Top
 Post subject: Re: Map Transform - using Template
PostPosted: Mon Feb 26, 2024 8:17 am  (#10) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4561
Location: Canada
Sphere composed from squares.
This version of code allows you to use keyword(s) for unsplash.com images retrieval.
Image
#!/usr/bin/env python
# map-transform.py
# Created by TT
#
# License: GPLv3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# To view a copy of the GNU General Public License
# visit: http://www.gnu.org/licenses/gpl.html
#
#
# ------------
#| Change Log |
# ------------
# Rel 1: Initial release
import requests

def download_image(url, save_path):
    response = requests.get(url)
    if response.status_code == 200:
        with open(save_path, 'wb') as f:
            f.write(response.content)
        print("Image downloaded successfully!")
    else:
        print("Failed to download image. Status code:", response.status_code)

from gimpfu import *
import random
import math
def get4Points(vectors):
   num_strokes,stroke_ids = pdb.gimp_vectors_get_strokes(vectors)
   #gets first stroke, assuming it has 4 points
   _type,num_points,controlpoints,closed = pdb.gimp_vectors_stroke_get_points(vectors,stroke_ids[0])
   #get 4 points
   fourpoints = []
   i = 1 #first point is at index 1 because control points are indexed 0,1,2 then 3,4,5 then 6,7,8 then 9,10,11
   for l in range(0,4):
      index = i*2 #because it's x and y index so we jump by 2
      fourpoints = fourpoints + [controlpoints[index],controlpoints[index+1]] #[x,y]
      i += 3 #jump by 3 controlpoints at a time
   #fourpoints should now contain 8 items (4 * [x,y])
   
   #we will swap the last two points because we're dealing with perspective transform so it doesn't go around
   #the square but it jumps from left to right corners.
   tempx = fourpoints[4]
   tempy = fourpoints[5]
   fourpoints[4] = fourpoints[6]
   fourpoints[5] = fourpoints[7]
   fourpoints[6] = tempx
   fourpoints[7] = tempy
   return fourpoints
def get4MultiPoints(vectors):
   num_strokes,stroke_ids = pdb.gimp_vectors_get_strokes(vectors)
   #gets first stroke, assuming it has 4 points
   cp = []
   for i in range(0,len(stroke_ids)):
      _type,num_points,controlpoints,closed = pdb.gimp_vectors_stroke_get_points(vectors,stroke_ids[i])
      cp = cp + list(controlpoints)
   #get 4 points
   arrof4points = []
   #cp = controlpoints[:]
   paths = len(cp)/24
   for j in range(0,paths):
      controlpoints = cp[j*24:j*24+24] #every 24 coordinate which represents a 4 point path
      fourpoints = []
      i = 1 #first point is at index 1 because control points are indexed 0,1,2 then 3,4,5 then 6,7,8 then 9,10,11
      for l in range(0,4):
         index = i*2 #because it's x and y index so we jump by 2
         fourpoints = fourpoints + [controlpoints[index],controlpoints[index+1]] #[x,y]
         i += 3 #jump by 3 controlpoints at a time
      #fourpoints should now contain 8 items (4 * [x,y])
      #we will swap the last two points because we're dealing with perspective transform so it doesn't go around
      #the square but it jumps from left to right corners.
      tempx = fourpoints[4]
      tempy = fourpoints[5]
      fourpoints[4] = fourpoints[6]
      fourpoints[5] = fourpoints[7]
      fourpoints[6] = tempx
      fourpoints[7] = tempy
      arrof4points.append(fourpoints)

   return arrof4points
def python_map_transform(image, layer, keywords):
   # pdb.gimp_image_undo_group_start(image)
   # pdb.gimp_context_push()
   #YOUR CODE BEGINS=======================
   #ovectors = pdb.gimp_image_get_active_vectors(image) #original vector
   originallayername = "original"
   ovectors = pdb.gimp_image_get_vectors_by_name(image,originallayername)
   #pdb.gimp_message(ovectors.name)
   ofourpoints = get4Points(ovectors)
   for v in image.vectors:
      if v.name != originallayername: #if the name is different from original vector, we do work on it
         arrpoints = get4MultiPoints(v) #get the 4 points to use as perpective transform
         #pdb.gimp_message(arrpoints);
         for fourpoints in arrpoints:
            url = "https://source.unsplash.com/800x800?" + keywords.replace(" ","%20")
            save_path = "image.jpg"  # Provide the path where you want to save the image
            download_image(url, save_path)
            layer_copy = pdb.gimp_file_load_layer(image,save_path)
            #layer_copy = pdb.gimp_layer_copy(layer,TRUE) #copy layer with TRUE alpha channel
            pdb.gimp_image_insert_layer(image,layer_copy,None,0)
            pdb.gimp_layer_add_alpha(layer_copy) #add this so it's not filled with alpha background
            pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,layer_copy) #select the original vector area to apply perspective to.
            transform_item = pdb.gimp_item_transform_perspective(layer_copy,*ofourpoints) # *fourpoints is to unpack the array and passing it in as parameters           
            pdb.gimp_floating_sel_anchor(transform_item) #anchors the transform floating selection so that it's a layer
            pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,ovectors) #select the original vector area to apply perspective to.
            transform_item = pdb.gimp_item_transform_perspective(layer_copy,*fourpoints) # *fourpoints is to unpack the array and passing it in as parameters
            pdb.gimp_floating_sel_anchor(transform_item) #anchors the transform floating selection so that it's a layer
   pdb.gimp_item_set_visible(layer,FALSE)           
   #pdb.gimp_message(get4Points(ovectors))

   #YOUR CODE ENDS ========================
   # pdb.gimp_context_pop()
   # pdb.gimp_image_undo_group_end(image)
   pdb.gimp_displays_flush()

    #return

register(
   "python_fu_map_transform_1",
   "Perspective Transforms Using Paths",
   "Perspective Transforms Using Paths",
   "TT",
   "TT",
   "2023.12.29",
   "<Image>/Python-Fu/Map Transform 1...",
   "*",      # Create a new image, don't work on an existing one
   [
   #INPUT BEGINS
   (PF_STRING, "keywords", "Keywords:", "blue"),  # alias PF_VALUE
   #INPUT ENDS
   ],
   [],
   python_map_transform)

main()

#           (PF_INT, "p0", "_INT:", 0), # PF_INT8, PF_INT16, PF_INT32  similar but no difference in Python.
#           (PF_FLOAT, "p02", "_FLOAT:", 3.141),
#           (PF_STRING, "p03", "_STRING:", "foo"),  # alias PF_VALUE
#           (PF_TEXT, "p04", "TEXT:", "bar"),
#           # PF_VALUE
#           # Pick one from set of choices
#           (PF_OPTION,"p1",   "OPTION:", 0, ["0th","1st","2nd"]), # initially 0th is choice
#           (PF_RADIO, "p16", "RADIO:", 0, (("0th", 1),("1st",0))), # note bool indicates initial setting of buttons
#           # PF_RADIO is usually called a radio button group.
#           # SLIDER, ADJUSTMENT types require the extra parameter of the form (min, max, step).
#           (PF_TOGGLE, "p2",   "TOGGLE:", 1), # initially True, checked.  Alias PF_BOOL
#           # PF_TOGGLE is usually called a checkbox.
#           (PF_SLIDER, "p3", "SLIDER:", 0, (0, 100, 10)),
#           (PF_SPINNER, "p4", "SPINNER:", 21, (1, 1000, 50)),  # alias PF_ADJUSTMENT
#           # Pickers ie combo boxes ie choosers from lists of existing Gimp objects
#           (PF_COLOR, "p14", "_COLOR:", (100, 21, 40) ), # extra param is RGB triple
#           # PF_COLOUR is an alias by aussie PyGimp author lol
#           (PF_IMAGE, "p15", "IMAGE:", None), # should be type gimp.image, but None works
#           (PF_FONT, "p17", "FONT:", 0),
#           (PF_FILE, "p18", "FILE:", 0),
#           (PF_BRUSH, "p19", "BRUSH:", 0),
#           (PF_PATTERN, "p20", "PATTERN:", 0),
#           (PF_GRADIENT, "p21", "GRADIENT:", 0),
#           (PF_PALETTE, "p22", "PALETTE:", 0),
#           (PF_LAYER, "p23", "LAYER:", None),
#           (PF_CHANNEL, "p24", "CHANNEL:", None),  # ??? Usually empty, I don't know why.
#           (PF_DRAWABLE, "p25", "DRAWABLE:", None),
#           # Mostly undocumented, but work
#           (PF_VECTORS, "p26", "VECTORS:", None),
#           (PF_FILENAME, "p27", "FILENAME:", 0),
#           (PF_DIRNAME, "p28", "DIRNAME:", 0)
#           # PF_REGION might work but probably of little use.  See gimpfu.py.


Attachments:
sphere.xcf [16.96 KiB]
Downloaded 44 times

_________________
Image
Visualize your and others dreams coming true.
Top
 Post subject: Re: Map Transform - using Template
PostPosted: Mon Feb 26, 2024 10:41 am  (#11) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4561
Location: Canada
Image

_________________
Image
Visualize your and others dreams coming true.


Top
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group