File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,11 @@ Type IndexedImageWriter
102
102
WriteInt(outputStream, 256 ) 'Number of colors in the color palette (4 bytes)
103
103
WriteInt(outputStream, 0 ) 'Number of important colors (4 bytes) - 0 when every color is important
104
104
105
- 'Color Table (4 bytes (RGBA ) times the amount of colors in the palette)
105
+ 'Color Table (4 bytes (BGRA (little-endian) ) times the amount of colors in the palette)
106
106
For Local paletteIndex:RGBColor = EachIn m_Palette
107
- WriteByte(outputStream, paletteIndex.m_R ) 'Blue (1 byte)
107
+ WriteByte(outputStream, paletteIndex.m_B ) 'Blue (1 byte)
108
108
WriteByte(outputStream, paletteIndex.m_G) 'Green (1 byte)
109
- WriteByte(outputStream, paletteIndex.m_B ) 'Red (1 byte)
109
+ WriteByte(outputStream, paletteIndex.m_R ) 'Red (1 byte)
110
110
WriteByte(outputStream, 0 ) 'Reserved (1 byte) - Alpha channel, irrelevant for indexed bitmaps
111
111
Next
112
112
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Type IndexedPixmap
29
29
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
30
30
31
31
Method PixelPtr :Byte Ptr (x:Int , y:Int )
32
- Return m_Pixels + (y * m_Width) + (x * BytesPerPixel [ PF_I8 ] )
32
+ Return m_Pixels + (y * m_Width) + x
33
33
EndMethod
34
34
35
35
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments