Commit Graph

18 Commits

Author SHA1 Message Date
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
Eduardo Cáceres
7eb64ea6fc Use read-only autoimplemented property when possible 2022-05-18 11:42:36 -05:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
teinarss
4a1e4f3e16 Use expression body syntax 2021-03-07 13:00:52 +00:00
Paul Chote
62fa3b7c9c Rename SpriteFrameType enums. 2020-12-25 18:51:25 +01:00
Paul Chote
ce09b402d0 Fix definition and use of non-indexed sprite color channels.
Our SpriteFrameType names refer to the byte channel order rather than
the bit order, meaning that SpriteFrameType.BGRA corresponds to the
standard Color.ToArgb() etc byte order when the (little-endian) integer
is read as 4 individual bytes.

The previous code did not account for the fact that non-indexed Png
uses big-endian storage for its RGBA colours, and that SheetBuilder
had the color channels incorrectly swapped to match and cancel this out.

New SpriteFrameType enums are introduced to distinguish between BGRA
(little-endian) and RGBA (big-endian) formats, and also for 24bit data
without alpha. The channel swizzling / alpha creation is now handled
when copying into the texture atlas, removing the need for non-png
ISpriteLoader implementations to allocate an additional temporary array
and reorder the channels during load.
2020-12-25 18:51:25 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
c253aaeb9d Replace for(;;) with while (true). 2019-06-08 18:46:03 +02:00
Paul Chote
f69c6ab3fb Update SharpZipLib to 1.1.0.
The default code page has been changed to UTF8
so our workarounds are no longer needed.
2019-03-30 20:47:22 +01:00
Paul Chote
5cc81f7bf7 Implement a simple managed png writer. 2019-03-14 01:01:49 +01:00
Paul Chote
ab6ae7bc8d Support 24 bit png loading. 2019-03-11 20:14:09 +01:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
Paul Chote
b41d4f5cee Allow Pngs to be created from pixel data. 2019-02-24 14:02:19 +01:00
Paul Chote
4f73b51240 Add Png.Save method. 2019-02-24 14:02:19 +01:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
52be0192f6 Add RGBA support to png parser. 2019-01-08 21:20:06 +00:00
Paul Chote
d2ee9bcad9 Move Png loader back to OpenRA.Game. 2019-01-08 21:20:06 +00:00