Did I miss something ?

Did I miss something ?

I've tried to add a custom image loader for FMX with TBitmapCodecManager.RegisterBitmapCodecClass

Then I call TextureMaterialSource1.Texture.LoadFromFile

TBitmapCodecManager.LoadFromFile calls TImageTypeChecker.GetType that returns ONLY predefined image types ! (gif, bmp, png, tiff, jpg)

I think that TImageTypeChecker should returns the filename extension when it can't identify the image content.

Comments

  1. Just looked at the code. It allows registering a codec, but doesn't allow support for anything but those types anyway? Total mess.

    ReplyDelete
  2. Yes, that shows quality of new contractors again. Someone created elaborate architecture to register new codecs, and then in 10.2 someone else decided - I'll just hardcode image types there. Plus there is lots of little details, like not following standard coding style, typos in comments, no const before string parameter. I'm just seeing this poor guy with 'Delphi for dummies' at his side and overseer cracking a whip behind. And another thing I've reported it in October and it is still in Reported state, there is over 800 issues that are in Reported state and don't get opened for months.

    ReplyDelete
  3. Code review and unit testing seems not to be highly prioritised by Embarcadero. They want the customers to debug and test their code for free.

    ReplyDelete
  4. I agree the issue is severe -- but there is also a lot of misinformation in this thread. First the issue was introduced in 10.1.2 Berlin, not Tokyo. Second, it has nothing to do with the new contractors model.
    The intent was to move away form using file name only to consider the content of the file. I agree that the implementation is very troublesome and it should have been spotted by code review and unit testing. So your complaints make sense and we are clearly at fault -- but the history behind this issue is different, just wanted to clarify that.

    ReplyDelete
  5. Thanks for clarification Marco, could you comment on Reported/Open issues? Is it the same workflow as for Open/Fixed that is only updated when new version is released? Also I wonder does it matter from what account issue is created - I usually create issues from my personal account that does not have Delphi license linked to it, will it be looked at faster if I will use my work account that does have a Delphi license?

    ReplyDelete

Post a Comment