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 2, 2022

Sergeant,

 

Especially if the Image Trace of the actual cat parts is unsatisfactory, it may be better with another solution reusing the original raster image with background, 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 dare):

 

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 press Delete, so you only have the background from the Image Trace;

 

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 path and Ctrl/Cmd+C+F+F to create two copies in front, then lock and hide the first copy and the original background path in the Layers panel, the latter as backup;

5) Select the (top 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));

😎 Show and unlock and select the first copy of the background path from 4) and Ctrl/Cmd+X+F to bring it on top of the offset background path from 7);

9) Ctrl/Cmd+A to select both background paths, then Pathfinder>Minus back to form one single Compound Path.

 

Now you have a Compound Path that correspons exaclty to the filling inside the cat parts and the contour, so time for the final part:

 

10) Ctrl/Cmd+C+F+F to create two copies in front, then lock and hide both copies in the Layers panel, one as backup;

11) Ctrl/Cmd+A to select the original Compound Path from 10), then Object>Compound Path>Release, then Pathfinder>Add to shape area (Unite) to form a black (non compound) path;

12) Unlock and show the original image from 1);

13) Ctrl/Cmd+A, then Ctrl/Cmd+7 to use the path from 11) as a Clipping Mask for the image from 12);

14) Unlock and show one of the copies from 10), then Ctrl/Cmd+A and Ctrl/Cmd+G to Group everything.

 

Now you (hopefully) have the clipped original image with the Compund Path forming both the black inner cat parts and the desired black outline.

 

 

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

 

The original image in the background will prevent gaps, and the Compound Path on top will ensure sharp and crisp edges for the image.

 

 


Sergeant,

 

You can try both ways (if you have hours enough) and decide which way to use, also for the other images you have.

 

 

Or you can use a temporary monthly (not anually) Photoshop subscription, just for a month or a few, to get it done in a Photoshop way, then unsubscribe.

 

For that you can seek help over here,

https://community.adobe.com/t5/Photoshop/bd-p/photoshop

 

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.