Recent

Author Topic: The image reader is not registered for this image format  (Read 1005 times)

winni

  • Hero Member
  • *****
  • Posts: 3197
The image reader is not registered for this image format
« on: December 21, 2020, 03:08:30 pm »
Hi!

Very simple code:

Code: Pascal  [Select][+][-]
  1. uses ..., BGRAbitmap,BGRADefaultBitmap, BGRABitmapTypes;
  2.  
  3. const BigImg = 'NE1_HR_LC_SR_W_DR.tif';    // 668 MB
  4. var img : TBGRAbitmap;
  5. .....
  6.  
  7. procedure TForm1.Button1Click(Sender: TObject);
  8. var startTime : QWord;
  9. begin
  10.    startTime := GetTickCount64;
  11.    Img := TBGRABitMap.Create(BigImg);
  12.    showMessage (IntToStr(GetTickCount64 - startTime));
  13. end;      
  14.  
  15.  

Results in an exception:
Code: Text  [Select][+][-]
  1. The image reader is not registered for this image format

We had the same problem some years ago.
But I don't know how it was solved.

Winni

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11455
  • FPC developer.
Re: The image reader is not registered for this image format
« Reply #1 on: December 21, 2020, 03:19:26 pm »
If bgra uses fcl-image to load (some?) types, add fpreadtiff to your uses clause

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: The image reader is not registered for this image format
« Reply #2 on: December 21, 2020, 03:59:10 pm »
In fact BGRA provides its own version BGRAReadTiff, but yes, it is compatible with FPReadTiff.
Conscience is the debugger of the mind

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: The image reader is not registered for this image format
« Reply #3 on: December 21, 2020, 04:10:33 pm »
Thanx marcov and circular!

fpreadtiff did not solve it but BGRAreadTiff did.

2264 milliseconds to load 668 MB tiff from a hard disk

Very good speed!

Winni


circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: The image reader is not registered for this image format
« Reply #4 on: December 21, 2020, 05:28:29 pm »
Cool  :)

I optimized as I could.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018