PNG metadata parser implementation. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <mpfr.h>
#include "parse.h"
#include "parse_png.h"
#include "logging.h"
#include "utility.h"
#include "crc.h"
Go to the source code of this file.
Macros | |
#define | INT ((s[0] << 24) | (s[1] << 16) | (s[2] << 8) | (s[3])); s+= 4 |
Functions | |
bool | parse_png (const char *source, int length, mpfr_t cx, mpfr_t cy, mpfr_t cz) |
Parse the original mightymandel .png metadata file format. |
PNG metadata parser implementation.
Definition in file parse_png.c.
#define INT ((s[0] << 24) | (s[1] << 16) | (s[2] << 8) | (s[3])); s+= 4 |
Referenced by parse_png(), and png_iTXt().
bool parse_png | ( | const char * | source, |
int | length, | ||
mpfr_t | cx, | ||
mpfr_t | cy, | ||
mpfr_t | cz | ||
) |
Parse the original mightymandel .png
metadata file format.
PNG has tEXt
chunks with keyword Software set to
mightymandeland
Title set to the view coordinates (in the same format as
parse_ppm()`).
source | A null-terminated input file already loaded into memory. |
length | Length of the input file (without the extra null terminator). |
cx | For output of the real part of the view center. It is already mpfr_init2() 'd. |
cy | For output of the imaginary part of the view center. It is already mpfr_init2() 'd. |
cz | For output of the view radius. It is already mpfr_init2() 'd. |
true
) or failure (false
). Definition at line 21 of file parse_png.c.
References crc(), debug_message, INT, log_message, LOG_WARN, precision_for_radius(), and radius_is_valid().