ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 WebP files

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
HeartWare Posted - Dec 18 2023 : 12:37:51
Is it possible - and if so, how? - to detect if a .webp file is saved as lossy or lossless format, using standard ImageEn components?

If not using ImageEn, does anyone know how to detect it?

4   L A T E S T    R E P L I E S    (Newest First)
HeartWare Posted - Dec 21 2023 : 00:35:40
Thank you for the heads-up. I'll update my detection routine to handle this...
xequte Posted - Dec 19 2023 : 21:23:59
Hi

Yes, unfortunately though, you may find that there are other "chunks" before the image chunk.

https://developers.google.com/speed/webp/docs/riff_container

Most commonly is a VP8X chunk. You would have to skip that and locate the "VP8L"/"VP8 " FourCC.

E.g. attach/xequte/20231219212424_4_webp_LossyAlpha.webp

Nigel
Xequte Software
www.imageen.com


HeartWare Posted - Dec 19 2023 : 00:38:53
Okay.

I found another way - if the bytes at offset 12 in the file is "VP8L" then it is a lossless compression (after checking bytes at offset 0 ="RIFF" and at offset 8 = "WEBP"). Lossy compression is "VP8 " (notice the trailing space) at offset 12.
xequte Posted - Dec 18 2023 : 18:36:21
Hi

ImageEn supports WebP via WIC, ImageMagick and Skia (>= Delphi 12). Unfortunately none of these methods output a valid compression property.

Nigel
Xequte Software
www.imageen.com