get_png_info {fastpng}R Documentation

Get information about a PNG file

Description

Get information about a PNG file

Usage

get_png_info(src)

Arguments

src

PNG filename or raw vector containing PNG data

Value

Name list of information about the PNG image:

width,height

Dimensions of PNG

bit_depth

Bit depth. 8 or 16 bits

color_type,color_desc

color type and its description

compression_method

Compression setting

filter_method,filter_desc

Filter method and description

interlace_method,interlace_desc

Interlace method and description

Examples

# Create a small grayscale PNG image and fetch its PNG info
mat <- matrix(c(0L, 255L), 3, 4)
png_data <- write_png(mat)
get_png_info(png_data)


[Package fastpng version 0.1.5 Index]