Page 14 of 14

Re: Feature request: Save installed engine automatically

Posted: Sat Nov 04, 2017 11:07 pm
by JoshPettus
Seems to work great, I made a test build if anyone would like to try it. Also, Harm if you could pull in the patches from Savannah master to your branch, that would make it easier for me make builds, as I have a few fixes there post 4.9.1 (also a few more translations).

http://www.mediafire.com/file/xc2hwnd3v ... _Intel.dmg

Re: Feature request: Save installed engine automatically

Posted: Sun Nov 05, 2017 1:40 am
by JoshPettus
Also one more thing. I have noticed that when I go to select themes, often the theme folders are greyed out until I change the search type from nothing to "All files" and reload the folder. This seems to me more a GTK issue, but is there anything we can do to work around it by having it choose "All files" from the beginning?

Not sure why I didn't notice this when we were testing this last year. Must have just come up in some GTK update...

Piece bmp images

Posted: Sun Apr 01, 2018 8:41 pm
by Ferdy
Regarding external piece image in bmaps dir, how do I create a bmp image that would work in winboard? For example piece6 and piece53 looks similar - an elephant. I would like to replace piece53 with say a Tiger but in a separate bmp dir and then change the path of external image for winboard to read.

I am only aware of the naming format.
piece0_21o.bmp
piece0_21s.bmp

where:
0 is the piece number
21 is the pixel size
o?
s?
piece0 is a pawn
image bit depth is 32

Thank you.

Re: Piece bmp images

Posted: Sun Apr 01, 2018 10:14 pm
by hgm
o = outline = white piece
s = solid = black piece

WinBoard in principle should understand any bitmap depth, but only the 32-bit format supports transparancy. With any other depth you would need a separate (third) bitmap with depth 1 (w = white) for indicating the alpha channel; where this bitmap is black the background will be erased, and then the o or s image will be drawn in its place. This only works for all-or-nothing transparency, so it would not work with anti-aliased pieces.

Unfortunately it is hard to make 32-bit bmp files; MS Paint does not seem to support it. I put some special code in XBoard to save a given-size rendering of the SVG piece images as Windows 32-bit .bmp files, and used this to make the bitmaps included with the AA distribution.

BTW, for a Tiger I always use the 'claw' image, which is actually drawn after a tiger's paw.

Re: Piece bmp images

Posted: Sun Apr 01, 2018 10:19 pm
by Ras
hgm wrote:Unfortunately it is hard to make 32-bit bmp files; MS Paint does not seem to support it.
What about Gimp? Sure, the UI is weird, but basic functionality and exporting to many formats is possible.

Re: Piece bmp images

Posted: Sun Apr 01, 2018 10:24 pm
by Evert
The counter point, of course, is that you should generally prefer .png to .bmp for... well, anything, really. Thing is, you need an external library (zlib+libpng) to read those, which is apparently non-trivial on Windows.

Re: Piece bmp images

Posted: Sun Apr 01, 2018 10:30 pm
by hgm
Indeed. WinBoard is based on native Windows API, and there is no support for PNG in that. I would love to have SVG support, so that one set of images would serve all board sizes, and I could use the XBoard SVG pieces. But the libraries you would need for that are often many times the size of the WinBoard executable, and would probably introduce all kind of problems by themselves.

The .bmp files are also getting inconveniently large, however, at 32 bit. I really don't need 32 bit at all, for what essentially just is a gray-scale image with transparency. And in fact the transparency is implied; on solid pieces, what is not black is transparent, and there is no white. On outline image, the inside of the outline is a mixture of white and black, the outside a mixture of transparent and black. Perhaps I could equip WinBoard with an internal pre-processor to convert 8-bit bmp files to 32-bit bitmaps with alpha channel, converting outside white to transparency.

Re: Piece bmp images

Posted: Sun Apr 01, 2018 10:47 pm
by Ras
hgm wrote:The .bmp files are also getting inconveniently large, however, at 32 bit. I really don't need 32 bit at all, for what essentially just is a gray-scale image with transparency.
Sounds like GIF, which is way simpler than PNG, and all patents are over.

Re: Piece bmp images

Posted: Mon Apr 02, 2018 12:49 am
by Ferdy
hgm wrote:o = outline = white piece
s = solid = black piece

WinBoard in principle should understand any bitmap depth, but only the 32-bit format supports transparancy. With any other depth you would need a separate (third) bitmap with depth 1 (w = white) for indicating the alpha channel; where this bitmap is black the background will be erased, and then the o or s image will be drawn in its place. This only works for all-or-nothing transparency, so it would not work with anti-aliased pieces.

Unfortunately it is hard to make 32-bit bmp files; MS Paint does not seem to support it. I put some special code in XBoard to save a given-size rendering of the SVG piece images as Windows 32-bit .bmp files, and used this to make the bitmaps included with the AA distribution.

BTW, for a Tiger I always use the 'claw' image, which is actually drawn after a tiger's paw.
After some searching found an editor that would work in Winboard.
Pixelformer, you can edit bmp and export it as 32 bit.
http://www.qualibyte.com/pixelformer/download.html