summaryrefslogtreecommitdiff
path: root/libs/freeimage/src/FreeImage/PluginWebP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/freeimage/src/FreeImage/PluginWebP.cpp')
-rw-r--r--libs/freeimage/src/FreeImage/PluginWebP.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/libs/freeimage/src/FreeImage/PluginWebP.cpp b/libs/freeimage/src/FreeImage/PluginWebP.cpp
index 5ea29facf0..1e3a265407 100644
--- a/libs/freeimage/src/FreeImage/PluginWebP.cpp
+++ b/libs/freeimage/src/FreeImage/PluginWebP.cpp
@@ -86,7 +86,7 @@ data/data_size is the segment of data to write, and 'picture' is for
reference (and so one can make use of picture->custom_ptr).
*/
static int
-WebP_MemoryWriter(const BYTE *data, size_t data_size, const WebPPicture* const picture) {
+WebP_MemoryWriter(const uint8_t *data, size_t data_size, const WebPPicture* const picture) {
FIMEMORY *hmem = (FIMEMORY*)picture->custom_ptr;
return data_size ? (FreeImage_WriteMemory(data, 1, (unsigned)data_size, hmem) == data_size) : 0;
}
@@ -122,9 +122,9 @@ MimeType() {
static BOOL DLL_CALLCONV
Validate(FreeImageIO *io, fi_handle handle) {
- BYTE riff_signature[4] = { 0x52, 0x49, 0x46, 0x46 };
- BYTE webp_signature[4] = { 0x57, 0x45, 0x42, 0x50 };
- BYTE signature[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ uint8_t riff_signature[4] = { 0x52, 0x49, 0x46, 0x46 };
+ uint8_t webp_signature[4] = { 0x57, 0x45, 0x42, 0x50 };
+ uint8_t signature[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
io->read_proc(signature, 1, 12, handle);
@@ -277,14 +277,14 @@ DecodeImage(WebPData *webp_image, int flags) {
// fill the dib with the decoded data
- const BYTE *src_bitmap = output_buffer->u.RGBA.rgba;
+ const uint8_t *src_bitmap = output_buffer->u.RGBA.rgba;
const unsigned src_pitch = (unsigned)output_buffer->u.RGBA.stride;
switch(bpp) {
case 24:
for(unsigned y = 0; y < height; y++) {
- const BYTE *src_bits = src_bitmap + y * src_pitch;
- BYTE *dst_bits = (BYTE*)FreeImage_GetScanLine(dib, height-1-y);
+ const uint8_t *src_bits = src_bitmap + y * src_pitch;
+ uint8_t *dst_bits = (uint8_t*)FreeImage_GetScanLine(dib, height-1-y);
for(unsigned x = 0; x < width; x++) {
dst_bits[FI_RGBA_BLUE] = src_bits[0]; // B
dst_bits[FI_RGBA_GREEN] = src_bits[1]; // G
@@ -296,8 +296,8 @@ DecodeImage(WebPData *webp_image, int flags) {
break;
case 32:
for(unsigned y = 0; y < height; y++) {
- const BYTE *src_bits = src_bitmap + y * src_pitch;
- BYTE *dst_bits = (BYTE*)FreeImage_GetScanLine(dib, height-1-y);
+ const uint8_t *src_bits = src_bitmap + y * src_pitch;
+ uint8_t *dst_bits = (uint8_t*)FreeImage_GetScanLine(dib, height-1-y);
for(unsigned x = 0; x < width; x++) {
dst_bits[FI_RGBA_BLUE] = src_bits[0]; // B
dst_bits[FI_RGBA_GREEN] = src_bits[1]; // G
@@ -499,7 +499,7 @@ EncodeImage(FIMEMORY *hmem, FIBITMAP *dib, int flags) {
// convert dib buffer to output stream
- const BYTE *bits = FreeImage_GetBits(dib);
+ const uint8_t *bits = FreeImage_GetBits(dib);
#if FREEIMAGE_COLORORDER == FREEIMAGE_COLORORDER_BGR
switch(bpp) {
@@ -582,7 +582,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
throw (1);
}
// store the blob into the mux
- BYTE *data = NULL;
+ uint8_t *data = NULL;
DWORD data_size = 0;
FreeImage_AcquireMemory(hmem, &data, &data_size);
webp_image.bytes = data;