As you can see, you can save lossless or turn that off and set your quality level. If you have transparency or a channel in the channels palette, you can save with an alpha. If you hold down shift when a WebP file is opening, you get a similar dialog for how to deal with the alpha.
As you know, there are many different compression options in WebP. I would love to have a dialog letting people fiddle with them all, but I'm also mindful of having an easy, non-confusing interface. Perhaps we can have a second dialog available for people who really want to dive in.
That said, what other options do people think should appear in the simple dialog?
Brendan
OK, one more rapid-fire post on the subject for the moment. Some additional thoughts I had:1. I'm very grateful for the libwebp library, which made building this plug-in very easy. (I wish libvpx were as straight forward.) It'll be a piece of cake to add more encoding options once we decide what those should be. But I also wish libwebp could do a little more. For example, the sample code for saving ICC profiles, EXIF, and XMP is a little convoluted and there is no sample for how to read it back in. I'd hope you'd just be able to point libwebp to a memory buffer and it would take care of the rest.
2. I get all kinds of linking errors on Windows when building a static library (Visual Studio 2008). I'm not sure what's going on; the problems persisted even after I imported the libwebp files right into my project. Fortunately I was able to download the pre-built libraries and they worked fine, but does anyone know what the problem may be? My projects are in the GitHub repo if you want to take a look. Xcode had no problems.
3. I was kind of surprised to see that setting quality to 100 still made for a visually lossy WebP, while JPEG can make a visually lossless file. (Of course WebP lossless compression is visually lossless.) Is this a limitation of VP8 compression?
4. I'm very happy that the high quality lossless compression is in WebP. Any chance it will come to WebM?
5. I hear that WebM is getting support for 10-bit. How about WebP? Or how about 16-bit? I come from a video/film production background and those features would be appreciated in that field.
Brendan--
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 post to this group, send email to webp-d...@webmproject.org.
Visit this group at http://groups.google.com/a/webmproject.org/group/webp-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/groups/opt_out.
there's an example about how to read EXIF/XMP/ICC in the README.mux file (agreed, html doc is still lacking):
Brendan,sorry i can't test the plug-in right away (i don't have a PS installed right now!).
Well, i'm not sure it would fit equally for _moving_ pictures.
5. I hear that WebM is getting support for 10-bit. How about WebP? Or how about 16-bit? I come from a video/film production background and those features would be appreciated in that field.i've got some experiment going about this, but keep in mind that WebP is more designed to be the final image format (the one you send over the wire) ratherthan an editing format (where you want to preserve as many bit-depth for samples as possible, for later editing).
Brendan
Hi Brendan,There is a bit for 'hinting' that alpha is not used in the lossless format:Let me again stress that this should be taken as a hint (that is, a wrong value in that bit is not considered an error).
picture->colorspace |= WEBP_CSP_ALPHA_BIT;
Hi,On Tue, Jun 18, 2013 at 4:28 PM, Brendan Bolles <fnor...@gmail.com> wrote:
On Tuesday, June 18, 2013 4:08:49 PM UTC-7, Urvang Joshi wrote:Hi Brendan,There is a bit for 'hinting' that alpha is not used in the lossless format:Let me again stress that this should be taken as a hint (that is, a wrong value in that bit is not considered an error).Thanks for pointing that out. I see it here in picture.c:picture->colorspace |= WEBP_CSP_ALPHA_BIT;
The alpha being completely opaque sounds like a good reason to treat it like a flattened document in Photoshop.Is there a good way to access that bit with libwebp? Maybe before actually decoding the bitstream?You can use WebPGetFeatures() to check the presence of alpha or you can use WebPMuxGetFeatures() to get all the feature flags (alpha, icc, xmp, exif, animation).
[...]
The new beta is only on Mac because using the muxer breaks linking on Windows for me, even using the pre-built libraries. I've pasted in the errors below.Notice that I am able to link to the WebPDemux function that I am actually using, but it is the internal functions that don't link. This is similar to the errors I was getting for all functions when building the library myself. Since you aren't using the muxer in cwebp, maybe that's why you haven't seen this in your own Windows build.
1>WebP.obj : error LNK2019: unresolved external symbol WebPDemuxInternal referenced in function WebPDemux1>WebP.obj : error LNK2019: unresolved external symbol WebPNewInternal referenced in function WebPMuxNew
[...]
You can use WebPGetFeatures() to check the presence of alpha or you can use WebPMuxGetFeatures() to get all the feature flags (alpha, icc, xmp, exif, animation).
> nmake /f Makefile.vc ..\obj\release-static\x86\lib\libwebpdemux.lib CFG=release-static> nmake /f Makefile.vc ..\obj\release-static\x86\lib\libwebpmux.lib CFG=release-static
Note that WebPGetFeatures(), WebPMuxGetFeatures() and WebPDemuxGetI(d, WEBP_FF_FORMAT_FLAGS) should all agree on whether the image has alpha (whether you pass just the bitstream or the full file). Have you seen a case where they don't?
On Wednesday, June 19, 2013 3:49:20 AM UTC-7, Urvang Joshi wrote:Note that WebPGetFeatures(), WebPMuxGetFeatures() and WebPDemuxGetI(d, WEBP_FF_FORMAT_FLAGS) should all agree on whether the image has alpha (whether you pass just the bitstream or the full file). Have you seen a case where they don't?Yes, they don't agree whenever I save a lossless image without alpha. I took this to be normal because I hear that lossless compression always gets alpha added.
Also, couldn't you store multiple images in a file, some with alpha and some without?
Then there would be no file-wide answer to the alpha question.
My code looks like this:WebPData webp_data = { (const uint8_t *)buf, file_size };
WebPDemuxer *demux = WebPDemux(&webp_data);if(demux){uint32_t width = WebPDemuxGetI(demux, WEBP_FF_CANVAS_WIDTH);uint32_t height = WebPDemuxGetI(demux, WEBP_FF_CANVAS_HEIGHT);uint32_t flags = WebPDemuxGetI(demux, WEBP_FF_FORMAT_FLAGS);bool has_alpha = (flags & ALPHA_FLAG);// check the bitstream to see if we REALLY have an alpha// (lossless images are always compressed with an alpha)WebPIterator iter;if(has_alpha && WebPDemuxGetFrame(demux, 0, &iter) ){WebPBitstreamFeatures features;VP8StatusCode status = WebPGetFeatures(iter.fragment.bytes, iter.fragment.size, &features);has_alpha = features.has_alpha;WebPDemuxReleaseIterator(&iter);}}In this case has_alpha initially gets set to true, and then the second time gets set to false. Maybe I'm doing something wrong when I save the image? The only time I set if there's an alpha or not is when I decide to create the WebPPicture using WebPPictureImportRGBA() or WebPPictureImportRGB().
Brendan,On Wed, Jun 19, 2013 at 8:15 AM, Brendan Bolles <fnor...@gmail.com> wrote:
Then there would be no file-wide answer to the alpha question.iirc, we just take the common lower denominator: if there's any frame that has alpha, then the file is consideredto have alpha globally.
On Tuesday, June 18, 2013 5:04:22 PM UTC-7, James Zern wrote:> nmake /f Makefile.vc ..\obj\release-static\x86\lib\libwebpdemux.lib CFG=release-static> nmake /f Makefile.vc ..\obj\release-static\x86\lib\libwebpmux.lib CFG=release-staticThanks, James, this does work for x86!
Which makes me think I have to study the Makefile.vc and possibly reproduce the settings in my vcproj. Still don't understand why I'm getting this problem.
How would I build these libraries for x64? This only seems to build x86 libraries in an x64 directory:nmake /f Makefile.vc ..\obj\release-static\x64\lib\libwebpdemux.lib CFG=release-static ARCH=x64nmake /f Makefile.vc ..\obj\release-static\x64\lib\libwebpmux.lib CFG=release-static ARCH=x64
Sorry, I'm not very familiar with nmake. All the Adobe SDKs come with vcproj samples, so that's what I'm used to.
Brendan,sorry i can't test the plug-in right away (i don't have a PS installed right now!).Just some remarks:
On Tue, Jun 18, 2013 at 8:10 PM, Brendan Bolles <fnor...@gmail.com> wrote:OK, one more rapid-fire post on the subject for the moment. Some additional thoughts I had:1. I'm very grateful for the libwebp library, which made building this plug-in very easy. (I wish libvpx were as straight forward.) It'll be a piece of cake to add more encoding options once we decide what those should be. But I also wish libwebp could do a little more. For example, the sample code for saving ICC profiles, EXIF, and XMP is a little convoluted and there is no sample for how to read it back in. I'd hope you'd just be able to point libwebp to a memory buffer and it would take care of the rest.there's an example about how to read EXIF/XMP/ICC in the README.mux file (agreed, html doc is still lacking):Do you think a generic WebPGetMetadata(...) would be useful?2. I get all kinds of linking errors on Windows when building a static library (Visual Studio 2008). I'm not sure what's going on; the problems persisted even after I imported the libwebp files right into my project. Fortunately I was able to download the pre-built libraries and they worked fine, but does anyone know what the problem may be? My projects are in the GitHub repo if you want to take a look. Xcode had no problems.do you have the error log? That could be helpful to identify the problem...3. I was kind of surprised to see that setting quality to 100 still made for a visually lossy WebP, while JPEG can make a visually lossless file. (Of course WebP lossless compression is visually lossless.) Is this a limitation of VP8 compression?Hmm... VP8 has an inherent limitation that the minimum quantizer step is '4', whereas JPEG can go as low as '1'. But it shouldn't be visible.Maybe try to set -sns 0 and/or -segments 1, so you are guaranteed that have the minimal quantizer everywhere. Maybe what you're seeingis banding artifacts that occurred during the RGB->YUV conversion (that is, outside of the codec per se).4. I'm very happy that the high quality lossless compression is in WebP. Any chance it will come to WebM?Well, i'm not sure it would fit equally for _moving_ pictures.5. I hear that WebM is getting support for 10-bit. How about WebP? Or how about 16-bit? I come from a video/film production background and those features would be appreciated in that field.i've got some experiment going about this, but keep in mind that WebP is more designed to be the final image format (the one you send over the wire) ratherthan an editing format (where you want to preserve as many bit-depth for samples as possible, for later editing).Otherwise, regarding the parameters exposed in your UI: i think one slider for quality is ok. It should be that simple :)And even, you could go as far as disabling it when the 'lossless' box is checked. After all, lossless is lossless...(but yes, there's a lot of other parameters you could expose, but we're trying to make the defaut setting just 'work' as is)
i may be useful to have an option (off by default) to remove the EXIF and XMP chunks. And also to possibly'burn in' the color profile (that is: modify the color samples to incorporate the ICC, and discard the ICC chunk afterward).
have u test it with new photoshop (creative cloud)?its compatible?
I look forward to hearing your feedback. At the moment I don't plan on adding any more features.
Brendan
Brendan
--
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 post to this group, send email to webp-d...@webmproject.org.
Visit this group at http://groups.google.com/a/webmproject.org/group/webp-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/groups/opt_out.
nice!Just: what is 'Alpha 1' doing? the naming of the option is a little obscure...
If the user renames it, the name will be reflected in the dialog.
If there a multiple additional channels, the user will have to move the one they want to the top spot. I am too lazy to create a menu with the names of all their channels.
Brendan
Hey everyone, I've got the first draft of a new WebP Photoshop plug-in for you to try. ...Apologies to Toby from Telegraphics who released his WebP plug-in 2.5 years ago. I wanted to experiment with the latest lossless and alpha channel features, so I built my own.
Brendan
Good eye! All that's changed is I'm using the latest libwebp.