gotcha

Author Topic: Transparent background issue  (Read 1107 times)

November 09, 2018, 01:06:04 AM
Read 1107 times

dashwood

  • Sr. Newbie

  • Offline
  • **

  • 7
 Hello.
I'm very new to Inkscape and have learnt some of the basics, one of which is to create a transparent background.  Most traces have been 100% successful until now.  It hasn't worked with one of my own hand-drawn designs.

I've created a christmas tree design.  I put it in my scanner.  I Scanned it in and converted it to an SVG.  Then I followed the process to trace the image and remove the background.  As there are a lot of shades of green I selected around 30 colours to ensure I got a good image when I executed the trace.  However, see attached copy which clearly still shows some of the background.  There is a grey smudge all around the base which isn't visible on the original sketch (which I did in coloured pencil).  I've tried re-scanning it.  Completely stumped.   :(

I'm hoping this is a very easy fix or I have made a dead simple error.
Has anyone had this issue, and knows how to resolve it?  I am prepared to re-draw the image if that's the only answer.

Thanks everyone!  :hh:
  • 0.92.3
  • Mac OSX

November 10, 2018, 10:06:52 AM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Can you post a screenshot of your trace bitmap settings?

November 10, 2018, 10:37:14 AM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
And/Or if you could share the original, I'd be glad to do some trial and error.  Or is that trio of trees actually the original?

You should be able to select that smudge and delete it.  Although you might have to make a few to several selections, before you get all of it.  It's hard to know for sure, by looking at the PNGs.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

November 10, 2018, 10:40:25 AM
Reply #3

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Hi.

Would suggest scanning at a higher resolution and with less compression if possible.
Then, in a raster image editor correcting the colours. Gimp has a "curves" option you can adjust the background to be fully white.
Then you could try the trace bitmap with better luck -although such an image could be traced by hand with way better results -just one path with a gradient fill for the tree etc.

November 12, 2018, 03:07:19 AM
Reply #4

dashwood

  • Sr. Newbie

  • Offline
  • **

  • 7
Hello and thank you for your reply!  Much appreciated.

I've attached a screenshot of the Bitmap Trace settings I've selected.
Many thanks

Can you post a screenshot of your trace bitmap settings?
  • 0.92.3
  • Mac OSX

November 12, 2018, 03:10:53 AM
Reply #5

dashwood

  • Sr. Newbie

  • Offline
  • **

  • 7
Hi Bryn

Thank you for your reply.  Much appreciated.

I've attached the original artwork scan, very happy for you to have a look at it and see if you might have another way of doing this.  I'm not that confident with Inkscape, and although I did select the eraser, it didn't work. 

Anyway, I'd be interested to see how you get on.  The scan includes the perforated edge of the page which it is my intention to remove by the way.  But that's image how it's turned out from scanning it through a CanoScan.
Thanks again

And/Or if you could share the original, I'd be glad to do some trial and error.  Or is that trio of trees actually the original?

You should be able to select that smudge and delete it.  Although you might have to make a few to several selections, before you get all of it.  It's hard to know for sure, by looking at the PNGs.
  • 0.92.3
  • Mac OSX

November 12, 2018, 03:15:37 AM
Reply #6

dashwood

  • Sr. Newbie

  • Offline
  • **

  • 7
Hi

Thank you for your response.
Unfortunately, Gimp doesn't work on my version of MAC which needs replacing, although I've heard Gimp is good.  I will look into scanning a higher resolution image anyway.

I think at the end of the day if it requires tracing the image by hand that might prove challenging because of the swirling lines which surround each tree.  Tracing around those would be nearly impossible.  :b1:

Kind regards



Hi.

Would suggest scanning at a higher resolution and with less compression if possible.
Then, in a raster image editor correcting the colours. Gimp has a "curves" option you can adjust the background to be fully white.
Then you could try the trace bitmap with better luck -although such an image could be traced by hand with way better results -just one path with a gradient fill for the tree etc.
  • 0.92.3
  • Mac OSX

November 12, 2018, 01:20:37 PM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Ok, attached is the result of my trace, using the exact same settings you reported.  You can see a sort of smudged area on the left edge of the paper.  But if you look closely at the original, you can see it there too. Well actually I think it's more of a shadow.  Maybe the scanner lid wasn't closed all the way, and the paper was slightly curled?

You must have traced a different image for the result you showed us.  Although Inkscape can't convert just any image faithfully, it can be surprisingly faithful!

It might be a bit tedious, but it should be possible to separate that area from the rest of the image, and delete the objects which create the shadow.  But you mentioned cutting off the spiral ring edge.  Do you know exactly how you're going to do that yet?  Because you could just cut off that shadow on the left, as well.  Theoretically.

Before I start some trial and error, can I ask what you're going to do with this?  The reason why you want to convert it to vector?  It might make certain settings more or less helpful.

