Half a year ago he worked at Rad Studio 10 Seattle. I had a class that TImage from TImage
In the constructor, I wrote:

 Parent = Owner; AutoSize = true; TPicture *pic = new TPicture(); pic->LoadFromFile("Textures/r1.png"); Picture = pic; 

And the png file was loaded, and everything worked fine
Now, when I write the same code, I write Bitmap image is not valid
Why did it work earlier, but not now?
PS Now I have Rad Studio 10 Berlin

  • The png has several compression methods (methods), 1) it may be that you don’t have the same method that was used when working. 2) Maybe the library now does not support png. - nick_n_a
  • If you have a windows platform try this - nick_n_a
  • @nick_n_a apparently the problem is not in the image. If you throw a TImage on the form and select my picture in the Picture, then everything is fine - andrew
  • Select a picture in designer-e - there is a separate design-time library for this (the one that only works in development mode), which can transcode it as needed by TPicture itself. - nick_n_a

0