ImageEn, unit iexWebP

LibWebP PlugIn


LibWebP is a Google open source library that allows ImageEn to read and write WebP files.
You can create lossless lossless WebP files, as well as varying the compression.
Codec version information is available with WIC_CodecInfo

Notes
The LibWebP plug-in requires yout to ship iewebp32.dll (for 32bit applications) or iewebp64.dll (for 64bit applications)
It is included in the \DLL\ folder of the ImageEn installation
The plug-in must be registered once by your application


Demo

Demo  Demos\ImageEditing\CompleteEditor\PhotoEn.dpr


Examples

// Register the WebP Plug-In
IEGlobalSettings().RegisterPlugIns([ iepiWebP ]);

// Save an image to a WebP file with 80% quality
ImageEnView1.IO.Params.HDP_ImageQuality := 0.80;
ImageEnView1.IO.SaveToFileWebP( 'D:\image.webp; );

// Save an image to a lossless WebP
ImageEnView1.IO.Params.HDP_Lossless := True;
ImageEnView1.IO.SaveToFileWebP( 'D:\image.webp' );


// WebP Size Comparisons
ImageEnView1.IO.LoadFromFile( 'D:\Alpha.png' );   // Original PNG - 610KB

ImageEnView1.IO.Params.HDP_ImageQuality := 1.0;
ImageEnView1.IO.Params.HDP_Lossless     := False;
ImageEnView1.IO.SaveToFile( 'D:\image100.WebP' );  // 162KB

ImageEnView1.IO.Params.HDP_ImageQuality := 0.9;
ImageEnView1.IO.Params.HDP_Lossless     := False;
ImageEnView1.IO.SaveToFile( 'D:\image90.WebP' );   // 96KB

ImageEnView1.IO.Params.HDP_ImageQuality := 0.7;
ImageEnView1.IO.Params.HDP_Lossless     := False;
ImageEnView1.IO.SaveToFile( 'D:\image70.WebP' );   // 60KB

ImageEnView1.IO.Params.HDP_ImageQuality := 0.5;
ImageEnView1.IO.Params.HDP_Lossless     := False;
ImageEnView1.IO.SaveToFile( 'D:\image50.WebP' );   // 53KB

ImageEnView1.IO.Params.HDP_ImageQuality := 0.2;
ImageEnView1.IO.Params.HDP_Lossless     := False;
ImageEnView1.IO.SaveToFile( 'D:\image20.WebP' );   // 44KB

ImageEnView1.IO.Params.HDP_ImageQuality := 0.01;
ImageEnView1.IO.Params.HDP_Lossless     := False;
ImageEnView1.IO.SaveToFile( 'D:\image01.WebP' );   // 37KB

ImageEnView1.IO.Params.HDP_Lossless     := True;
ImageEnView1.IO.SaveToFile( 'D:\imageLossless.WebP' );  // 329KB (Lossless)


License Information

Distributions must include this copyright notice:

// -----------------------------------------------------------------------------
//
// Copyright (c) 2010, Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//   * Redistributions of source code must retain the above copyright
//     notice, this list of conditions and the following disclaimer.
//
//   * Redistributions in binary form must reproduce the above copyright
//     notice, this list of conditions and the following disclaimer in
//     the documentation and/or other materials provided with the
//     distribution.
//
//   * Neither the name of Google nor the names of its contributors may
//     be used to endorse or promote products derived from this software
//     without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// -----------------------------------------------------------------------------


See Also

Software License Agreement
Additional IP Rights Grant
#WebP Tags