I certainly don't think you'll need to re-draw the whole image.  Maybe get a better scan.  But the one you've shared with us is in very good shape, and should work well.  It just would be helpful to know where you're going after this (print on a holiday card, make a tshirt, print on a flyer, etc) before I try different settings.

It's a lovely drawing, by the way!
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

November 12, 2018, 01:30:31 PM
Reply #8

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Oh, now that look more closely, there are some darker areas behind the trees.  Just very light, but it's there.  And that's going to much harder to delete!  But I think it's just anomalies from the scan.

Does your scanner have a lid?  Or is it the kind where the paper goes around a spindle?  If it's a shadow because the paper isn't completely flat, maybe you could weigh it down with something?

Or could that shadowing effect behind the trees come from your hands?  You know, your hand rests on some area where you've already colored and when you put it down on another part, some of the colored pencil media is transferred?  I've often seen that with hand-sketched, scanned-in images.

But again, so much depends on what you're going to do with this.  It's hard to make suggestions without knowing that.  There may be a fairly easy way to get rid of those shadows.  But it might not work with your end goal.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

November 13, 2018, 11:51:19 AM
Reply #9

dashwood

  • Sr. Newbie

  • Offline
  • **

  • 7
Hi Brynn

Thanks so much for having a go at another trace. 

I think you've hit the nail on the head though, because on thinking about this, I coloured the trees in using oil based pencil, and then blended them with coconut oil using a cotton bud.  I think some traces of oil got onto my hands, and where I've leant on the paper it's left an invisible smudge which is only visible when I try and remove the background.

What I want to do is create individual trees that can be added onto christmas card designs, cushions and other products.  If the background isn't white, the smudge completely ruins it.  I want to use these as Vector graphics, so I have the flexibility of putting them onto anything without any shadows or background which could get in the way.  As when I execute the trace the smudge appears as grey which looks awful on white paper.  I think the only answer is to re-draw them again and colour them in but be extremely careful when blending them and using a cloth to lean on this time.  I've had the same issue with two individual trees which have the same problem because of the oil. Just goes to show how much detail Inkscape picks up!

Its' a hard lesson, I'm gutted but there you go.  I wanted to get the image ready so that my Christmas cards are done quickly before I miss the boat!  :help2:

Does my explanation makes sense?  I can't see any way around it as tracing around each individual spiral would be so time consuming I might as well scrap these designs and start again.  Would you agree?

Thanks for your help and input.

Oh, now that look more closely, there are some darker areas behind the trees.  Just very light, but it's there.  And that's going to much harder to delete!  But I think it's just anomalies from the scan.

Does your scanner have a lid?  Or is it the kind where the paper goes around a spindle?  If it's a shadow because the paper isn't completely flat, maybe you could weigh it down with something?

Or could that shadowing effect behind the trees come from your hands?  You know, your hand rests on some area where you've already colored and when you put it down on another part, some of the colored pencil media is transferred?  I've often seen that with hand-sketched, scanned-in images.

But again, so much depends on what you're going to do with this.  It's hard to make suggestions without knowing that.  There may be a fairly easy way to get rid of those shadows.  But it might not work with your end goal.
  • 0.92.3
  • Mac OSX

November 13, 2018, 01:47:48 PM
Reply #10

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Does my explanation makes sense?  I can't see any way around it as tracing around each individual spiral would be so time consuming I might as well scrap these designs and start again.  Would you agree?

Yes, if the problem happened during the drawing, it will be very hard to remove from the vector.

I like the design very much, but I guess as an artist, it's probably hard to make 2 drawings that are identical.  I'm not really an artist.  But on tv I've seen painters use a strip of wood, like an old fashioned wood ruler, or something that's raised up from the surface, so they have a place to rest their hand without smudging the work.  I haven't noticed exactly how it's set up, but should be easy enough to jerry-rig something, if in fact there's not already some kind of contraption that you can buy at an art store.  Unless you change the cloth every time you move your hand, I would worry the cloth would transfer the medium just like the hand.

On the other hand, let's get some input from people who know raster graphics programs better than I do.  I have a feeling there might be a way to color correct the scan.  I don't know how, but it seems like it should be possible.

However, for the files where you want to apply the design to fabric, there's a special feature of Trace Bitmap that should make it really easy to remove the smudges.  For applying the design to fabric....well, I don't know about every way that exists.  But for screenprinting, here's the story.  That way you made the trace, I don't know if you've ungrouped the trace result, and tried taking it apart to see how it's made, but you could try it.

The way you and I both traced, each color occupies a z-level (not really a layer, but sort of).  I think the darkest color is on top, and the lightest on the bottom.  And they all overlap each other.  Where the darkest color is, there are 32 z-levels of paths, all stacked up.  That works fine (apparently) for some kinds of printing.  But for applying on fabric using screenprinting, as far as I've heard, you can't have the overlapping.

