Coloring an Image

Here everybody can post his problems with PhotoLine
User avatar
mojosam
Mitglied
Posts: 8
Joined: Thu 26 Mar 2009 10:28

Coloring an Image

Post by mojosam » Sun 02 Dec 2018 07:19

I'm still very new to PL and have a lot to learn. I had a line drawing that I wanted to colorize. I eventually figured out a way to do it. See image below.

I needed a different colored gradient for each body segment. The only way I could figure to do that was to duplicate the image into 12 identical layers. Then create an image mask for each layer. The mask would only make visible the one colored body segment of its layer. The rest of that layer would be transparent. If you look at the layer list in the image below, you'll see what I did.

This took a while and seems cumbersome. Is there a simpler or more efficient way to produce the same final image?
You do not have the required permissions to view the files attached to this post.

Paul
Mitglied
Posts: 152
Joined: Fri 19 Dec 2008 11:36

Re: Coloring an Image

Post by Paul » Sun 02 Dec 2018 16:57

Hi, in my opinion there would be 2 alternatives. The simple one is to get rid of all the colours except the black, and use the flood fill function in each part with a gradient. Disadvantage is that you can't change the fill afterwards.
Another approach with a simpler image like this is to get rid of all the colours except the black. Then change the layer type to vector. This may need some experimenting for the right setting. And perhaps optimise the vector layer. When you now split the vector layer, all the parts are separated and vectorised. You can now fill each element with the desired fill gradient and change it afterwards if you want to. Also, you can group different elements and change the fill in one click. Disadvantages are that it is a bit more work and you depend on how accurate the conversion to vector is, which depends on the smoothness of the image. It may need some finetuning to get it smoother and/or sharper. But this can also be done after separating and filling.
But if the image is to be used multiple times, in different colours and ways and sizes, this is well worth the effort.

- Paul

chrischa
Mitglied
Posts: 116
Joined: Thu 19 Jul 2012 12:02

Re: Coloring an Image

Post by chrischa » Mon 03 Dec 2018 01:53

Actually it is possible to change a gradient filling in a bitmap line-drawing afterwards: add a new rgb-layer, select the flood fill function and activate "read merged" in the tool settings. Now do the colorizing on the new layer. This way, you can fill every part of the picture in a different color or gradient and change it as often as you want - for every part of the image. You can use one layer for all colors or parts of the picture or can add several layers. Thus you could add a layer style, that also can be edited. In my example I didn't use gradients, I only added "shadow inside" in several variants.
You do not have the required permissions to view the files attached to this post.
Photoline 21 unter Windows 10/64 Bit

Martin Huber
Entwickler
Entwickler
Posts: 3309
Joined: Tue 19 Nov 2002 15:49

Re: Coloring an Image

Post by Martin Huber » Mon 03 Dec 2018 17:04

My "solution" starts the same way as Chrischa's:

- Create a new transparent layer (gray or RGB)
- Switch to the floodfill tool (no overfill, but "read merged")
- Set the foreground color to black.
- Fill every hole of your line drawing.

You now have two image layers: One with the outlines and one with the filled areas.

Let's continue:
- Set the background color to white.
- Turn off the transparency of the fill layer (by using the Layer Attributes).
- Apply "Filter > Others > Minimum" with a size of 2.
- Convert the fill area to vector (by using the Layer Attributes), "Graphics, low quality" is sufficient.

The result should be a group containing two vector layers: a white one and a black one:
- Delete the white one.
- Resolve the group by using the context menu of the Layer List.
- Select the black vector layer and set the outline color to transparent.
- Apply "Layout > Vector > Optimize Vector Layer" with "Optimize Curves" turned on and a strength of 1.
- Apply "Split Vector Layer" (using the context menu of the Layer List).

Now you should have a set of vector layers which you can fill with your gradients. This allows you to edit the color gradients comfortably in the document window.

If you do this more often, you can record most of these steps as an action and simply replay it later on.

Martin

Martin Huber
Entwickler
Entwickler
Posts: 3309
Joined: Tue 19 Nov 2002 15:49

Re: Coloring an Image

Post by Martin Huber » Wed 05 Dec 2018 11:13

I have attached an action that executes the necessary steps. It expects a document with a single image layer containing the outlines.
When executed it creates the fill layer and will wait for you to fill the areas. After that you will have to press continue in the Action panel and it will finish its work.

I have added a few additional steps so that the overfilling by the vector layers doesn't affect the width of the outlines.

Martin
FillComic.actions
You do not have the required permissions to view the files attached to this post.

User avatar
mojosam
Mitglied
Posts: 8
Joined: Thu 26 Mar 2009 10:28

Re: Coloring an Image

Post by mojosam » Fri 07 Dec 2018 09:13

Thank you to everybody for your suggestions (Sorry for my delay. I had work stuff.).

I'll have to try chrischa's method also. It looks simplest for certain situations.

Martin, I was able to do what I needed by running your action. However, I am having trouble following your manual method. One of the steps is confusing. In the step that says "Resolve the group by using the context menu of the Layer List", what does "Resolve the group" mean?

Martin Huber
Entwickler
Entwickler
Posts: 3309
Joined: Tue 19 Nov 2002 15:49

Re: Coloring an Image

Post by Martin Huber » Fri 07 Dec 2018 10:26

mojosam wrote:
Fri 07 Dec 2018 09:13
In the step that says "Resolve the group by using the context menu of the Layer List", what does "Resolve the group" mean?
"Ungroup"-

Martin