Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script-Fu
#13
(12-27-2023, 01:00 PM)rich2005 Wrote:
(12-27-2023, 09:25 AM)Alan Wrote: Is there any option that we create a new layer that has the curvy shape and save it as xcf so any image pasted to this layer will look curvy?
I did it with the plug-in-curve-bend but it takes a lot of data which is not practical.
If there is any easier way please let me know and thank you in advance.

Maybe a possibility. Another way to bend is a displacement map. While the on canvas tool is a GEGL function the devs do have a compatibility plug-in-displace which might be easier than curve-bend to code.

Just a quick example:

Yes, but you have to be able to generate that displace map... 

In fact I looked into that problem(*), and for performance reasons, you want to create the displace map in one go (not pixel by pixel, and possibly even avoid line by line), and you can generate a single gradient only if the displace value depends only on the X or Y coordinate (and not on both) which is isn't the case here.

To make things a bit more difficult, nothing says that the required transform is linear (IMHO you would need at least one more line in the middle in additions to the two at the top/bottom, and you want the reciprocal transform, because a displace map doesn't tell where a pixel of the source goes, but where a pixels in the result comes from.

So, not unfeasible, but to the person ho undertakes it, best of luck.

(*) because my ofn-flatten-cylinder script uses a displace map, which in this case is workable for the simple cases.
Reply


Messages In This Thread
Script-Fu - by Alan - 12-19-2023, 10:24 AM
RE: Script-Fu - by programmer_ceds - 12-19-2023, 10:46 AM
RE: Script-Fu - by Alan - 12-20-2023, 07:42 AM
RE: Script-Fu - by PixLab - 12-20-2023, 08:14 AM
RE: Script-Fu - by PixLab - 12-20-2023, 06:10 PM
RE: Script-Fu - by Alan - 12-21-2023, 08:47 AM
RE: Script-Fu - by rich2005 - 12-21-2023, 08:52 AM
RE: Script-Fu - by rich2005 - 12-25-2023, 11:06 AM
RE: Script-Fu - by Alan - 12-27-2023, 09:25 AM
RE: Script-Fu - by Ofnuts - 12-27-2023, 10:12 AM
RE: Script-Fu - by rich2005 - 12-27-2023, 01:00 PM
RE: Script-Fu - by Ofnuts - 12-27-2023, 02:12 PM
RE: Script-Fu - by rich2005 - 12-27-2023, 02:30 PM
RE: Script-Fu - by Ofnuts - 12-27-2023, 04:42 PM
RE: Script-Fu - by Alan - 12-28-2023, 07:39 AM
RE: Script-Fu - by Ofnuts - 12-28-2023, 08:47 AM

Forum Jump: