23#ifndef _WEBPCOMPRESSOR_H
24#define _WEBPCOMPRESSOR_H
27#include "Compressor.h"
28#include <webp/encode.h>
41 WebPMemoryWriter writer;
46 unsigned int chunk_size;
51 void writeICCProfile();
54 void writeXMPMetadata();
65 WebPConfigInit( &config );
67 config.thread_level = 1;
68 config.quality = this->
Q;
97 unsigned int CompressStrip(
unsigned char* source,
unsigned char* output,
unsigned int tile_height );
104 unsigned int Finish(
unsigned char* output );
145 else if(
Q > 100 )
Q = 100;
Base class for IIP output images.
Definition: Compressor.h:32
unsigned int header_size
Size of the header data.
Definition: Compressor.h:43
int Q
Quality or compression level for all image types.
Definition: Compressor.h:37
unsigned char * header
Pointer to the header data for the output image.
Definition: Compressor.h:40
Class to represent a single image tile.
Definition: RawTile.h:47
Wrapper class to WebP library: Handles 8 and 16 bit PNG as well as alpha transparency.
Definition: WebPCompressor.h:34
unsigned int getHeaderSize() const
Return the WebP header size.
Definition: WebPCompressor.h:115
const char * getMimeType() const
Return the WebP mime type.
Definition: WebPCompressor.h:121
CompressionType getCompressionType() const
Get compression type.
Definition: WebPCompressor.h:127
unsigned char * getHeader()
Return a pointer to the header itself.
Definition: WebPCompressor.h:118
unsigned int Compress(RawTile &t)
Compress an entire buffer of image data at once in one command.
const char * getSuffix() const
Return the image filename suffix.
Definition: WebPCompressor.h:124
WebPCompressor(int compressionLevel)
Constructor.
Definition: WebPCompressor.h:62
unsigned int CompressStrip(unsigned char *source, unsigned char *output, unsigned int tile_height)
Compress a strip of image data.
void setQuality(int quality)
Set the compression level.
Definition: WebPCompressor.h:138
void InitCompression(const RawTile &rawtile, unsigned int strip_height)
Initialize strip based compression.
int getQuality() const
Get the current compression level.
Definition: WebPCompressor.h:132
unsigned int Finish(unsigned char *output)
Finish the strip based compression and free memory.