Check out Grant Acedrex, our featured variant for April, 2024.

Enter Your Reply

The Comment You're Replying To
🕸Fergus Duniho wrote on Tue, Mar 12 04:56 PM UTC in reply to H. G. Muller from 02:24 PM:

In your example, the black outlines were also appearing around the pieces in the Captured Pieces section, and this uses the same code no matter what the rendering method for the board. So, it's not the CSS rendering method that's at fault. This black outline is happening because the CSS rendering method is displaying them with the showpiece.php script, and the pieces in question are not in the proper format to work with this script. The pieces in use here are from the alfaeriePNG directory. The reason they are being displayed with showpiece.php is because they are 48x48 instead of the expected 50x50. So that smaller images do not get disproportionately enlarged by a background-size of contain, it runs smaller images through showpiece.php to pad them. However, the image I tested turned out to be a truecolor image, and the transparent color used was black (#000000) instead of green (#00ff00). Because of this, it could not determine and keep track of the transparent color, and instead of coloring the padded border with the transparent color, it colored it an opaque black. To fix this, there are three changes you can make to these images.

  1. Make the images 50x50 instead of 48x48. This will stop the need to pad these images when the squares are 50x50.
  2. Make them palette images, not truecolor images. Even with the image I tested, it had only 141 colors, which is within the capacity of a palette image. So, there was no reason to make it truecolor.
  3. Make the transparent color pure green. This is a convention adopted from Zillions-of-Games, which provides a means to detect the transparent color when other means are not working.

[UPDATE]I added some fallback methods for getting the transparent color, and now the pieces show up without the black border. However, there is an issue with the cross on the king. So, I still recommend modifying the pieces to work better with this script or to even not need it in this circumstance.[/UPDATE]


Edit Form

Comment on the page Game Courier Logs

Conduct Guidelines
This is a Chess variants website, not a general forum.
Please limit your comments to Chess variants or the operation of this site.
Keep this website a safe space for Chess variant hobbyists of all stripes.
Because we want people to feel comfortable here no matter what their political or religious beliefs might be, we ask you to avoid discussing politics, religion, or other controversial subjects here. No matter how passionately you feel about any of these subjects, just take it someplace else.
Quick Markdown Guide

By default, new comments may be entered as Markdown, simple markup syntax designed to be readable and not look like markup. Comments stored as Markdown will be converted to HTML by Parsedown before displaying them. This follows the Github Flavored Markdown Spec with support for Markdown Extra. For a good overview of Markdown in general, check out the Markdown Guide. Here is a quick comparison of some commonly used Markdown with the rendered result:

Top level header: <H1>

Block quote

Second paragraph in block quote

First Paragraph of response. Italics, bold, and bold italics.

Second Paragraph after blank line. Here is some HTML code mixed in with the Markdown, and here is the same <U>HTML code</U> enclosed by backticks.

Secondary Header: <H2>

  • Unordered list item
  • Second unordered list item
  • New unordered list
    • Nested list item

Third Level header <H3>

  1. An ordered list item.
  2. A second ordered list item with the same number.
  3. A third ordered list item.
Here is some preformatted text.
  This line begins with some indentation.
    This begins with even more indentation.
And this line has no indentation.

Alt text for a graphic image

A definition list
A list of terms, each with one or more definitions following it.
An HTML construct using the tags <DL>, <DT> and <DD>.
A term
Its definition after a colon.
A second definition.
A third definition.
Another term following a blank line
The definition of that term.