Comments/Ratings for a Single Item
What I described earlier would be a routine in showpiece.php, but instead of doing that, I made the new pieces in Paint.net, which because it's a modern up-to-date paint program, can do some things that my longtime favorite Ultimate Paint cannot do. I made each image at ten times the size, colored it three times, and reduced each coloring to 10% of its size with a transparent black background. I made all the pieces for this game, but I still have to reproduce the other magnetic pieces.
If you are talking about bitmaps of piece that were rendered from some higher resolution (or vector image) using anti-aliasing on a white background, the pieces all having black outlines, then indeed, replacing the grey with black, and using the bitwise complement of the grey-scale value as alpha channel would mix in as much background as the original image would have mixed in white. Additional condition is that the image would not contain any internal grey pixels. This could be problematic with pieces that had purely white filling; the algorithm would treat the white filling the same as the exterior, and make the entire piece transparent.
This could be avoided by using a flood-fill-like algorithm, which only treats pixels which neighbored other pixels that were changed. And then start in a corner pixel.
Old bitmap images might not have anti-aliasing, though. These would just have a ragged boundary between an absolutely black outline and a uniform background of another color. (The original Alfaeries are like that.)
Additional condition is that the image would not contain any internal grey pixels.
I thought of that, which is one of the reasons I'm using Paint.net to design new pieces instead of trying to fix the old pieces.
Old bitmap images might not have anti-aliasing, though. These would just have a ragged boundary between an absolutely black outline and a uniform background of another color. (The original Alfaeries are like that.)
I didn't make the Alfaerie pieces, but I did use anti-aliasing when making the original Motif and Magnetic pieces. I believe I did it against a dark grey background, which was probably the best thing I could do on Ultimate Paint. With Paint.net, I can use transparent black as a background, and its anti-aliasing just looks better than what Ultimate Paint can do.
You are aware that there already exist SVG sets for Motif and Magnetic, in /graphics.dir/svg/ ?
Yes, but I'm making new pieces without making SVGs, and I want the entire set done consistently. Also, I just downloaded the Motif and Magnetic SVGs, and I found watermarks in them, because someone made them with an evaluation version of some CAD software.
I think it would be more useful to create the new pieces as SVG for consistency. I am not sure about the significance of the watermarks. They must be remnants of the original set of orthodox pieces, which I think were taken from the PyChess GitHub. The additional pieces were made from those by editing and combining them with Inkscape.
I am not skilled at using Inkscape, SVGs are not required for high quality images, and I’m not the one who made the other SVG images. There will naturally be more consistency with the same person doing every piece the same way with the same software. Trying to conform with what someone else has done will not look as consistent.
Using Inkscape is easier than using the programs for making raster images that I know. Because all the elements in the image (lines, circles, rectangles) keep separate identities all the time, and can be individually selected for repositioning, shape editing, scaling, coloring etc. Designing piece images does not require much more than defining curves by first clicking a number of points to define a polygon, then open that for shape editing, so that you can move around the individual points, and control the angles at which the line segments leave those (thus bending those into curves).
10 comments displayed
Permalink to the exact comments currently displayed.
I just woke up with an idea for improving the appearance of bitmap images. By changing any gray color (r = b= g) to a transparent black with an opacity based on the rgb value, it should look equally good against different colored spaces. If I make the initial background white, I can get results similar to starting with an SVG. I can then use this process on the new pieces I am designing for this game and make new magnetic and motif pieces.Now to try to get back to sleep after unloading this from my mind.