Apparently some developers already use the modifications, in important projects ignoring that I've clearly stated from the very beginning that some existing bugs might be replaced with new ones. This makes me feel like I have to remove some modifications and tell what that was about, so that those of you that use previous modifications, will be prepared for what's worse.
a) procedure DefaultReaderDescription REMAINS
The workaround consisted in adding:
“25..32 : Adesc.Init_BPP32_B8G8R8A8_BIO_TTB(AWidth,Aheight);” to the case statement.
32bit descriptions were not filled correctly. This is one of the reasons for some transparency bugs. The problem with this workaround is that we initialize using alpha(32 bit Depth) while original code and most of the lcl appears to be prepared for 24bit Depth. There is a subtle difference between bits per pixel and depth, but there is and I have reasons to think that some lcl sources didn't make the difference between these two either. 32 bits per pixel images can be treated like 24 ones if we chose to ignore the alpha byte. So this modification may surface things that I really can't predict. I know that old versions of Windows had problems with 32bit Depth bitmaps. So, I don't consider this modification safe enough.
Also, I don't know how compatible is with "pf32bit:Flags := [riqfRGB, riqfMask, riqfAlpha];" found in TCustomBitmap.RawimageNeeded.
For now, this one remains but might have unpleasant side effects.
b) procedure TlazIntfImage.SetMasked REMOVED
Fortunately this one was disabled. Some notes on this one.
"and ((self.Width and 3) = 0)" has been added. Probably related to multiple bugs like: 0024241,0025080.....
Extras:
Width has to be multiple of 4 to use masks.
This might be another bug in Fpc/Lazarus, a widget optimization requirement similar to padding of 24bit bitmaps or something else.
It is required both width and height to be multiple of 4 but apparently it works just with width.
http://coronalabs.com/blog/2012/05/29/how-to-use-bitmap-masks/} //((self.Width and 3) = 0) is the optimized version of ((self.Width mod 4) = 0)
I didn't had enough informations, reason why I've disabled the modification by using comments. It might be related to transparency problems.
c)procedure TwinControl.PaintControls REMAINS
Both original and modified codes consider that during paint(during the while/for loop)FControls must be steady(no switches, insertions, removals). Is this OK???
d)procedure TwinControl.Insert REMOVED
Has been modified to really insert, not append. One of the reasons for modifying it was that I knew that lcl has problems with z-ordering. I verified that maybe the reason was connected to the fact that you couldn't set the right position in a list. You try to insert in a specific position and you end up in a different position. The problem with this modification is that apparently, it breaks compatibility with Delphi and also I don't know the following thing: if “Acontrol.CanTab=false”should the control be inserted in the FtabList? I've decided to remove this modification, although even now I consider the modification a better solution than the original.
e) procedure TcustomBitmap.Changed REMOVED
I knew that modifying the bitmap is not tracked by parent controls. For example, apparently changing the pixelformat is entirely ignored. For this reason I've inserted:
“if FPixelFormatNeedsUpdate then UpdatePixelFormat;”
The line has been inserted because procedures like "Assign" or "RawimageNeeded" set "FPixelFormatNeedsUpdate:=TRUE;" without calling anything else after that
The problem is that I'm not sure this is the wright place to do.
procedure TcustomBitmap.SetPixelFormat REMOVED
If the pixel format is changed then call Changed(Self);
If the changed event should not be triggered then "Changed(Self);" may be replaced by "UpdatePixelFormat".
I've removed both modifications.