Recent

Author Topic: JvImagesViewer - WEBP  (Read 1115 times)

pcurtis

  • Hero Member
  • *****
  • Posts: 951
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 20H2
Laz 2.2.0
FPC 3.2.2

wp

  • Hero Member
  • *****
  • Posts: 11912
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.

circular

  • Hero Member
  • *****
  • Posts: 4219
    • 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