Switch to full style
Non-Gimp related posts here
Post a reply

Convert Color Photo to Line Art (Plug-in or instructions)

Sat Sep 22, 2012 2:34 pm

Hi All, I'm new to the forum and to GIMP. I need to convert a lot of color photographs to line drawings. It seems there must be a plug-in or something that would make this an easy process in GIMP. I can't be the only person who has ever needed to do this! Any help would be greatly appreciated.
Dan

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Sat Sep 22, 2012 2:44 pm

HI astromandan. Welcome to GIMP chat...theres lots of ways to do this but I am sure the wise owls here will be able to help you out with some tutorial suggestions.

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Sat Sep 22, 2012 3:11 pm

Isn't there an option to do this in the Gmic plugin?

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Sat Sep 22, 2012 3:24 pm

When you have your image, duplicate that image. Highlight the 'bottom' copy and go to Filters - emboss. Leave on default settings and 'OK'. Then highlight the 'top' layer and up above the layers is a dropdown menu labelled Mode: Normal. Change Normal to Dodge. I'm sure after you finish several images it will go quickly.

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Sat Sep 22, 2012 3:29 pm

Hey, brucepr5150, here's what I got. I'm not sure if that's what astromandan was looking for, but I like it!

Image

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Sat Sep 22, 2012 3:51 pm

Or, if you want a b/w line drawing effect you can simply go to Colors menu and choose Threshold.

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Sat Sep 22, 2012 4:07 pm

GMIC has many different sketch settings in Artistic menu.Try a few of those also. :)

By the way welcome to Gimp Chat!

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Sat Sep 22, 2012 4:25 pm

Here's a couple
quick-sketch.scm
http://registry.gimp.org/node/5921

lasm-line-art.scm (with no texture)
http://gimpfx-foundry.sourceforge.net/b ... ne-art.scm

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Tue Dec 28, 2021 3:46 am

Odinbc wrote:Here's a couple
quick-sketch.scm
http://registry.gimp.org/node/5921

lasm-line-art.scm (with no texture)
http://gimpfx-foundry.sourceforge.net/b ... ne-art.scm


The line art script throws these errors:
Image

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Tue Dec 28, 2021 6:03 pm

Using the approach described below.
I managed to get this result.
Your mileage may vary.

sample_oo.png
sample_oo.png (408.98 KiB) Viewed 2184 times



Image To Line Art

Duplicate image 2 times.

Top layer: Reduce saturation to -100.
Set layer mode to saturation.

Middle layer: Set layer mode to dodge.
Invert color, Gaussian Blur image.
Note: Image size determines the amount of blur.

Bottom Layer: Adjust color levels as desired.

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Wed Dec 29, 2021 2:09 am

If you have G'mic then you can get this result at Artistic> Comic book.

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Wed Dec 29, 2021 5:55 am

A fix for the more obvious syntax changes, script attached. Originally for Gimp 2.4

What does not work? gimpressionist - maybe someone can find out why. Even the script says
Tip: If you do not have a good Gimpressionist preset, simply hit cancel at the Gimpressionist dialog window, and you will still get a good greyscale line-art." So best way is just disable that option.

No doubt it can be broken in use, but a quick demo. https://i.imgur.com/6l9uADh.mp4

...but as pointed out, there are plenty of other options.

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Wed Dec 29, 2021 6:06 am

I post my way if someone is interested in it. :paint

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Wed Dec 29, 2021 8:49 am

Just indicating another option among the many available:

Tim Tran's Plugin - Picture To Liene Art
Plugin Picture To Line Art
https://gimplearn.net/viewtopic.php?p=3522#p3522

It has worked on all the latest versions of Gimp I've used and even on this current one 2.10.28

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Wed Dec 29, 2021 1:42 pm

rich2005 wrote:A fix for the more obvious syntax changes, script attached. Originally for Gimp 2.4

What does not work? gimpressionist - maybe someone can find out why. Even the script says
Tip: If you do not have a good Gimpressionist preset, simply hit cancel at the Gimpressionist dialog window, and you will still get a good greyscale line-art." So best way is just disable that option.

No doubt it can be broken in use, but a quick demo. https://i.imgur.com/6l9uADh.mp4

...but as pointed out, there are plenty of other options.


I downloaded the updated version but it doesn't show up in FX Foundry-->Artistic or in Script-Fu->Lasm's FX Effects->Line Art as the script states when looking into the code. I'm using gimp 2.10.30 on windows 10 64 bit.

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Thu Dec 30, 2021 11:19 am

If it is not necessary to strictly keep to line only: allowing representation of tonal values for example by stippling, there are more options, this being a good retro one:
https://wiki.evilmadscientist.com/Produ ... _with_Gimp

and more to be found by searching on this site and wider

it is difficult to match drawing for line, even with artificial intelligence, occasionally something original and better than a drawing or a good inspiration for a drawing can be created using digital photo manipulation

I am a believer in if you can write you can draw or if you can talk you can sing but most people haven't got the time for the learning curve, often because they are busy helping other people

for me Matisse, Picasso and Japanese sumi-e set the bar high

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Thu Dec 30, 2021 4:52 pm

Hello! :)
Here is yet another way:
  • Filters -> G'Mic -> Artistic -> Comic Book
  • Filters -> G'Mic -> Various -> Custom Code [Global]
    and paste
    Code:
    fx_blackandwhite. 0.299,0,0.587,0,0.114,0,0,0,0,0,0,0,0,0,2,0,0,0,16,4,0,0,0,50,50
    otsu. 4 n. 0,255

Here are examples:
giraffe_photo_small_lineArt2.jpg
giraffe_photo_small_lineArt2.jpg (78.58 KiB) Viewed 1645 times

wolf_on_ridge_small_lineArt2.jpg
wolf_on_ridge_small_lineArt2.jpg (66.45 KiB) Viewed 1645 times

kitten_white_sitting_small_lineArt2.jpg
kitten_white_sitting_small_lineArt2.jpg (72.76 KiB) Viewed 1645 times

Hope this helps!

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Fri Dec 31, 2021 11:02 am

Thank you so much cli345; it works great! :coolthup

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Sat Jan 08, 2022 2:57 pm

Happy to help and thanks also for your way! :)

Here is yet another way:
  • Filters -> G'Mic -> Artistic -> Comic Book
  • Filters -> G'Mic -> Various -> Custom Code [Global]
    and paste
    Code:
    if s==4 split_opacity. rm. fi
    +colormap. 8
    index.. [-1],0,1
    rm.
    rgb2hsl. split. c
    n. 0,1
    append c hsl2rgb
    fx_blackandwhite. 0.299,0,0.587,0,0.114,0,0,0,0,0,0,0,0,0,2,0,0,0,16,4,0,0,0,50,50
    fx_curves_interactive. 7,0,1,"7","0,0,20,80,100,100,-1,0,0,100,0,-1,0,0,100,100,-1,0,0,100,100,-1"

Here are examples:
examplesLineArt.jpg
examplesLineArt.jpg (199.41 KiB) Viewed 1539 times

Hope this helps!

Re: Convert Color Photo to Line Art (Plug-in or instructions)

Sun Jan 09, 2022 3:34 am

cli345, thanks again. Yes, the second code helps a lot. I see the lines being thinner with a nice result. :coolthup :tyspin
Post a reply