[solved] Keep only Black and White Colors

Hello, I “cleaned” (remove dusts) a tif file with only two colors: black and white. The purpose is to color it for comics. But I don’t find how to save the tif file keeping the two colors without any grey. In CSP and Affinity Photo I can choose “adjacent color” that does not create grey in rendering. But I cannot find a similar function in Krita.

Hi

Krita doesn’t manage pure white & black color space (1bit depth)

To my knowledge, in your case the best thing you can do is to save your document as grayscale (8bit color depth), and then convert it to 1bit color depth with a third party tool (like image magick for example)

Or you can use GIMP if you want to work directly in 1bit depth color space

And during export, use pack bits compression method

As result, you have a true TIFF file 1bit color depth

Grum999

1 Like

Another solution is to work as 8bit greyscale

Threshold image to remove itnermediate grey color

And save it in greyscale 8bit, using deflate or LZW compression method

But it’s not true 1bit TIFF document, if it’s what you want

Grum999

Are you sure you don’t want any grey? That means no anti-aliasing, either, so the lines might not look smooth.

In Krita there is a Pixelize filter, but since you are working specifically on black & white, using Desaturate and/or converting to GRAYA color space (to be 100% sure you don’t hqve any other colors) and then Levels or Treshold would be a better option because it gives you better control over the result.

The comics editors need often a 1200 dpi line file (only black and white). So, after scanning my line work (I work traditionally on paper), I prepare it for a only two colors tif file - in Affinity Photo because I find the result more efficient with Affinity. I use this method (for PSP) https://pauldiamondblow.com/samurai-graphics/scan-line-art.html. It seems I won’t be able to clean these line files in Krita. Too bad but not a very big deal as I have some alternative.

Thanks for your answers.

Hmm, I don’t understand why you are convinced now you can’t do that in Krita?

The only limitation of Krita is not being able to save in 1bit, but you only said “must be 1200dpi and just black & white” which is completely possible and not difficult to do if you follow my steps of @Grumm999 's second tutorial.

Well, @Grumm999 tuturial is the way I tried to export the file - except I don’t need the Threshold filter as the imported file is already in two colors. But the file exported in LZW compression showed greyed pixels. I will make another test.

1 Like

OK, Krita is behaving as intended. I thought there was a problem because I’m used to check tif files in XnViewMP. And for some reason, XnViewMP shows grey color. Krita is OK. Sorry.

2 Likes

I’m glad :slight_smile: I started to fear that maybe the compression introduces grey, and the only solution is in fact the 1 bit image, but good to know it isn’t necessary after all and Krita does work well enough with this workflow.

2 Likes

Last question about this: to work on my colors, I resize the 1200 dpi file to a 300 dpi file. I suppose that Krita will add some grey in the operation and there is no way to keep two colors ?

Hi

If you just change dpi value, number of pixels won’t change and then no grey pixels will be appear

If you resize canvas (change pixels size), according to algorythm you’ll choose, you will have or not have (in case of “nearest neighour” algorythm) grey pixels

Grum999

You could, in theory, use Nearest Neighbour filter that would ensure no grey. But I don’t think it would look good. So, best option would be to use something like Bicubic (unless you have some other preferred filter) and then use some filter to bring it back to black & white.

If you find yourself doing the same thing multiple times (on every image you edit), you could make a Python script applying it all automatically, most probably. Also in Filter menu there will be “Apply filter again with the same settings” options, that will speed up your editing when you do it multiple at a time, too.

This image suggests you might want to try Lanczos filtering, since it keeps most of the color (so it will get less blurry, keeping most pixels either black or white, and only some grey) and has nice, more natural curves (unlike Bilinear, which is blocky):


You did say that the imported image is already in b&w, but I guess that usually the initial image is a scan, which means with grey values, right? If so, you’ll get better results if you first scale it up, and then do all the things needed to get the b&w sketch. Filters will be 4x slower, but you’ll get better results in the end.

If you just change dpi value, number of pixels won’t change and then no grey pixels will be appear

OK. So it will work as intended. Thanks.

1 Like

I do not prepare my scanned images in Krita as I found it was much slower than CSP and Affinity Photo to apply filters on big size images.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.