A class to Import RawBitmap from a WebP format. The bitmap can be imported from file or from string.
WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP, webmasters and web developers can create smaller, richer images that make the web faster.
WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller than comparable JPEG images at equivalent SSIM quality index.
Lossless WebP supports transparency (also known as alpha channel) at a cost of just 22% additional bytes. For cases when lossy RGB compression is acceptable, lossy WebP also supports transparency, typically providing 3× smaller file sizes compared to PNG.
This class and this plugin is copyright Copyright (c) Einhugur Software.
This class uses libwebp which has the following license: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.
Object
RawWebPImporter
class RawWebPImporter implements
IRawBitmapReader
IRawBitmapReaderV2
Properties
ErrorMessage | Error message for last error that occurred. |
LastError | Returns enum error code for last error that occurred. |
Methods
FileExtensions | Returns array of file extensions which this image format can use. |
GetLastErrorCode | Same as the LastError property but this one returns it as Integer to full-fill the standard interface. |
InternetMediaTypes | Returns array of internet media types which this image format can use. |
OpenFromFile | Opens a WebP Image from a file, returning it as RawBitmap. |
OpenFromString | Opens a WebP Image from a WebP formatted string, returning it as RawBitmap. |
ReadHeader | Reads only header information from image stored in string to get basic information and not decode the whole image. |
ReadHeader | Reads only header information from image stored in file to get basic information and not decode the whole image. |
UTI | Returns UTI identifier for the file format of this class. |
UTIConformsTo | Returns UTI conforms to identifier for the file format of this class. |
UTIDescription | Returns UTI description for the file format of this class. |
Enumerations
ErrorValues | Enum representing error codes which this class can return. |
Constants
Version = 7.5 | |
Supported Platforms:
MacOS X Cocoa 32 bitMacOS X Cocoa 64 bitWindows 32 bitWindows 64 bitLinux 32 bitLinux 64 bitLinux ARMUnsupported Platforms:
MacOS X Carbon