Adding additional raster effects...

View: New views
4 Messages — Rating Filter:   Alert me  

Adding additional raster effects...

by heathenx-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am interested in adding a couple more effects the the already existing raster effects. It's more
or less just for myself since I don't have the chops to contribute anything of value to anyone else.
I'm not sure what I'm biting off at this point. It might be easy or it might be extremely hard to
do. My coding skills are very limited (meaning I have none). Are the raster effects part of the main
source code or are they broken out into smaller "extensionized" chunks somewhere? I think modifying
an existing effect into something else might be a good starting point for me...if possible.

A "Dude, don't even attempt to try this." would be a perfectly acceptable answer for me. I'll walk
away like nothing ever happened. :)

heathenx

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Re: Adding additional raster effects...

by john cliff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think pretty much all of those are calls out to Imagemagick to do the actual 'effect'
everything in the effects menu is external afaik. Someone correct me if I'm wrong there...

2008/7/24 heathenx <heathenx@...>:
I am interested in adding a couple more effects the the already existing raster effects. It's more
or less just for myself since I don't have the chops to contribute anything of value to anyone else.
I'm not sure what I'm biting off at this point. It might be easy or it might be extremely hard to
do. My coding skills are very limited (meaning I have none). Are the raster effects part of the main
source code or are they broken out into smaller "extensionized" chunks somewhere? I think modifying
an existing effect into something else might be a good starting point for me...if possible.

A "Dude, don't even attempt to try this." would be a perfectly acceptable answer for me. I'll walk
away like nothing ever happened. :)

heathenx

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Re: Adding additional raster effects...

by Ted Gould :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2008-07-24 at 10:26 -0400, heathenx wrote:
> I am interested in adding a couple more effects the the already existing raster effects. It's more
> or less just for myself since I don't have the chops to contribute anything of value to anyone else.
> I'm not sure what I'm biting off at this point. It might be easy or it might be extremely hard to
> do. My coding skills are very limited (meaning I have none). Are the raster effects part of the main
> source code or are they broken out into smaller "extensionized" chunks somewhere? I think modifying
> an existing effect into something else might be a good starting point for me...if possible.

The raster effects are extensions, but they are written in C.  You can
find all of the code for them in:

    /src/extension/internal/bitmap/

Specifically I think you should look at something like:

    adaptiveThreshold.cpp

You'll see that Chris has pushed most of the code into the superclass,
so if you inherit, you'll just end up with a call to applyEffect with
the ImageMagick Image object.  Then you can call any of the ImageMagick
commands on that image.  Chris has implemented all the ones that are
"one call" with all their parameters.  There's lots of room for more.

                --Ted



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

signature.asc (196 bytes) Download Attachment

Parent Message unknown Re: Adding additional raster effects...

by Ted Gould :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, 2008-07-26 at 08:52 -0400, heathenx wrote:
> Ok. I think I have my new ImageMagick effect written by saving out a copy of a present effect, and
> modifying the code. Immediately I'm not sure where to add the extra menu item though. I scanned
> various menu*.cpp related files but I am not discovering which file is the storing the
> Effects/Raster menu picks. Any clues?

Actually, you don't need to add the menu item at all, if it's defined in
the INX file it'll get added automatically.  In the case of C plugins,
the INX file is the XML that is at the bottom of the file.

Probably the reason that you're not seeing it is that your plugin isn't
getting initialized.  To do that you'll have to put it in the list of
plugin inits.  Look at:

   /src/extension/init.cpp

http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/extension/init.cpp?revision=18908&view=markup

> Also, it's my understanding that in order to see if my new effect works I have to compile. Not a
> problem. But say I make a stupid typo like I do often...are there any shortcuts so that I don't have
> to recompile the whole thing again every time I want to fine tune the code?

In general, you'll only have rebuild when a major header file or the
build system is changed.  So if you change one of the Makefiles
(probably when you added your file) it'll change.  But when you change
init.cpp it'll only build init.o, libextension.a and the inkscape
binary.

                --Ted



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
LightInTheBox - Buy quality products at wholesale price!