I'm sorry, but it looks horrible (the alias) to me. I don't think that using paintbrush to recolor a picture is the best way, although many people recolor them this way. It's certainly better to decompose the original picture into several parts, for example black and white (but only black lines with white areas, not gray areas) and several color areas, which can be changed (HSV) independently to the others and merge them back into one picture using some kind of blend method.

This way, only colors are changed, nothing else. To decompose the picture, you can use various filters, which extract various channels or allow advanced desaturation. Of course, you'll probably need to divide the picture into several parts, and process them with these filters with different settings and then merge back, but filling colored areas with paintbrush with white color is not the optimal way, as you also delete part of the black lines, resulting in the alias, or just weird looking lines, if you used paintbrush with antialiasing (which of course, requires some more advanced editor than mspaint.exe and similar) and most importantly (horribly), some remaining pixels with the previous color.

Also, the JPG format is not much suitable for this kind of graphics. JPG was designed mainly for encoding photos, which are divided into 8x8px blocks and each one of them (each color channel is encoded individualy) is assigned one mathematical pattern, which, more or less, resembles the original block. This of course, causes some information to be lost (that's why it's called a lossy format/compression), usually loosing some smaller details, but in photos with many transitions, it's almost unnoticeable (if you don't use very high level of compression/low quality). However, this pattern is not designed to encode large solid color areas and sharp transitions, which usually results in not very good looking artifacts and creating a lot of differently colored areas (not totally different, but just slightly) from a color area with one color, especially around areas with different colors (you can notice it in that picture around the lines) and that looks quite ugly.

For encoding these types of pictures, it's better to use lossless format, like PNG (GIF is also possible, but today it's quite deprecated, since it's only 8b, thus supporting only 256 colors in one frame (you can, however, use special trick, involving dividing picture into several layers, each with different pallet and in each frame encode a part with 256 colors, in the next frame another part, but with different 256 colors and so on and set rendering to overlay - do not clear previous frame. Also you may use some non-standard implementation, but this will most likely cause compatibility problems ), which may be for some images ok, but PNG is more modern and may also have better compression ratio, support for 16,7 milions of color (24b) and dedicated alpha channel (32b), not just a transparent color like the aforementioned GIF). Since they contain a lot of repeating information (large single-color areas), lossless algorithm is the best for them, having good compression ratio and preserving all information from the original picture.

Anyway, I took the job of dividing that picture into multiple parts and created following file. It's a .PDN file, created in opensource Paint.Net image editor, but you can probably open it in other editors with support for this file format. You can find there several layers. One for the black and white decolored picture and 4 color areas (extracted from the original picture, not created manually, although I manually fixed some little details, but only a few pixels (if I forgot to fix something, I'm sorry, I must've overlooked), not the whole areas), using multiply blending mode (+original picture for comparison, which is hidden by default). All you need to to, is to adjust hue/saturation/value of each one of the color areas (It's also possible to use paint bucket, but I don't recommend that, as you may not alter all pixels properly, HSV (and other color-only manipulating functions) is the safe method) and you can create virtually any fur/eye/collar color, quickly and easily, without alias and other paintbrush side effects. Of course, you need to add other details (tag (I removed the fish tag for this purpose by the way), bite-mark for Max and so on) by yourself. If you do so, please, use anti-aliasing tools. Looking at some pictures edited by paintbrush is like "(sharp) wire into the eye", like we say (at least) in my country. I also included a PNG file with two layers (lines + merged color areas + result) and sample of recoloring (Grape > Max (without bell, bite-mark etc.)).

EDIT: Now I'm thinking, another method could be using some special algorithm (application, picture processing script...) to convert that bitmap picture into a vector image and just simply alter the color of the generated shapes. You can of course, create that vector image by hand, using bitmap picture as a source, but I think that conversion algorithm may be better. Those applications aren't usually free, but you can always create something by yourself, but that's not going to be so easy. Maybe if you process all pixels, isolating the contrasting/dark ones, creating an array of significant points and than using it to construct lines and export into SVG (which is basically XML plain-text document, so there's not special need for binary format)...?

_________________

hug_overflow.asm wrote:

LOOP: HUG #Peanut, #Grape PUSH ACC JMP LOOP

