It is currently Thu Apr 25, 2024 1:14 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How do you build a C Plugin?
PostPosted: Sat Aug 06, 2016 11:15 am  (#1) 
Offline
New Member

Joined: Aug 06, 2016
Posts: 3
GIMP Version: 2.8.14
Operating System: Windows
OS Version: 7
GIMP Experience: New User



Cheers!
I'm new around here and hope someone can help me with this.
A while back, I wanted to remove the blur effect from the warp filter, so I dug through the source code a bit and commented it out. But I couldn't build the plugin. I got gimptool, I think/hope I had all the dependencies(???) but I got an error when I tried to run it. Just Windows telling me that an error occurred but nothing about what or why it happened.
Therefore, I'd like to try this again from scratch.
What do I need to build the plugin? Where do I download it? Where do I put it?
I'm relatively new to plugin development and no good with console applications, so please explain it to me like I'm a total dummy!


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: How do you build a C Plugin?
PostPosted: Sat Aug 06, 2016 1:25 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2246
Location: Poland
The first step - compiled GIMP?
Guide:
http://wiki.gimp.org/wiki/Hacking:Building/Windows
Send source code - I try to compile... :roll:

_________________
Image

Slava
Ukraini!


Top
 Post subject: Re: How do you build a C Plugin?
PostPosted: Sun Aug 07, 2016 4:51 am  (#3) 
Offline
New Member

Joined: Aug 06, 2016
Posts: 3
MareroQ wrote:
The first step - compiled GIMP?
Guide:
[...]
Send source code - I try to compile... :roll:


I use the packaged GIMP for Windows, if that's your question.
I came across this article before but it doesn't help me because I don't see why I should compile the entire program when all I want to do is build a single plugin. Especially, since according to what I read, it is entirely possible to build single plugins. So, please explain.

I cannot send you the source code because, apparently, this forum doesn't allow c or txt extensions and as a new user I'm not allowed to post external links... :gaah
Anyway, it's really just warp.c with the blur function calls in line 1177 and 1180 commented out.
  gimp_progress_init (_("Smoothing X gradient"));
  //blur16(draw_xd);

  gimp_progress_init (_("Smoothing Y gradient"));
  //blur16(draw_yd);

Not sure if 1176 and 1179 need to be commented out, too.

And I changed the define lines 76 - 78:
#define PLUG_IN_PROC    "plug-in-warp-no-blur"
#define PLUG_IN_BINARY  "warp-no-blur"
#define PLUG_IN_ROLE    "gimp-warp-no-blur"


Top
 Post subject: Re: How do you build a C Plugin?
PostPosted: Sun Aug 07, 2016 8:22 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2246
Location: Poland
Hi Neo.

Gimptool requires a lot of dependence.
Your experimental plugin in annex (You can add *.zip after 3 posts).


Attachments:
Build for gimptool.png
Build for gimptool.png [ 12.48 KiB | Viewed 3720 times ]
warp-no-blur_experimental_32bit.zip [62.67 KiB]
Downloaded 173 times

_________________
Image

Slava
Ukraini!
Top
 Post subject: Re: How do you build a C Plugin?
PostPosted: Mon Aug 08, 2016 3:12 am  (#5) 
Offline
New Member

Joined: Aug 06, 2016
Posts: 3
Thank you, MareroQ!
Too bad it doesn't work the way I wanted. Well, it works in a sense that it works just like warp. But it's not pixel-perfect as I wanted it.
Still, thanks for taking your time to help me.


Top
 Post subject: Re: How do you build a C Plugin?
PostPosted: Mon Aug 08, 2016 3:22 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2246
Location: Poland
You have to change the code (I can not :oops: ).
The compilation takes less than a minute :bump

_________________
Image

Slava
Ukraini!


Top
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Gimp-2.99.13 nightly build for Windows 64

8

No new posts Attachment(s) CMYK Student's non-destructive dev build after 2.99.18 in use by me

92

No new posts Attachment(s) A little Subroutine to build Means between two Dimensional Vectors

2

No new posts Attachment(s) Baby's first GEGL plugin - a very basic GEGL plugin anyone can make.

9

No new posts Can't get plugin to appear (mostly)

3



* Login  



Powered by phpBB3 © phpBB Group