RSS/Atom feed Twitter
Site is read-only, email is disabled

Sample implementation of a new GEGL op

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

10 of 10 messages available
Toggle history

Please log in to manage your subscriptions.

Sample implementation of a new GEGL op sourav de 06 Apr 16:14
  Sample implementation of a new GEGL op Martin Nordholts 06 Apr 19:15
   Sample implementation of a new GEGL op sourav de 07 Apr 07:12
    Sample implementation of a new GEGL op shivani maheshwari 07 Apr 07:16
    Sample implementation of a new GEGL op Kevin Cozens 07 Apr 14:33
Sample implementation of a new GEGL op sourav de 07 Apr 15:15
Sample implementation of a new GEGL op sourav de 12 Apr 17:25
  Sample implementation of a new GEGL op sourav de 12 Apr 21:51
   Sample implementation of a new GEGL op sourav de 13 Apr 22:11
   Sample implementation of a new GEGL op sourav de 14 Apr 16:31
sourav de
2011-04-06 16:14:31 UTC (about 14 years ago)

Sample implementation of a new GEGL op

I tried to implement the blur operation in GEGL. The algorithm is same as of the blur plug-in in GIMP. The patch file for GEGL operation and the blur.c file for the plug-in are attached below. Kindly let me know if there is any mistake in my implementation.

Martin Nordholts
2011-04-06 19:15:00 UTC (about 14 years ago)

Sample implementation of a new GEGL op

On 04/06/2011 06:14 PM, sourav de wrote:

I tried to implement the blur operation in GEGL. The algorithm is same as of the blur plug-in in GIMP. The patch file for GEGL operation and the blur.c file for the plug-in are attached below. Kindly let me know if there is any mistake in my implementation.

Please attach the patch to GIMP bugzilla and reference the patch in your application.

Regards,
Martin

sourav de
2011-04-07 07:12:13 UTC (about 14 years ago)

Sample implementation of a new GEGL op

On Thu, Apr 7, 2011 at 12:45 AM, Martin Nordholts wrote:

On 04/06/2011 06:14 PM, sourav de wrote:

I tried to implement the blur operation in GEGL. The algorithm is same as of the blur plug-in in GIMP. The patch file for GEGL operation and the blur.c file for the plug-in are attached below. Kindly let me know if there is any mistake in my implementation.

Please attach the patch to GIMP bugzilla and reference the patch in your application.

Regards,
Martin

--

My GIMP Blog:
http://www.chromecode.com/
"Why GIMP 2.8 is not released yet"
_______________________________________________ Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Hi,

I tried to submit the patch in bugzilla, but i was unable to create new account there for not getting any email containing confirmation link. I mailed bugmaster@gnome.org also, but in vain.

shivani maheshwari
2011-04-07 07:16:06 UTC (about 14 years ago)

Sample implementation of a new GEGL op

Ya i am also unable to create an account on bugzilla. I already made the plugin a day back. But have been waiting in vain for the confirmation mail from bugzilla. I want to ask my mentor Mukund to kindly tell me what to do in this case.

Any help from any one is most welcome

Thanx in advance

On Thu, Apr 7, 2011 at 12:42 PM, sourav de wrote:

On Thu, Apr 7, 2011 at 12:45 AM, Martin Nordholts wrote:

On 04/06/2011 06:14 PM, sourav de wrote:

I tried to implement the blur operation in GEGL. The algorithm is same as of the blur plug-in in GIMP. The patch file for GEGL operation and the blur.c file for the plug-in are attached below. Kindly let me know if there is any mistake in my implementation.

Please attach the patch to GIMP bugzilla and reference the patch in your application.

Regards,
Martin

--

My GIMP Blog:
http://www.chromecode.com/
"Why GIMP 2.8 is not released yet"
_______________________________________________ Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Hi,

I tried to submit the patch in bugzilla, but i was unable to create new account there for not getting any email containing confirmation link. I mailed bugmaster@gnome.org also, but in vain.

-- Sourav De
2nd Year Student
Department of Computer Science and Engineering IIT KHARAGPUR

_______________________________________________ Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Kevin Cozens
2011-04-07 14:33:23 UTC (about 14 years ago)

Sample implementation of a new GEGL op

sourav de wrote:

I tried to submit the patch in bugzilla, but i was unable to create new account there for not getting any email containing confirmation link. I mailed bugmaster@gnome.org also, but in vain.

The gnome.org people can take a while to respond at times. Have patience.

sourav de
2011-04-07 15:15:30 UTC (about 14 years ago)

Sample implementation of a new GEGL op

On Thu, Apr 7, 2011 at 5:36 PM, Mukund Sivaraman wrote:

Hi Sourav

On Wed, Apr 06, 2011 at 09:44:31PM +0530, sourav de wrote:

I tried to implement the blur operation in GEGL. The algorithm is same as

of

the blur plug-in in GIMP. The patch file for GEGL operation and the

blur.c

file for the plug-in are attached below. Kindly let me know if there is

any

mistake in my implementation.

+{ +dst_buf[offset*4+c]=ROUND(
+ ((gdouble) (src_pix[c-src_width*4 - 4] *

src_pix[c-src_width*4 - c])

+ + (gdouble) (src_pix[c-src_width*4] *

src_pix[c-src_width*4 + 4 - c])

+ + (gdouble) (src_pix[c-src_width*4 + 4] *

src_pix[c-src_width*4 + 2*4 - c])

+ + (gdouble) (src_pix[c - bytes] * src_pix[c

- c])

+ + (gdouble) (src_pix[c] * src_pix[c + 4 -

c])

+ + (gdouble) (src_pix[c + 4] * src_pix[c +

2*4 - c])

+ + (gdouble) (src_pix[c+src_width*4 - 4] *

src_pix[c+src_width*4 - c])

+ + (gdouble) (src_pix[c+src_width*4] *

src_pix[c+src_width*4 + 4 - c])

+ + (gdouble) (src_pix[c+src_width*4 + 4] *

src_pix[c+src_width*4 + 2*4 - c]))

+ / ((gdouble) src_pix[c-src_width*4 - c] + + (gdouble) src_pix[c-src_width*4 + 4 - c] + + (gdouble) src_pix[c-src_width*4 + 2*4 -

c]

+ + (gdouble) src_pix[c -c] + + (gdouble) src_pix[c + 4 - c] + + (gdouble) src_pix[c + 2*4 - c] + + (gdouble) src_pix[c+src_width*4 - c] + + (gdouble) src_pix[c+src_width*4 + 4 - c] + + (gdouble) src_pix[c+src_width*4 + 2*4 -

c]));

+
+}
+
+dst_buf[offset*4+3]=

((gint)src_pix[c-4-src_width*4]+(gint)src_pix[c-src_width*4]+(gint)src_pix[c+4-src_width*4] +

+ (gint)src_pix[c-4]+(gint)src_pix[c]+(gint)src_pix[c+4]+ +

(gint)src_pix[c-4+src_width*4]+(gint)src_pix[c+src_width*4]+(gint)src_pix[c+4+src_width*4]+4)/9;

Did this code work for you? Were you able to use this inside GEGL to perform a blur?

You can help me review this code if you clean it up and comment it.

Mukund

I've revised my code. It compiles and runs successfully. The patch is attached below. If still there is any mistake, kindly let me know it.

sourav de
2011-04-12 17:25:28 UTC (about 14 years ago)

Sample implementation of a new GEGL op

On Thu, Apr 7, 2011 at 5:36 PM, Mukund Sivaraman wrote:

Hi Sourav

On Wed, Apr 06, 2011 at 09:44:31PM +0530, sourav de wrote:

I tried to implement the blur operation in GEGL. The algorithm is same as

of

the blur plug-in in GIMP. The patch file for GEGL operation and the

blur.c

file for the plug-in are attached below. Kindly let me know if there is

any

mistake in my implementation.

+{ +dst_buf[offset*4+c]=ROUND(
+ ((gdouble) (src_pix[c-src_width*4 - 4] *

src_pix[c-src_width*4 - c])

+ + (gdouble) (src_pix[c-src_width*4] *

src_pix[c-src_width*4 + 4 - c])

+ + (gdouble) (src_pix[c-src_width*4 + 4] *

src_pix[c-src_width*4 + 2*4 - c])

+ + (gdouble) (src_pix[c - bytes] * src_pix[c

- c])

+ + (gdouble) (src_pix[c] * src_pix[c + 4 -

c])

+ + (gdouble) (src_pix[c + 4] * src_pix[c +

2*4 - c])

+ + (gdouble) (src_pix[c+src_width*4 - 4] *

src_pix[c+src_width*4 - c])

+ + (gdouble) (src_pix[c+src_width*4] *

src_pix[c+src_width*4 + 4 - c])

+ + (gdouble) (src_pix[c+src_width*4 + 4] *

src_pix[c+src_width*4 + 2*4 - c]))

+ / ((gdouble) src_pix[c-src_width*4 - c] + + (gdouble) src_pix[c-src_width*4 + 4 - c] + + (gdouble) src_pix[c-src_width*4 + 2*4 -

c]

+ + (gdouble) src_pix[c -c] + + (gdouble) src_pix[c + 4 - c] + + (gdouble) src_pix[c + 2*4 - c] + + (gdouble) src_pix[c+src_width*4 - c] + + (gdouble) src_pix[c+src_width*4 + 4 - c] + + (gdouble) src_pix[c+src_width*4 + 2*4 -

c]));

+
+}
+
+dst_buf[offset*4+3]=