Mon Oct 12, 2009 1:12 pm

Dylan

Box Fox

Joined: Fri Jul 10, 2009 12:31 amPosts: 2275Location: Austin, Texas

Re: Housepets! Information Thread

Wow tails, that was amazing. I might have to try it like that from now on. I always converted mine to black and white using a threshold tool and manually had to fix the whole image until the lines looked right, then color it with a paint tool, (And a lot of other stuff like the bite mark) but like you said earlier this is not the best way to recolor.

_________________Make Pasta not war.

Last edited by Dylan on Mon Oct 12, 2009 4:54 pm, edited 1 time in total.

Too lazy shifting one or three sliders? However, I don't think it's awesome, I only applied several filters to already created picture, I think that person who created it in first place is awesome Anyway, these color layers don't have to be a solid color, it's possible to place virtually anything - a gradient, special effect or bitmap picture. However, you need to tune them carefully, so it won't look weird and confusing.Here's a sample how it may look, but I think that first two samples are weird (especially the second one, I just tried flame effect, to find out how it will look): Grape variations

Last edited by Buckdida on Mon Oct 12, 2009 5:10 pm, edited 1 time in total.

Mon Oct 12, 2009 4:45 pm

Sinder

Joined: Thu Dec 11, 2008 1:48 pmPosts: 1701Location: The Internet

Re: Housepets! Information Thread

Holy crap, did Peanut accidentally drop acid?

_________________

Mon Oct 12, 2009 4:45 pm

Frooxius

Joined: Tue Jul 28, 2009 6:00 pmPosts: 311Images: 43

Re: Housepets! Information Thread

No, Grape just prepared herself for the Halloween Anyway, as I said, it's only a example and the worst looking by my opinion.(by the way, where would Peanut get some acid? And why acid? I will probably say some color spray or something).

Alex:Lines are black, while other areas are not. Knowing this and understanding the RGB color space, you can easily remove all color areas. While black has RGB code rgb(0,0,0) (or #000000) and gray shades (lines in that picture are not only black, but they fade, so they look smooth, without alias (sharp ugly edges) ) have for example rgb(128,128,128) (or #707070) code (any gray shade always has value from 0-255 (in 8 bit color depth for one channel - 24 b without alfa channel) (0 = black, 255 = white), but all three channels have the same value), while colors (meaning other than white-gray-black) always have at least one channel with different value (rgb(255,255,0) for yellow, rgb(170,134,190) for Grape's fur etc). Using this, you can easily surpass all pixels with not equal values in all three color channels, leaving only those with equal values in their channels - black/gray lines. Equal channel values is what distinguishes those lines from other color areas and once you can distinguish them some how, you can also extract them.

I used for this a Advanced Desaturate effect (which is not supplied with Paint.Net by default (at least I think, I have it installed for a very long time (although this was first time I ever used this particular effect for something), so I don't remember if I added it manually, or if it was built-in), but you can find it on the Paint.Net's forum for free, together with many other useful plugins, often collected in plugin packs. They expand Paint.Net functionality quite significantly), because it allowed me to control value of each one of the RGB channels in the resulting picture.I also used (however for the original picture, not the black-lines one!) Extract Channel function to extract color areas (I used Hue channel, which provided most distinct areas useful for further processing), divided them into layers, posterized to single color and fixed small details and then colored them (using HSV tool! not paint bucket) for the final picture.

Anyway, I already added Paint.Net .PDN file to the first post, so you can open it and just adjust color of the color areas and save resulting picture. But you probably want to process different picture with this method, don't you?

Sinder: I see. I didn't know that "acid" could mean psychedelic drug (thus wondering why acid, I thought that Peanut dropped (spilled) acid at Grape, which caused her fur to change color somehow and that sounds quite weird to me, so again the wondering).

Ebly: I think that I know English enough to read the first article, so I don't really need Czech one, which I could easily find myself anyway

Ebly: I think that I know English enough to read the first article, so I don't really need Czech one, which I could easily find myself anyway

From your typing, I also thought you'd know English well enough to read the first article as well, but it was more me taking just-in-case measures and hoping it would be seen as nice rather than patronizing. :'D

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum