It is currently Fri Jun 21, 2024 3:30 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 312 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 16  Next
Author Message
 Post subject: Re: Multi-Fill Script Help
PostPosted: Wed Jun 26, 2013 11:10 am  (#71) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
IMO, a script should, when called using default parameters:
- either work with acceptable results
- or notify with a message or something else that the base image is not acceptable
Thanks

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Wed Jun 26, 2013 11:31 am  (#72) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
I used the available topic which says "...help", but in fact I was trying to notify what -IMO- there is a missing piece in the script, either to take care also of the transparent areas or to inform the user about the requirement to have NO transparent areas in the base image.
Hopefully RobA will sooner or later read this post...

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Wed Jun 26, 2013 11:49 am  (#73) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Yes, the script is very nice, I agree, it just needs some...clever interventions!

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Wed Jun 26, 2013 12:33 pm  (#74) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
dinasset wrote:
Multi-fill called on an image with transparent areas goes into an endless loop.
To double-check:
-call script Pursuit Curve, with default parameters
-the result is a drawing with black lines on a transparent area
-now call Multi-fill, with default parameters
.......endless loop.....
please help, thanks!
I see what you mean about the MultiFill endless loop, an error message the script couldn't proceed would have been helpful. Once I forced the shutdown of the MultiFill script I had to re-start Gimp because of various lost menu functions. This was when I ran Pursuit Curve, with default parameters. It seems Pursuit Curve need one of the Polygon fill options to work with MultiFill.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Wed Jun 26, 2013 1:12 pm  (#75) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
just another indication about the script:
if I choose for Fill Type option 5 or 6 (gradient...)
the script at the end works, but I get a lot of this messages "Unable to run GimpPdbProgress callback. The corresponding plug-in may have crashed."

edit: even if I comment out all the lines related to "progress" (?)

edit 2: it only happens with the drawing created with the Pursuit Curve (having added a white layer below and flatting the image, to have the areas all white, as I do for any other option of Fill Type, otherwise none works as stated in a previous post)
if I just create a new white image and draw with a pencil various black lines, I do not get those messages...

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Wed Jun 26, 2013 10:06 pm  (#76) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
@odinbc
because I feel myself uncomfortable with having the mentioned messages show up only with the draw created with the Pursuit and not with a draw hand made by myself, I did a lot of experiment, increasing at each run the complexity of the drawing, and eventually I got the same messages about GimpPdbProgress callback also using my drawing.
I don't understand whether this happens because of the number of areas or the too many different area sizes, anyhow I attach here the original drawing and the filled one (result is always OK); if you both can experiment trying to multi-fill my original with option gradient, let me know your results, thanks.
Attachment:
draw.png
draw.png [ 6.77 KiB | Viewed 1792 times ]
Attachment:
draw-filled.png
draw-filled.png [ 98.6 KiB | Viewed 1792 times ]

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Wed Jun 26, 2013 10:34 pm  (#77) 
Offline
Global Moderator
User avatar

Joined: Nov 16, 2011
Posts: 5128
Location: Metro Vancouver, BC
Two examples, one of each gradient fill option, with similar results to yours.

Image

The same Gimp error message each run of MultiFill with gradient option on your image.
Quote:
GIMP Error
Unable to run GimpPdbProgress callback. The corresponding plug-in may have crashed.

GIMP Error
Unable to run GimpPdbProgress callback. The corresponding plug-in may have crashed.

GIMP Error
Unable to run GimpPdbProgress callback. The corresponding plug-in may have crashed.

Gimp 2.8.6, Win32, MultiFill

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Wed Jun 26, 2013 10:37 pm  (#78) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
thanks odinbc!
does someone know when and why gimp issues those messages?

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Thu Jun 27, 2013 7:23 am  (#79) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
dinasset wrote:
IMO, a script should, when called using default parameters:
- either work with acceptable results
- or notify with a message or something else that the base image is not acceptable
Thanks


It does work correctly if you follow the directions of the multifill script.

Quote:
Multifill takes every background coloured space (selectable) and will fill them with sequential palette entries, or randomly. It does NOT check to see if adjacent colours are the same, but use of a large palette should reduce the likelihood.

It simply isn't designed to work with transparency.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Thu Jun 27, 2013 9:51 am  (#80) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Rod,
I'm not expert enough on scripts to know whether is it possible to understand (by code statements, I mean) the presence of transparent areas in the base image/layer:
1 - IF YES, when a script not only ignores those areas (which is acceptable), but is going into an endless loop if they are present (causing GIMP to be forced closed -see experience of odinbc in addition to mine), then IT SHOULD REFUSE to execute issuing a warning message
2 - IF NOT, it could be nice for the users to see a warning on top of the parameters windows informing "this script is unable to deal with transparent areas" or similar

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Thu Jun 27, 2013 9:09 pm  (#81) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
dinasset wrote:
Rod,
I'm not expert enough on scripts to know whether is it possible to understand (by code statements, I mean) the presence of transparent areas in the base image/layer:
1 - IF YES, when a script not only ignores those areas (which is acceptable), but is going into an endless loop if they are present (causing GIMP to be forced closed -see experience of odinbc in addition to mine), then IT SHOULD REFUSE to execute issuing a warning message
2 - IF NOT, it could be nice for the users to see a warning on top of the parameters windows informing "this script is unable to deal with transparent areas" or similar

I agree. it is probably a good idea for a dialog to pop up stating the script only works with a white bg with dark lines.However you could add this yourself in the pop-up blurb that shows when you mouse over it in the menu. :)
Image

Just a short fix to remind yourself. :)
You would change it here (about line #343)
(script-fu-register "script_fu_MultiFill"
                    "<Image>/Filters/Flatting/MultiFill..."
                    "WILL NOT WORK ON TRANSPARENT LAYERS - Fills every separate area with a different colour from the palette."
                    "Rob Antonishen"
                    "Rob Antonishen"
                    "Dec 2008"
                    "RGB* GRAY*"
                    SF-IMAGE      "image"      0
                    SF-DRAWABLE   "drawable"   0
                    SF-COLOR      "MultiFill Colour"       "white"
                    SF-ADJUSTMENT "Colour Threshold"       (list 16 0 255 1 10 0 SF-SLIDER)
                    SF-OPTION     "Fill Type"              (list "Random Colours" "Random Greyscale" "Palette" "Palette Random" "Gradient with Random Direction" "Gradient with Specified Direction" "Pattern Directory")
                    SF-PALETTE    "Choose Fill Palette"    "Default"
               SF-ENUM "Blend Mode" '("BlendMode" "custom-mode")
               SF-ENUM "Gradient Style" '("GradientType" "gradient-linear")
                    SF-ADJUSTMENT "Gradient Direction"     (list 135 0 360 1 15 1 SF-SLIDER)
                    SF-DIRNAME    "Pattern Directory"      (string-append gimp-directory "/patterns/")
                    SF-ADJUSTMENT "Ignore Areas <="        (list 3 0 255 1 10 1 SF-SLIDER)
                    SF-ADJUSTMENT "Flag Areas <="          (list 10 0 255 1 10 1 SF-SLIDER)
                    SF-COLOR      "Flag Colour"            "magenta"
                    SF-OPTION     "Area Size Check Method" (list "Width & Height" "Area")                   
                    SF-TOGGLE     "Copy Layer First"       TRUE
                    SF-TOGGLE     "Flatten After"           TRUE
                    SF-TOGGLE     "Hide While Processing"  TRUE
)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Fri Jun 28, 2013 4:16 am  (#82) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Thanks Rod!
I did what you suggested (maybe someone else will do the same...)
btw, another thing about the FlattingTools: I guess the "Flatten" part (first entry under menu Flatting) is useless: I didn't see a use, so to test whether it's relevant to the main part "Multi-fill" I did remove it completely from my copy and tested again Multi-fill: it works alone.
Did I miss something about the use of Flatten? It says "Flattens an image that has been multicoloured", but this is already performed inside the Multi-fill; definitely I should have missed something...Can you help me also on that?

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Fri Jun 28, 2013 5:35 am  (#83) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
dinasset wrote:
Thanks Rod!
I did what you suggested (maybe someone else will do the same...)
btw, another thing about the FlattingTools: I guess the "Flatten" part (first entry under menu Flatting) is useless: I didn't see a use, so to test whether it's relevant to the main part "Multi-fill" I did remove it completely from my copy and tested again Multi-fill: it works alone.
Did I miss something about the use of Flatten? It says "Flattens an image that has been multicoloured", but this is already performed inside the Multi-fill; definitely I should have missed something...Can you help me also on that?

After running multifill you will have 2 layers.
1 colors
2 the comic outline
Select the comic (white and black lined layer) and run Flatten.
This will make little uncolored spots take the colour of the nearest area on the color layer.

Best i can explain it. The Flatten script is written inside the multifill script so you can run flatten from the multifill dialog or the menu link.
Rob A would explain better than i of course. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Fri Jun 28, 2013 5:58 am  (#84) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Thanks Rod,
I did as suggested: it really removes the black lines used as separators for the areas (the black and white layer becomes a white layer); is this the effect also for you or is it there something wrong in my version?
If this is the correct effect, I would say (for myself): use it when you like to see all the coloured areas without separating lines (sometimes, this is better, sometimes not)

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Fri Jun 28, 2013 6:29 am  (#85) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
dinasset wrote:
Thanks Rod!
I did what you suggested (maybe someone else will do the same...)
btw, another thing about the FlattingTools: I guess the "Flatten" part (first entry under menu Flatting) is useless: I didn't see a use, so to test whether it's relevant to the main part "Multi-fill" I did remove it completely from my copy and tested again Multi-fill: it works alone.
Did I miss something about the use of Flatten? It says "Flattens an image that has been multicoloured", but this is already performed inside the Multi-fill; definitely I should have missed something...Can you help me also on that?

The ability to run Flatten separately is provided because Multi-fill provides the option of "flagging" areas that are below a certain size (but larger than "joined" areas). These "flagged" areas are painted in the specified 'Flag color', which permits the artist to manually examine them to decide whether they should be the same color as the surrounding area (i.e., "joined"), or a different color from the palette.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Fri Jun 28, 2013 6:37 am  (#86) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Thanks Saulgoode!
But, as I asked to Rod, is it normal by using Flatten that black separators disappear? Just to know

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Fri Jun 28, 2013 9:21 am  (#87) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
Hi-

To answer a few questions:

- I wrote the script, which performs similar to a photoshop plugin that someone was looking for in gimp. I don't use it often myself, except for some texture creation. The name "Flatting Tools" comes from what the process is referred to by colourists.

- "Flatten" is meant to remove the black lines leaving only the coloured areas, and as SG mentioned, it is either used directly if selected in the multifill script or is available to be called manually after.

- The script works for me when called on a layer with transparent areas. The script uses the stock select by colour with threshold to select the background area

- There was an infinite loop which could occur if the script was invoked if there is no or very little of the selected bg colour in the image (nothing to do with transparency). I've added an explicit check for no colour, and added a check to detect the infinate loop situation and abort, with a message to run multifill without flatting. (It is a limitation of the built in dilate math that causes the loop).

- I can't reproduce the error "Unable to run GimpPdbProgress callback. The corresponding plug-in may have crashed." What version of gimp is this with?

I've uploaded the fix for the infinate loop to the gimp-plugin registry http://registry.gimp.org/node/14051 but it seems to have appended a _0 to the file, so if you replace yours, make sure the name is correct and the old one gets overwritten.

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Fri Jun 28, 2013 10:34 am  (#88) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
RobA, thanks for your attention.
I downloaded the new version replacing the previous one.
One quick reply (other tests will follow):
- the error messages
"GIMP Error
Unable to run GimpPdbProgress callback. The corresponding plug-in may have crashed."
still occur.
Did you load my initial draw on page 8 of this topic and try with that?
I did and I still get those messages (also Odinbc had my same result)
But I reply quickly only about this test because there must have been some other change in the script, so that the output -which was very nice as usual in spite of the errors- now is very poor in colours.
I attach here my new result, so you can verify yourself
(my environment is Win 7 32 bits, Gimp now at 2.8.6, was 2.8.4 previously)


Attachments:
new-out.png
new-out.png [ 88.67 KiB | Viewed 3080 times ]

_________________
"Where am I ?"
Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Fri Jun 28, 2013 10:54 am  (#89) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
additional tests:
- checked -as you said- that now an image with only transparent areas and black separator lines (typical output of script Pursuit Curve DOES NOT GO ANY MORE into an endless loop, I get immediately a totally black image; thanks for this important improvement
- checked that -if there is some coloured area and not only transparent ones- there is no error, but I get as result what I consider a "strange" output (maybe it's not so for you and other users); so I attach the result for your double-check
Attachment:
strange-for-me.png
strange-for-me.png [ 30.04 KiB | Viewed 3072 times ]

(note: I filled with white alternate spaces, I attach here also the input but in the preview everything appears to be white so you cannot see this alternated white-transparent areas
Attachment:
input-for-result-strange-for-me.png
input-for-result-strange-for-me.png [ 19.79 KiB | Viewed 3072 times ]

the sections which I filled with white are those that have been correctly filled with random colours by the plug-in

_________________
"Where am I ?"


Top
 Post subject: Re: Multi-Fill Script Help
PostPosted: Fri Jun 28, 2013 11:39 am  (#90) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
I confirm -through other tests- that with any kind of input, if one of the two "gradient" fill-options is selected, the gradient applied is always black-to-white.
Odinbc, could you double-check, please?

_________________
"Where am I ?"


Top
Post new topic Reply to topic  [ 312 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 16  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Seeking Help with First Multi-File Batch Script

9

No new posts Palette from multi image

2

No new posts Attachment(s) Fill with pattern seamless

13

No new posts Line art detection bucket fill

0

No new posts Filled path not exporting with fill

4



* Login  



Powered by phpBB3 © phpBB Group