((gint)src_pix[c-4-src_width*4]+(gint)src_pix[c-src_width*4]+(gint)src_pix[c+4-src_width*4] +

+ (gint)src_pix[c-4]+(gint)src_pix[c]+(gint)src_pix[c+4]+ +

(gint)src_pix[c-4+src_width*4]+(gint)src_pix[c+src_width*4]+(gint)src_pix[c+4+src_width*4]+4)/9;

Did this code work for you? Were you able to use this inside GEGL to perform a blur?

You can help me review this code if you clean it up and comment it.

Mukund

Hi,

I changed the code little bit. I placed the blur.c file in gegl-0.1.2/operations/common folder & followed these steps to compile GEGL.

1. configure 2. make
3. make install

it compiled successfully. But I don't know how to check whether it runs or not. Please help me finding this out & cleaning it up. Sorry for replying late.

sourav de
2011-04-12 21:51:27 UTC (about 14 years ago)

Sample implementation of a new GEGL op

On Tue, Apr 12, 2011 at 10:55 PM, sourav de wrote:

On Thu, Apr 7, 2011 at 5:36 PM, Mukund Sivaraman wrote:

Hi Sourav

On Wed, Apr 06, 2011 at 09:44:31PM +0530, sourav de wrote:

I tried to implement the blur operation in GEGL. The algorithm is same

as of

the blur plug-in in GIMP. The patch file for GEGL operation and the

blur.c

file for the plug-in are attached below. Kindly let me know if there is

any

mistake in my implementation.

+{ +dst_buf[offset*4+c]=ROUND(
+ ((gdouble) (src_pix[c-src_width*4 - 4] *

src_pix[c-src_width*4 - c])

+ + (gdouble) (src_pix[c-src_width*4] *

src_pix[c-src_width*4 + 4 - c])

+ + (gdouble) (src_pix[c-src_width*4 + 4] *

src_pix[c-src_width*4 + 2*4 - c])

+ + (gdouble) (src_pix[c - bytes] * src_pix[c

- c])

+ + (gdouble) (src_pix[c] * src_pix[c + 4 -

c])

+ + (gdouble) (src_pix[c + 4] * src_pix[c +

2*4 - c])

+ + (gdouble) (src_pix[c+src_width*4 - 4] *

src_pix[c+src_width*4 - c])

+ + (gdouble) (src_pix[c+src_width*4] *

src_pix[c+src_width*4 + 4 - c])

+ + (gdouble) (src_pix[c+src_width*4 + 4] *

src_pix[c+src_width*4 + 2*4 - c]))

+ / ((gdouble) src_pix[c-src_width*4 - c] + + (gdouble) src_pix[c-src_width*4 + 4 -

c]

+ + (gdouble) src_pix[c-src_width*4 + 2*4 -

c]

+ + (gdouble) src_pix[c -c] + + (gdouble) src_pix[c + 4 - c] + + (gdouble) src_pix[c + 2*4 - c] + + (gdouble) src_pix[c+src_width*4 - c] + + (gdouble) src_pix[c+src_width*4 + 4 -

c]

+ + (gdouble) src_pix[c+src_width*4 + 2*4 -

c]));

+
+}
+
+dst_buf[offset*4+3]=

((gint)src_pix[c-4-src_width*4]+(gint)src_pix[c-src_width*4]+(gint)src_pix[c+4-src_width*4] +

+ (gint)src_pix[c-4]+(gint)src_pix[c]+(gint)src_pix[c+4]+ +

(gint)src_pix[c-4+src_width*4]+(gint)src_pix[c+src_width*4]+(gint)src_pix[c+4+src_width*4]+4)/9;