So if you uncheck Stack Scans, Inkscape cuts all the paths so that there is no overlapping, and each color comes right to the edge of the next, and stops there.  Since it does that, it should be fairly easy to select the smudge pieces and delete.  I don't know if you could use that for all your purposes, but maybe for some.  Maybe for all, I'm just not sure.  So if you've already chosen a print shop, or if you're going to use an online service, or whatever, you might want to contact them and ask about how the file needs to be structured.  Because for some of your needs, the current scan might be fine, and you just need to uncheck Stack Scans and do a new trace.  (And then delete the smudge pieces.)

Keeping my fingers crossed that you don't have to draw it again   :xf2:
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

November 14, 2018, 03:29:53 AM
Reply #11

dashwood

  • Sr. Newbie

  • Offline
  • **

  • 7
Hi

Thank you very much for your very helpful response.  I've done a fresh scan, but it requires me to select about 40 colours to produce a good image.   The less layers I select I don't get the smudge though.  But when I apply the design to a card for example, its very poor quality. 

I've tried selecting the layers individually to get rid of the smudge layer, but that's another learning curve as I haven't worked with individual layers before so it's getting even more complicated.  It's a case of if you know how to do it, it could probably be fixed in seconds.  I selected unstack layers, but I can't select each one individually once I've completed the trace.

At the moment, I'm using the image with the white background as still haven't solved this problem. 

Thanks once again for your help however.

Does my explanation makes sense?  I can't see any way around it as tracing around each individual spiral would be so time consuming I might as well scrap these designs and start again.  Would you agree?

Yes, if the problem happened during the drawing, it will be very hard to remove from the vector.

I like the design very much, but I guess as an artist, it's probably hard to make 2 drawings that are identical.  I'm not really an artist.  But on tv I've seen painters use a strip of wood, like an old fashioned wood ruler, or something that's raised up from the surface, so they have a place to rest their hand without smudging the work.  I haven't noticed exactly how it's set up, but should be easy enough to jerry-rig something, if in fact there's not already some kind of contraption that you can buy at an art store.  Unless you change the cloth every time you move your hand, I would worry the cloth would transfer the medium just like the hand.

On the other hand, let's get some input from people who know raster graphics programs better than I do.  I have a feeling there might be a way to color correct the scan.  I don't know how, but it seems like it should be possible.

However, for the files where you want to apply the design to fabric, there's a special feature of Trace Bitmap that should make it really easy to remove the smudges.  For applying the design to fabric....well, I don't know about every way that exists.  But for screenprinting, here's the story.  That way you made the trace, I don't know if you've ungrouped the trace result, and tried taking it apart to see how it's made, but you could try it.

The way you and I both traced, each color occupies a z-level (not really a layer, but sort of).  I think the darkest color is on top, and the lightest on the bottom.  And they all overlap each other.  Where the darkest color is, there are 32 z-levels of paths, all stacked up.  That works fine (apparently) for some kinds of printing.  But for applying on fabric using screenprinting, as far as I've heard, you can't have the overlapping.

So if you uncheck Stack Scans, Inkscape cuts all the paths so that there is no overlapping, and each color comes right to the edge of the next, and stops there.  Since it does that, it should be fairly easy to select the smudge pieces and delete.  I don't know if you could use that for all your purposes, but maybe for some.  Maybe for all, I'm just not sure.  So if you've already chosen a print shop, or if you're going to use an online service, or whatever, you might want to contact them and ask about how the file needs to be structured.  Because for some of your needs, the current scan might be fine, and you just need to uncheck Stack Scans and do a new trace.  (And then delete the smudge pieces.)

Keeping my fingers crossed that you don't have to draw it again   :xf2:
  • 0.92.3
  • Mac OSX

November 15, 2018, 08:52:24 AM
Reply #12

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I selected unstack layers, but I can't select each one individually once I've completed the trace.

After you do the trace, you need to Ungroup.  When you do that, you'll see lots of bounding boxes (the dashed line rectangles).  Then deselect everything.  And then you'll be able to select the individual pieces.

Edit
Ungroup button in the command bar  :ung: or Object menu > Ungroup, or a key shortcut (Shift + Ctrl + G)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

November 16, 2018, 03:13:16 AM
Reply #13

dashwood

  • Sr. Newbie

  • Offline
  • **

  • 7
Thanks very much.  I will give it a go! 
Many thanks
I selected unstack layers, but I can't select each one individually once I've completed the trace.

After you do the trace, you need to Ungroup.  When you do that, you'll see lots of bounding boxes (the dashed line rectangles).  Then deselect everything.  And then you'll be able to select the individual pieces.

Edit
Ungroup button in the command bar  :ung: or Object menu > Ungroup, or a key shortcut (Shift + Ctrl + G)
  • 0.92.3
  • Mac OSX