[Lazarus] Strange issue with TImage and lazarus 2.2.2

Werner Pamler werner.pamler at freenet.de
Thu Jun 30 16:54:25 CEST 2022


Am 30.06.2022 um 15:11 schrieb Mattias Gaertner via lazarus:
> Maybe instead of the GraphicClass.ClassName the first extension can be
> written.
> That means, that an old IDE cannot read the graphic.
This will break Delphi compatibility, i.e. forms with an image in which 
the Picture has been loaded by Delphi will not be readable by Lazarus 
any more, and vice versa. Just checked again the signature that Delphi 
writes to the begin of the Picture.Data: it's the class name, not the 
extension.
> Or the vampyrlib defines
>
> type
>    TPortableNetworkGraphic = class(TImagingPNG);
>
> and registers that in TPicture.
Yes, that might be a solution at first sight. But I don't know what 
happens when a project requires Vampyre (i.e. registers this new 
TPortableNetworkgraphic), but a unit has only the ordinary graphics unit 
in its uses clause, i.e. accesses the old TPortableNetworkGraphic.


More information about the lazarus mailing list