GraphicsFormats Xojo plugin

RawWebPImporter Class

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

ErrorMessageError message for last error that occurred.
LastErrorReturns enum error code for last error that occurred.

Methods

FileExtensionsReturns array of file extensions which this image format can use.
GetLastErrorCodeSame as the LastError property but this one returns it as Integer to full-fill the standard interface.
InternetMediaTypesReturns array of internet media types which this image format can use.
OpenFromFileOpens a WebP Image from a file, returning it as RawBitmap.
OpenFromStringOpens a WebP Image from a WebP formatted string, returning it as RawBitmap.
ReadHeaderReads only header information from image stored in string to get basic information and not decode the whole image.
ReadHeaderReads only header information from image stored in file to get basic information and not decode the whole image.
UTIReturns UTI identifier for the file format of this class.
UTIConformsToReturns UTI conforms to identifier for the file format of this class.
UTIDescriptionReturns UTI description for the file format of this class.

Enumerations

ErrorValuesEnum representing error codes which this class can return.

Constants

Version = 7.5

Supported Platforms:

  • MacOS X Cocoa 32 bit
  • MacOS X Cocoa 64 bit
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM

    Unsupported Platforms:

  • MacOS X Carbon