Re: params of gegl:transform operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, I've been busy, and I forgot to reply to this.

Gegl doesn't have any built-in operations for gradients right now, but
you can code your own, either as operations, or that operate on gegl
buffers.

There are some operations for gradients that are in gegl's source
tree, but they're marked as experimental, and they aren't built by
default. You can build them if you build gegl with --enable-workshop.
Their code is here:
  operations/workshop/linear-gradient.c
  operations/workshop/radial-gradient.c

I haven't looked at them closely, so I can't vouch for whether their
code is correct or not, and when operations are maked experimental
like this, there's often something slightly wrong with them. Still,
they might be a good starting point.

On Tue, Oct 8, 2013 at 2:14 AM, beee <gdb_1986@xxxxxxx> wrote:
> Dear Michael,
>
> Thanks for your kindly help. I have another question: How can I fill a region with gradient color using gegl?
>
> Best Regards.
> At 2013-09-29 21:55:00,"Michael Henning" <drawoc@xxxxxxxxxxxxxxxxxx> wrote:
>>To use gegl:transform, you need to create the transformation matrix
>>yourself. There are plenty of tutorials for learning how to create
>>transformation matrices online.
>>
>>Then, do this to set the node's property:
>>
>>1. When you create your matrix, place it in a GeglMatrix3 struct. It
>>contains one member named coeff, which is a 3x3 array of doubles for
>>the matrix values.
>>2. Turn the matrix into a string with gchar* gegl_matrix3_to_string
>>(GeglMatrix3 *matrix);
>>3. Set this string as the property "transform" on your gegl:transform
>>node with gegl_node_set.
>>4. Free the string from (2) with g_free
>>
>>Anyway, I hope this helps! Feel free to ask if you have any issues.
>>
>>  -- drawoc
>>
>>On Sun, Sep 29, 2013 at 6:06 AM, beee <gdb_1986@xxxxxxx> wrote:
>>>  Hi,
>>>
>>> I want to apply perspective effects on an image. But I can't find an
>>> operation for it. I thought maybe I can do it with gegl:transform. But I
>>> don't know which parameters should use.
>>>
>>> Please help. Thanks!
>>>
>>> Regards.
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> gegl-developer-list mailing list
>>> List address:    gegl-developer-list@xxxxxxxxx
>>> List membership: https://mail.gnome.org/mailman/listinfo/gegl-developer-list
>>>
>>>
>
_______________________________________________
gegl-developer-list mailing list
List address:    gegl-developer-list@xxxxxxxxx
List membership: https://mail.gnome.org/mailman/listinfo/gegl-developer-list





[Index of Archives]     [Yosemite News]     [Yosemite Photos]     [gtk]     [GIMP Users]     [KDE]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux