add logo icon

This commit is contained in:
IntelOrca 2015-02-22 17:37:39 +00:00
parent 1bfbec6abe
commit d467557538
14 changed files with 2790 additions and 0 deletions

BIN
resources/logo/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

1408
resources/logo/icon_flag.svg Normal file

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 104 KiB

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
resources/logo/icon_x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
resources/logo/icon_x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
resources/logo/icon_x4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
resources/logo/icon_x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
resources/logo/icon_x8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

View file

@ -0,0 +1,44 @@
<Query Kind="Statements">
<Namespace>System.Drawing</Namespace>
<Namespace>System.Drawing.Imaging</Namespace>
</Query>
string inputDirectory = @"C:\Users\Ted\Documents\Programming\Projects\Hacking\OpenRCT2\resources\logo";
string outputPath = @"C:\Users\Ted\Documents\Programming\Projects\Hacking\OpenRCT2\resources\logo\icon.ico";
int numImages = 7;
using (FileStream fs = new FileStream(outputPath, FileMode.Create)) {
BinaryWriter bw = new BinaryWriter(fs);
bw.Write((short)0);
bw.Write((short)1);
bw.Write((short)numImages);
int dataStartOffset = 6 + (numImages * 16);
using (MemoryStream dataStream = new MemoryStream()) {
int size = 256;
for (int i = 0; i < numImages; i++) {
bw.Write((byte)(size == 256 ? 0 : size));
bw.Write((byte)(size == 256 ? 0 : size));
bw.Write((byte)0);
bw.Write((byte)0);
bw.Write((short)0);
bw.Write((short)32);
int dataOffset = (int)dataStream.Position;
int dataLength;
string inputImagePath = Path.Combine(inputDirectory, "icon_x" + size + ".png");
using (Image image = Image.FromFile(inputImagePath))
image.Save(dataStream, ImageFormat.Png);
dataLength = (int)dataStream.Position - dataOffset;
dataOffset += dataStartOffset;
bw.Write(dataLength);
bw.Write(dataOffset);
size /= 2;
}
bw.Write(dataStream.ToArray());
}
}