Recent

Author Topic: JvImagesViewer - WEBP  (Read 402 times)

pcurtis

  • Sr. Member
  • ****
  • Posts: 430
JvImagesViewer - WEBP
« on: December 20, 2020, 06:41:42 am »
Hi All,

can a TJvImagesViewer be made to display WEBP images?

If so how?

Thanks in advance.
Windows 10 / Linux Mint 20
Laz 2.10.0
FPC 3.2.0

wp

  • Hero Member
  • *****
  • Posts: 8099
Re: JvImagesViewer - WEBP
« Reply #1 on: December 20, 2020, 11:29:51 am »
In principle, yes. JvImagesViewer can display all image formats registered. You must provide and register a corresponding image class plus a reader for the WEBP format. Study the code of TJpegImage or TPortableNetworkGraphic.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

circular

  • Hero Member
  • *****
  • Posts: 3666
    • Personal webpage
Re: JvImagesViewer - WEBP
« Reply #2 on: December 21, 2020, 08:14:13 am »
Here is the implementation of the reader in BGRABitmap:
https://github.com/bgrabitmap/bgrabitmap/blob/master/bgrabitmap/bgrareadwebp.pas

You can probably adapt it to run without BGRABitmap.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018