Delphi TImageList Bitmap Changes
Asked Answered
F

1

15

I'm using Delphi XE2 Update 3. Update 4 is not compatible with some of our 3rd party components, so we haven't updated yet.

I use TImageList's in my applications. I've noticed that many times when it toggle from source view to form view (F12), suddenly the previously unmodified unit will be modified. If I save the change caused by pressing F12, I can look at source control and see a few bytes of the TImageList.Bitmap property have changed. Here's one example as seen in TortoiseHg Workbench:

@@ -830,7 +830,7 @@
     Left = 760
     Top = 480
     Bitmap = {
-      494C01010200E402E40210001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
+      494C01010200E802E80210001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
                   ^^  ^^  <-- two bytes changed

Sometimes there are other minor changes, but it's always limited to just a few isolated spots in the TImageList.Bitmap data. It's a real pain to be constantly pushing these insignificant changes into source control when I'm not making any intentional changes.

Does anyone know why Delphi change the TImageList.Bitmap data when toggling between source and form views? Is there a way to workaround this limitation?

Frasco answered 24/5, 2012 at 20:4 Comment(3)
I think it's always done this. Yet another reason to use resources rather bitmaps in .dfm files.Snug
This behaviour is even more prominent with images in FireMonkey forms.Facelifting
@DavidHefferman, this does not happen in Delphi 7.Nagpur
Z
6

It is a really annoying IDE bug already reported sometimes in Embarcadero Quality Central, especially in QC 92769, but unfortunately it is not fixed yet. :-(

Zonate answered 29/5, 2012 at 11:53 Comment(2)
That's the exact issue. Thanks for the QC#.Frasco
Same bug in new bug tracker In the comments there is a workaround component by Karol BieniaszewskiBereniceberenson

© 2022 - 2024 — McMap. All rights reserved.