API open webP file

29 views
Skip to first unread message

John Hobson

unread,
Apr 22, 2021, 5:10:29 PM4/22/21
to WebP Discussion
I'm brand new to the webP API, and astonished I have to ask how to open a webP file in my application in preparation to decomp and get rgb data.  I see no  such functions in any of the header files or in the pseudo code examples.  Using Linux on brand new Chromebook and Ubuntu20.4 on System 76 laptop.  Downloaded libwebp-1.2.0-linux-x86-64 and
libwebp-refs_heads_master-examples.

James Zern

unread,
Apr 22, 2021, 9:43:28 PM4/22/21
to WebP Discussion
Hi John,

On Thu, Apr 22, 2021 at 2:10 PM John Hobson <johnk...@gmail.com> wrote:
I'm brand new to the webP API, and astonished I have to ask how to open a webP file in my application in preparation to decomp and get rgb data.  I see no  such functions in any of the header files or in the pseudo code examples.  Using Linux on brand new Chromebook and Ubuntu20.4 on System 76 laptop.  Downloaded libwebp-1.2.0-linux-x86-64 and
libwebp-refs_heads_master-examples.

John Hobson

unread,
Apr 23, 2021, 2:30:43 AM4/23/21
to webp-d...@webmproject.org
I saw the LoadWebP() but the imageio files are not in the archive I downloaded. So I just got the imageio archive, and it appears you just read the whole file, then pass the pointer to the data to webp functions, and go from there. 

Thanks for the info

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webp-discuss/CABWgkX%2BmZfSh%2B9RpD5%2B5kJncqixXkEiXJ3FvzyqeG2dLveLu2w%40mail.gmail.com.


--
John



 

James Zern

unread,
Apr 23, 2021, 3:55:08 PM4/23/21
to WebP Discussion
On Thu, Apr 22, 2021 at 11:30 PM John Hobson <johnk...@gmail.com> wrote:
I saw the LoadWebP() but the imageio files are not in the archive I downloaded. So I just got the imageio archive, and it appears you just read the whole file, then pass the pointer to the data to webp functions, and go from there. 

Thanks for the info

I'm glad it helped. If you have any questions about the examples please feel free to ask. Depending on the application there is an option to supply incremental data to the decoder with WebPIUpdate/Append [4].

I missed the archive name in your first email. You can get the full source archive for the last release here [5] or from the top level of the tree [6]. Another option is to clone the repository with git clone https://chromium.googlesource.com/webm/libwebp.

 

On Thu, Apr 22, 2021 at 6:43 PM 'James Zern' via WebP Discussion <webp-d...@webmproject.org> wrote:
Hi John,

On Thu, Apr 22, 2021 at 2:10 PM John Hobson <johnk...@gmail.com> wrote:
I'm brand new to the webP API, and astonished I have to ask how to open a webP file in my application in preparation to decomp and get rgb data.  I see no  such functions in any of the header files or in the pseudo code examples.  Using Linux on brand new Chromebook and Ubuntu20.4 on System 76 laptop.  Downloaded libwebp-1.2.0-linux-x86-64 and
libwebp-refs_heads_master-examples.

dwebp [1] uses LoadWebP() from imageio/webpdec.c [2]. That relies on ImgIoUtilReadFile() [3] to do the file I/O. Hopefully that helps as a starting point.


--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.
To view this discussion on the web visit https://groups.google.com/a/webmproject.org/d/msgid/webp-discuss/CABWgkX%2BmZfSh%2B9RpD5%2B5kJncqixXkEiXJ3FvzyqeG2dLveLu2w%40mail.gmail.com.


--
John



 

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss...@webmproject.org.
Reply all
Reply to author
Forward
0 new messages