我有一個項目與德爾福7和VCL開發,編譯和新的德爾福XE7工作沒有任何修改,我遇到的唯一問題是,字形圖像儘管在設計時很好地顯示TBitBtn在運行時顯示錯誤(,因爲您可以看到顏色和位置不一樣)。德爾福XE7 TBitBtn圖像錯誤在運行時顯示
設計時間:
運行時間:
什麼會導致什麼問題?
注意
隨着老德爾福7,我沒有這個問題:圖像正確顯示無論是在設計和運行時間。
繼前3行中的DFM字形數據的:
Glyph.Data = {
36050000424D3605000000000000360400002800000010000000100000000100
080000000000000100000000000000000000000100000000000000164900001C
4D0000275700003C7100003D6E00004483000046760000467B0000548C00005B
...
,它是在Delphi 7和Delphi XE7相同。
如果點擊TBitBtn的Glyph屬性,我可以在對話框中看到圖像(錯誤的),如果我用OK進行確認,IDE會以這種方式更改DFM文件中的Glyph屬性(diff輸出) :
Glyph.Data = {
- 36340000424D3638000000000000360800002800000040000000400000000100
- 1800000000000030000000000000000000000001000000000000724242007B47
- 47007D4849007E4C4B00804C4C0081524F008155500083535200845754008458
- 56008459590085525200855B5700875D58008B6260008B6361008B6362008C65
- 63008C6664008D615C008D6665008D6766008E5A5A008F696800906B6A00916C
- 6B00935F5F00936F6E0094616100946F6F00957170009773730097747400986A
- 6600997777009C7B7B009E7D7D009F6B6B00A06C6C00A1818100A26E6E00A37B
- 7400A3817600A4707000A6727200A67C7600A6867A00A7737300A7877B00A983
- 7B00AA8E8E00AB8C7F00AC8A7F00AC8F8F00AE918300AE939300AF959500B190
- 8400B1958700B2999900B37F7F00B49B9B00B79F9F00B8848400B89FA000BA86
- 8600BB878700BBA5A500BC888800BE8A8A00C08B8B00C18D8D00C1A89700C2AD
- AD00C38F8F00C4A69800C5919100C7929200C8939300C9949400CA959500CB95
- 9600CB969600CCA79D00CDA49D00CF999A00CFBBA700D09D9C00D0BCA700D0BC
- A800D0BDA900D19C9C00D1BDA900D29F9E00D39E9E00D3AAA300D49F9F00D4B2
- A700D4C1AC00D4C1AD00D4C2AD00D4C5C500D6ABA500D6C8C800D7ADA700D7C5
- B000D8AFA800D8C7B000D8C7B100D8CACB00D9B1A900D9BEAE00DAB2AA00DAB3
- AA00DAB3AB00DACAB300DACECE00DBA6A600DBB4AB00DBB4AC00DBB5AC00DBB6
- AC00DBC1B000DBCBB400DBCCB400DCB6AC00DCB6AD00DCCCB400DDB7AE00DDB8
- AE00DDCDB600DEADAB00DEBAAF00DEBBB000DED4D400DFBCB100DFBDB100DFBD
- B200DFBEB200DFD0B900E0ADAC00E0B4AE00E0BDB200E0BEB200E0BFB300E0D2
- BA00E1ADAD00E1C0B400E1C1B400E1D1BA00E2BAB200E2C3B500E3C4B600E3C5
- B700E3C7B700E4C5B700E4C7B700E4C7B800E4C8B800E4C9B900E5C9B900E5CA
- B900E5CABA00E5CBBA00E6CCBC00E6DDDD00E7CEBD00E7D7C000E8B8B500E8B9
- B600E8BAB600E8C3B900E8CFBD00E8CFBE00E8D0BE00E8D0BF00E8D1BF00E9C7
- BB00E9D1BF00E9D2BF00E9D2C000E9D3C000EAC7BC00EBD5C200ECB9B800ECCE
- BF00ECD4C200ECD7C300ECD8C300ECD8C400ECD9C400ECE6E600EDD9C400EDD9
- C500EDDAC500EDDBC500EED3C300EEDBC700EEDCC700EEDDC800EFCCC100EFDD
- C800F0BEBC00F0DFC900F0E0CA00F0E1CA00F0E1CB00F1E1CB00F1E2CB00F1E2
- CC00F1E3CC00F1EDED00F2C4C100F2C9C200F2DDCA00F2E3CC00F2E4CC00F2E4
- CD00F2E5CD00F2EDEE00F3E5CD00F3E5CE00F3E6CE00F3EFEF00F4F0F000F4F0
- F100F5E5CF00F5F2F200F6EBD200F6ECD300F6F3F400F7ECD300F7EDD300F7ED
- D400F7EED400F8EDD400F8EED400F8EED500F8EFD500F8F0D500F8F6F600F9EF
- D500F9F0D600F9F1D600F9F1D700F9F7F700FAF2D700FAF8F800FAF9F900FBF4
- D900FBF9F900FBFAFA00FCFBFB00FDFDFD00FEFEFE00FFFFFF00FFFFFFFFFFFF
- FFFFFFFFFFFFFFF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CFCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
+ 36300000424D3634000000000000360400002800000040000000400000000100
+ 1800000000000030000000000000000000000001000000000000FFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
@@ -469,7 +403,43 @@ object Form1: TForm1
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
- FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF}
+ FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000}
在this link有一個完整的DFM文件提出的問題。
是什麼類型的圖像?基於快速觀察,似乎某些數據損壞發生在運行時或數據未正確加載。如果你看圖片,看起來顏色通道可能已經被打亂了。綠色似乎被藍色,藍色和紅色所取代,就好像顏色通道將被移動一個字節一樣。圖像位置偏移也可能是由於數據損壞或不正確的數據處理造成的,就好像文件頭未正確解析並且程序可能將其視爲圖像數據一樣。 – SilverWarior
請將圖像顯示爲您在D7中加載到BitBtn中的原始.bmp文件。在'Glyph.Data = {' –
我認爲原始圖像是一個PNG文件(可能轉換成BMP)文件後,從.dfm(包括D7和XE7)中複製出三行十六進制值,我不能說當然,因爲我從以前的開發者繼承了這個項目,而且我沒有原始的導入圖片文件......無論如何,我已經用一些有用的信息更新了這個問題。謝謝。 – aleroot