Skip to main content
Inspiring
August 2, 2022
Answered

How can I add filling background to images like that in Illustrator?

  • August 2, 2022
  • 4 replies
  • 6852 views

Hello

 

As you can see in the image there is grey or black, in between that cat, which is empty space. 

I would like to fill that in with black how can I do this so it adds up to shape?

 

I was thinking filling it  black but also outline the complete cat with a dark line so it matches.

Or some sort of automation shape recognition to add a background fast?

I have a lot of images like that left over from a designer of my past, where I need to do this.

 

If you have video links, can explain or else

please let me know

 

thanks in advance

 

This topic has been closed for replies.
Correct answer SergeantCojones

Sorry for just replying now. I was longer off than expected with vacation and other...

 

What you describe is exactly what I want to do.

 

My Problem is step 2 and 3 - How do I add a black fill to the copy cat and how do I create a compound path out of it.

It does not work!

 

I should mention: the cat and the rest of work I have, was made by a designer I paid and he used photoshop to create it. 

Because the full adobe package is so expensive, I deleted all the backgrounds from all the work he did, saved the files as PSD and I am now editing with Illustrator only.

 

If I select the cat, I always have a rectangle around it. I think it is an image. I tried Image tracing but for some reason it is deleting / ignoring the white parts.

 

Will I need photoshop to do what I want to do, or is there a way in Illustrator?

 

Coloring it with the buckettool also doesnt work for same reasons.

The original work files from him also do not contain his full "steps".

4 replies

Met1
Legend
August 29, 2022

I'd use image trace.

Whit.Bee
Inspiring
August 3, 2022

Another option would be to group the cat together and add a stroke behind the group. Have the appearance palette open so you can click and drag the stroke below the word "Content" after adding the stroke. Increase the size of the stroke until spaces until it appears like you want. This is an easy fast way to get fill in the spaces if you are also wanting the stroke around the whole thing. The screenshot attached shows what I mean by clicking and draging the stroke line to be below the Content, when you first add the stroke, it appears above it. 

Jacob Bugge
Community Expert
Community Expert
August 2, 2022

Sergeant,

 

As I (mis)understand it, you can obtain the black filling and outlining so the cat appears the same on top of any background as follows (two alternative ways described):

 

You can either:

 

0) Create a pale/contrasting background and lock it if not already;

1) Select all the cat parts and Ctrl/Cmd+G to Group, then Ctrl/Cmd+C+F to copy to the front and lock the copy cat (which hides the original Group);

2) Click on the copy cat to select the original Group and apply a black fill and no stroke to it, then Ctrl/Cmd to turn it into a Compound Path;

3) Object>Path>Offset Path with a positive offset value that is sufficient to close all the gaps between the (locked) cat parts of the Compound Path, this will create a single larger path beneath the Offset Path;

4) Click on the copy cat to select the Compound Path and delete it so you just have the larger path, showing beyween and round the copy cat;

5) Object>Path>Offset Path with a smaller negative offset value that gives you the desired thickness of the outline round the copy cat which is the difference between the positive and negative offset values (for an outline of 2pt, the negative value needs to be 2pt less than the positive value), this will give you a smaller black path on top of the larger one;

6) Click the the larger black path (near the edge) and delete it;

7) Delete the pale/contrasting backgroundfrom 0).

 

You may need to try 3) and 5) a few times using Undo in between until you are satisfied.

 

Or as an alternative way, in order to more clearly work with the black shapes without the copy cat in 2) - 5), you can (without the pale/contrasting background:

 

1) Select all the cat parts and Ctrl/Cmd+G to Group, then Ctrl/Cmd+C+F to copy to the front and hide the copy cat;

2) Select the original Group and apply a black fill and no stroke to it, then Ctrl/Cmd to turn it into a Compound Path;

3) Object>Path>Offset Path with a positive offset value that is sufficient to close all the gaps between the cat parts of the Compound Path, this will create a single larger path beneath the Offset Path;

4) Click on the Compound Path and delete it so you just have the larger path, then show the copy cat;

5) Object>Path>Offset Path with a smaller negative offset value that gives you the desired thickness of the outline round the copy cat which is the difference between the positive and negative offset values (for an outline of 2pt, the negative value needs to be 2pt less than the positive value), this will give you a smaller black path on top of the larger one;

6) Click the the larger black path (near the edge) and delete it;

 

 

SergeantCojonesAuthorCorrect answer
Inspiring
August 28, 2022

Sorry for just replying now. I was longer off than expected with vacation and other...

 

What you describe is exactly what I want to do.

 

My Problem is step 2 and 3 - How do I add a black fill to the copy cat and how do I create a compound path out of it.

It does not work!

 

I should mention: the cat and the rest of work I have, was made by a designer I paid and he used photoshop to create it. 

Because the full adobe package is so expensive, I deleted all the backgrounds from all the work he did, saved the files as PSD and I am now editing with Illustrator only.

 

If I select the cat, I always have a rectangle around it. I think it is an image. I tried Image tracing but for some reason it is deleting / ignoring the white parts.

 

Will I need photoshop to do what I want to do, or is there a way in Illustrator?

 

Coloring it with the buckettool also doesnt work for same reasons.

The original work files from him also do not contain his full "steps".

Jacob Bugge
Community Expert
Community Expert
September 1, 2022

Yes I do have the original of course. Everything for me is saved on different mediums and shapes.

 

 

Your right. The thing is Illustrator is just better for me creating shirt designs. In a lot of things it is so much quicker, perphaps its just more experience and use but initially I had all applications and learned both of them, then decided and realized Illustrator better/ ( or maybe jsut easier) for me.

 

 

I had a first run with image trace, where I could do all your steps and it worked just fine! The end result just had a outline on the knee - where for some reason on one side it was perfect on the other the outline was messed up thicker/thiner than on the opposite side. So I went back and tried to redo it multiple times but then it wouldnt work again, yet im certain I did everything the same way. I do not understand. Sometimes I do the image trace and all thats left from the cat is the nose!! lol. Most of the time I have the blue parts perfectly matched but then the part with white filling gets earased. Program can sometimes drive me crazy as the outcomes are differing or maybe I did something slightly different which I do not understand. 

 

Best for me would be photoshop + Illustrator.. but there is no plan for that, only all applications, which while I am not profitable is too much for me currently. And sometimes I just have no time for weeks or days because main work and other duties. 

 

On the weekend I will try again with the input you guys gave me. Thank you.

 

If u have any more info to give here beforehand I try my hours again 😄 I be thankful.

 

Coming back soon.

 


Sergeant,

 

"Yes I do have the original"

 

I believe it is worth trying to Image Trace the original, with the background, remember to avoid Ignore White ("but then the part with white filling gets earased")

 

Hopefully useful links:

https://helpx.adobe.com/illustrator/using/image-trace.html#tracing-option-preset

https://helpx.adobe.com/illustrator/using/combining-objects.html#pathfinder

 

For an all vector solution, I hope it is possible to do it as follows (some of the steps involve creation of backups to fall back on if needed, they can be omitted if you durst):

 

1) Place the image (as a link) and Ctrl/Cmd+C+F (Hold Ctrl or Cmd and press F) to create a copy in front, then lock and hide the original in the Layers panel;

2) Image Trace, concentrating on settings that make the background form one contiguous path including both what is within the cat and what is round it, remember to Expand it;

3) Change the colour of the background path to black if not already, then lock the background path and Ctrl/Cmd+A to select the actual cat, then Ctrl/Cmd+G to Group it, then Ctrl/Cmd+C+F, then lock and hide both cat Groups, so you only see the background;

 

At this stage you can show the original image from 1) temporarily to see that the background path fits (if all goes well), remember to hide it again; the background path is a Compound Path;

 

4) Unlock and select the background and Ctrl/Cmd+C+F to create a copy in front, then lock and hide the original background path in the Layers panel as backup;

 

Now you can work with Offset Path as described ealier, only with the background and in a reversed way as follows:

 

5) Select the (copy) background path, then Object>Path>Offset Path with a negative offset value that equals the desired outer stroke thickness round the cat;

 

If this has removed all the inner parts that formed the gaps within the cat, you can jump to 8), otherwise Ctrl/Cmd+Z to Undo and:

 

6) Object>Path>Offset Path with a negative offset value that is sufficient to remove the inner parts that formed all the gaps within the cat;

7) Object>Path>Offset Path with a smaller positive offset value that gives you a gap equalling the desired outer stroke round the cat (subtract the desired outer stroke thickness from the value in 6));

 

Now the whole in the background (compound) path is exactly the background you need, so time for the final part:

 

😎 Ctrl/Cmd+C+F to create a copy in front, then lock and hide the copy in the Layers panel as backup;

9) Ctrl/Cmd+A to select the live background path (again), then Object>Compound Path>Release to get two solid paths, then delete the outermost one;

 

Now you have a solid background that ought to fit the actual cat parts as desired, so:

 

10) Unlock and show and select one of the actual cat Groups from 3) in the Layers panel, then Ctrl/Cmd+X+F to bring it to the very top;

 

Now you (hopefully) have the cat Group on top of the background path which forms both the black inner cat parts and gives the desired black outline; then finally:

 

11) Ctrl/Cmd+A and Ctrl/Cmd+G to form a Group of the artwork.

 

 

If all is well, you can copy the Group from 11) to a new Layer, and keep or delete the original Layer to get rid of all the unneeded parts (if you durst).

 

The full background will prevent gaps/anti aliasing ugliness between the cat parts and the background.

 

Monika Gause
Community Expert
Community Expert
August 2, 2022

Can you please show the outline view? Also I don't think I fully understand what you want to do.