delphi - How do I display a WebP image in a TImage or just TBitmap? -
delphi-webp project providing delphi bindings google's libwebp.dll, loads webp images, project provides no delphi-specific image code. how can load webp image timage or tbitmap?
you should develop , register tgraphic sub-class, can load/save webp format images, tpngimage, tjpegimage , tgifimage classes work.
you can examples of such classes in recent versions of vcl (jpeg , png), on torry.net or libraries like:
- http://melander.dk/delphi/gifimage/
- http://www.soft-gems.net/index.php/libs/graphicex-library
- http://galfar.vevb.net/imaging/doc/html/faq.html
just learn how implemented in there projects , same project of webp support.
ps. can derive class tbitmap
rather tgraphic
- less effective simplier do. example of approach see http://galfar.vevb.net/wp/projects/jpeg2000-for-pascal/ loose webp-specific information , "quick , dirty" hack rather proper vcl-targeted implementation.
Comments
Post a Comment