Did this code work for you? Were you able to use this inside GEGL to perform a blur?

You can help me review this code if you clean it up and comment it.

Mukund

Hi,

I changed the code little bit. I placed the blur.c file in gegl-0.1.2/operations/common folder & followed these steps to compile GEGL.

1. configure 2. make
3. make install

it compiled successfully. But I don't know how to check whether it runs or not. Please help me finding this out & cleaning it up. Sorry for replying late.

--
Sourav De
2nd Year Student
Department of Computer Science and Engineering IIT KHARAGPUR

I overlooked the option in GIMP to run GEGL operation. Now I have checked it, and it works.

sourav de
2011-04-13 22:11:28 UTC (about 14 years ago)

Sample implementation of a new GEGL op

On Wed, Apr 13, 2011 at 3:21 AM, sourav de wrote:

On Tue, Apr 12, 2011 at 10:55 PM, sourav de wrote:

On Thu, Apr 7, 2011 at 5:36 PM, Mukund Sivaraman wrote:

Hi Sourav

On Wed, Apr 06, 2011 at 09:44:31PM +0530, sourav de wrote:

I tried to implement the blur operation in GEGL. The algorithm is same

as of

the blur plug-in in GIMP. The patch file for GEGL operation and the

blur.c

file for the plug-in are attached below. Kindly let me know if there is

any

mistake in my implementation.

+{ +dst_buf[offset*4+c]=ROUND(
+ ((gdouble) (src_pix[c-src_width*4 - 4] *

src_pix[c-src_width*4 - c])

+ + (gdouble) (src_pix[c-src_width*4] *

src_pix[c-src_width*4 + 4 - c])

+ + (gdouble) (src_pix[c-src_width*4 + 4] *

src_pix[c-src_width*4 + 2*4 - c])

+ + (gdouble) (src_pix[c - bytes] *

src_pix[c - c])

+ + (gdouble) (src_pix[c] * src_pix[c + 4 -

c])

+ + (gdouble) (src_pix[c + 4] * src_pix[c +

2*4 - c])

+ + (gdouble) (src_pix[c+src_width*4 - 4] *

src_pix[c+src_width*4 - c])

+ + (gdouble) (src_pix[c+src_width*4] *

src_pix[c+src_width*4 + 4 - c])

+ + (gdouble) (src_pix[c+src_width*4 + 4] *

src_pix[c+src_width*4 + 2*4 - c]))

+ / ((gdouble) src_pix[c-src_width*4 - c] + + (gdouble) src_pix[c-src_width*4 + 4 -

c]

+ + (gdouble) src_pix[c-src_width*4 + 2*4

- c]

+ + (gdouble) src_pix[c -c] + + (gdouble) src_pix[c + 4 - c] + + (gdouble) src_pix[c + 2*4 - c] + + (gdouble) src_pix[c+src_width*4 - c] + + (gdouble) src_pix[c+src_width*4 + 4 -

c]

+ + (gdouble) src_pix[c+src_width*4 + 2*4

- c]));

+
+}
+
+dst_buf[offset*4+3]=

((gint)src_pix[c-4-src_width*4]+(gint)src_pix[c-src_width*4]+(gint)src_pix[c+4-src_width*4] +

+ (gint)src_pix[c-4]+(gint)src_pix[c]+(gint)src_pix[c+4]+ +

(gint)src_pix[c-4+src_width*4]+(gint)src_pix[c+src_width*4]+(gint)src_pix[c+4+src_width*4]+4)/9;

Did this code work for you? Were you able to use this inside GEGL to perform a blur?

You can help me review this code if you clean it up and comment it.

Mukund

Hi,

I changed the code little bit. I placed the blur.c file in gegl-0.1.2/operations/common folder & followed these steps to compile GEGL.

1. configure 2. make
3. make install

it compiled successfully. But I don't know how to check whether it runs or not. Please help me finding this out & cleaning it up. Sorry for replying late.

--
Sourav De
2nd Year Student
Department of Computer Science and Engineering IIT KHARAGPUR

I overlooked the option in GIMP to run GEGL operation. Now I have checked it, and it works.

--
Sourav De
2nd Year Student
Department of Computer Science and Engineering IIT KHARAGPUR

I've revised my code. It performs blur operation successfully.

Regards,

sourav de
2011-04-14 16:31:26 UTC (about 14 years ago)

Sample implementation of a new GEGL op

I've added comments in my code. If still there is anything to do, please let me know.