Skip to content

Commit 4dce987

Browse files
authored
Merge pull request #3 from cortex-command-community/development
Merge v1.2.1 into Master
2 parents 748341f + 739f66d commit 4dce987

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ Arne's original bend code was used as base and has been modified and improved to
4343

4444
- Joint adjustment is only on Y axis and adjusts upper/lower marker equally.
4545
- Works only with input files that are 24x24px tiled (for each limb part. Max input image size is 192x24px for 8 limb parts (4 limbs)).
46-
- Files saved as Indexed BMPs have messed up thumbnails and do not open correctly in Photoshop. Tested to open correctly with MS Paint XP.
4746

4847
## Changelog
4948

cccp-bender-main.bmx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Import BRL.Stream
1313
Import BRL.EndianStream
1414

1515
'Version
16-
Global appVersion:String = "1.2"
17-
Global appVersionDate:String = "21 Sep 2019"
16+
Global appVersion:String = "1.2.1"
17+
Global appVersionDate:String = "22 Sep 2019"
1818

1919
Rem
2020
------- INDEXING ------------------------------------------------------------------------------------------------------
@@ -73,9 +73,8 @@ Type TBitmapIndex
7373

7474
WriteShort(dataStream,19778) 'File ID (2 bytes (short)) - 19778 (deci) or 42 4D (hex) or BM (ascii) for bitmap
7575
WriteInt(dataStream,bmpSizeTotalM4) 'File Size (4 bytes (signed int))
76-
WriteShort(dataStream,0) 'Reserved (2 bytes)
77-
WriteShort(dataStream,0) 'Reserved (2 bytes)
78-
WriteInt(dataStream,54) 'Pixel Array Offset (4 bytes) - pixel array starts at 54th byte
76+
WriteInt(dataStream,0) 'Reserved (4 bytes)
77+
WriteInt(dataStream,1078) 'Pixel Array Offset (4 bytes) - pixel array starts at 1078th byte (14 bytes Header + 40 bytes DIB + 1024 (256 * 4) bytes Color Table)
7978

8079
'------ DIB Header (File Info)
8180
WriteInt(dataStream,40) 'DIB Header Size (4 bytes) - 40 bytes
@@ -92,10 +91,14 @@ Type TBitmapIndex
9291

9392
'------ Color Table
9493
For paletteIndex = 0 To 255
95-
WriteByte(dataStream,palB[paletteIndex]) 'Blue (4 bytes) - offset 54
96-
WriteByte(dataStream,palG[paletteIndex]) 'Green (4 bytes) - offset 58
97-
WriteByte(dataStream,palR[paletteIndex]) 'Red (4 bytes) - offset 62
98-
WriteByte(dataStream,0) 'Alpha (4 bytes) - offset 66
94+
WriteByte(dataStream,palB[paletteIndex]) 'Blue (1 byte)
95+
WriteByte(dataStream,palG[paletteIndex]) 'Green (1 byte)
96+
WriteByte(dataStream,palR[paletteIndex]) 'Red (1 byte)
97+
WriteByte(dataStream,0) 'Reserved (1 byte) - Alpha channel, irrelevant for indexed bitmaps
98+
99+
Rem
100+
Color Table is 4 bytes (ARGB) times the amount of colors in the palette
101+
EndRem
99102
Next
100103

101104
'------ Pixel Array

0 commit comments

Comments
 (0)