FreeRDP
image.c File Reference
#include <winpr/config.h>
#include <winpr/wtypes.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include <winpr/image.h>
#include "lodepng/lodepng.h"
#include <winpr/stream.h>
#include "../log.h"

Macros

#define TAG   WINPR_TAG("utils.image")
 

Functions

static BOOL writeBitmapFileHeader (wStream *s, const WINPR_BITMAP_FILE_HEADER *bf)
 
static BOOL readBitmapFileHeader (wStream *s, WINPR_BITMAP_FILE_HEADER *bf)
 
static BOOL writeBitmapInfoHeader (wStream *s, const WINPR_BITMAP_INFO_HEADER *bi)
 
static BOOL readBitmapInfoHeader (wStream *s, WINPR_BITMAP_INFO_HEADER *bi)
 
BYTEwinpr_bitmap_construct_header (size_t width, size_t height, size_t bpp)
 
int winpr_bitmap_write (const char *filename, const BYTE *data, size_t width, size_t height, size_t bpp)
 
int winpr_bitmap_write_ex (const char *filename, const BYTE *data, size_t stride, size_t width, size_t height, size_t bpp)
 
int winpr_image_write (wImage *image, const char *filename)
 
static int winpr_image_png_read_fp (wImage *image, FILE *fp)
 
static int winpr_image_png_read_buffer (wImage *image, const BYTE *buffer, size_t size)
 
static int winpr_image_bitmap_read_fp (wImage *image, FILE *fp)
 
static int winpr_image_bitmap_read_buffer (wImage *image, const BYTE *buffer, size_t size)
 
int winpr_image_read (wImage *image, const char *filename)
 
int winpr_image_read_buffer (wImage *image, const BYTE *buffer, size_t size)
 
wImagewinpr_image_new (void)
 
void winpr_image_free (wImage *image, BOOL bFreeBuffer)
 

Macro Definition Documentation

◆ TAG

#define TAG   WINPR_TAG("utils.image")

WinPR: Windows Portable Runtime Image Utils

Copyright 2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2016 Inuvika Inc. Copyright 2016 David PHAM-VAN d.pha.nosp@m.mvan.nosp@m.@inuv.nosp@m.ika..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ readBitmapFileHeader()

static BOOL readBitmapFileHeader ( wStream s,
WINPR_BITMAP_FILE_HEADER bf 
)
static
Here is the caller graph for this function:

◆ readBitmapInfoHeader()

static BOOL readBitmapInfoHeader ( wStream s,
WINPR_BITMAP_INFO_HEADER bi 
)
static
Here is the caller graph for this function:

◆ winpr_bitmap_construct_header()

BYTE* winpr_bitmap_construct_header ( size_t  width,
size_t  height,
size_t  bpp 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_bitmap_write()

int winpr_bitmap_write ( const char *  filename,
const BYTE data,
size_t  width,
size_t  height,
size_t  bpp 
)

Refer to "Compressed Image File Formats: JPEG, PNG, GIF, XBM, BMP" book

Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_bitmap_write_ex()

int winpr_bitmap_write_ex ( const char *  filename,
const BYTE data,
size_t  stride,
size_t  width,
size_t  height,
size_t  bpp 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_image_bitmap_read_buffer()

static int winpr_image_bitmap_read_buffer ( wImage image,
const BYTE buffer,
size_t  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_image_bitmap_read_fp()

static int winpr_image_bitmap_read_fp ( wImage image,
FILE *  fp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_image_free()

void winpr_image_free ( wImage image,
BOOL  bFreeBuffer 
)
Here is the caller graph for this function:

◆ winpr_image_new()

wImage* winpr_image_new ( void  )
Here is the caller graph for this function:

◆ winpr_image_png_read_buffer()

static int winpr_image_png_read_buffer ( wImage image,
const BYTE buffer,
size_t  size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_image_png_read_fp()

static int winpr_image_png_read_fp ( wImage image,
FILE *  fp 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_image_read()

int winpr_image_read ( wImage image,
const char *  filename 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_image_read_buffer()

int winpr_image_read_buffer ( wImage image,
const BYTE buffer,
size_t  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_image_write()

int winpr_image_write ( wImage image,
const char *  filename 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeBitmapFileHeader()

static BOOL writeBitmapFileHeader ( wStream s,
const WINPR_BITMAP_FILE_HEADER bf 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeBitmapInfoHeader()

static BOOL writeBitmapInfoHeader ( wStream s,
const WINPR_BITMAP_INFO_HEADER bi 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: