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.
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 |
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.
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
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.
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-developerHi,
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
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.
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.
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.
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 installit 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.
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 installit 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 KHARAGPURI 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,
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.