#include "png.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
Include dependency graph for pngtest.c:
Go to the source code of this file.
Defines | |
#define | READFILE(file, data, length, check) check=(png_size_t)fread(data,(png_size_t)1,length,file) |
#define | WRITEFILE(file, data, length, check) check=(png_size_t)fwrite(data,(png_size_t)1, length, file) |
#define | FCLOSE(file) fclose(file) |
#define | PNG_DEBUG 0 |
#define | SINGLE_ROWBUF_ALLOC |
#define | STDERR stdout |
Typedefs | |
typedef version_1_2_8 | your_png_h_is_not_version_1_2_8 |
Functions | |
int test_one_file | PNGARG ((PNG_CONST char *inname, PNG_CONST char *outname)) |
void | read_row_callback (png_structp png_ptr, png_uint_32 row_number, int pass) |
void | write_row_callback (png_structp png_ptr, png_uint_32 row_number, int pass) |
void | count_filters (png_structp png_ptr, png_row_infop row_info, png_bytep data) |
void | count_zero_samples (png_structp png_ptr, png_row_infop row_info, png_bytep data) |
int | test_one_file (PNG_CONST char *inname, PNG_CONST char *outname) |
int | main (int argc, char *argv[]) |
Variables | |
static int | tIME_chunk_present = 0 |
static char | tIME_string [30] = "no tIME chunk present in file" |
static int | verbose = 0 |
static int | status_pass = 1 |
static int | status_dots_requested = 0 |
static int | status_dots = 1 |
static png_uint_32 | filters_used [256] |
static png_uint_32 | zero_samples |
static int | wrote_question = 0 |
static PNG_CONST char * | inname = "pngtest.png" |
static PNG_CONST char * | outname = "pngout.png" |
#define FCLOSE | ( | file | ) | fclose(file) |
#define READFILE | ( | file, | |||
data, | |||||
length, | |||||
check | ) | check=(png_size_t)fread(data,(png_size_t)1,length,file) |
#define SINGLE_ROWBUF_ALLOC |
#define STDERR stdout |
#define WRITEFILE | ( | file, | |||
data, | |||||
length, | |||||
check | ) | check=(png_size_t)fwrite(data,(png_size_t)1, length, file) |
void count_filters | ( | png_structp | png_ptr, | |
png_row_infop | row_info, | |||
png_bytep | data | |||
) |
void count_zero_samples | ( | png_structp | png_ptr, | |
png_row_infop | row_info, | |||
png_bytep | data | |||
) |
Definition at line 198 of file pngtest.c.
References n, png_bytep, and png_uint_32.
Referenced by test_one_file().
int main | ( | int | argc, | |
char * | argv[] | |||
) |
*************************************************************************** ! FILE NAME : autoexposure.c ! DESCRIPTION: Daemon to adjust camera exposure and white balance ! Copyright (C) 2008 Elphel, Inc. ! -----------------------------------------------------------------------------** ! This program is free software: you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation, either version 3 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program. If not, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** ! !
define X313_CHN_DISALL_D 0xaa0 // disable all channels, do not modify refresh or memory as a whole define X313_SDRAM_OFF_D 0xaaa // disable all chennels, refresh and memory itself define X313_SDRAM_ON_D 0xaaf // will disable all channels but refresh
test system memory - now - just for intereference, not a real memory test
allocate memory
deallocate memory
Definition at line 1308 of file pngtest.c.
References exit, filters_used, png_access_version_number(), png_get_copyright(), png_get_header_version(), PNG_HEADER_VERSION_STRING, png_libpng_ver, PNG_LIBPNG_VER, PNG_LIBPNG_VER_STRING, PNG_READ_USER_TRANSFORM_SUPPORTED, png_sizeof, status_dots_requested, STDERR, test_one_file(), tIME_chunk_present, tIME_string, verbose, and zero_samples.
void read_row_callback | ( | png_structp | png_ptr, | |
png_uint_32 | row_number, | |||
int | pass | |||
) |
Definition at line 128 of file pngtest.c.
References PNG_UINT_31_MAX, and stdout.
Referenced by test_one_file().
int test_one_file | ( | PNG_CONST char * | inname, | |
PNG_CONST char * | outname | |||
) |
Definition at line 599 of file pngtest.c.
References background, bit_depth, blue_x, blue_y, color_type, compression_type, count_filters(), count_zero_samples(), FCLOSE, filters_used, gamma, green_x, green_y, height, hist, inbuf, int, intent, location, mod_time, nparams, num_palette, num_text, num_trans, num_unknowns, offset_x, offset_y, palette, params, png_bytep, png_bytep_NULL, png_bytepp_NULL, png_convert_to_rfc1123(), png_create_info_struct(), png_create_read_struct(), png_create_read_struct_2(), png_create_write_struct(), png_create_write_struct_2(), png_debug, png_debug1, png_debug2, png_destroy_info_struct(), png_destroy_read_struct(), png_destroy_write_struct(), png_error_ptr_NULL, png_free(), png_free_data(), PNG_FREE_UNKN, png_get_bKGD(), png_get_cHRM(), png_get_cHRM_fixed(), png_get_gAMA(), png_get_gAMA_fixed(), png_get_hIST(), png_get_iCCP(), png_get_IHDR(), png_get_image_height(), png_get_image_width(), png_get_oFFs(), png_get_pCAL(), png_get_pHYs(), png_get_PLTE(), png_get_rowbytes(), png_get_sBIT(), png_get_sCAL(), png_get_sRGB(), png_get_text(), png_get_tIME(), png_get_tRNS(), png_get_unknown_chunks(), PNG_HANDLE_CHUNK_ALWAYS, PNG_HANDLE_CHUNK_IF_SAFE, png_init_io(), PNG_INTERLACE_NONE, png_jmpbuf, PNG_LIBPNG_VER_STRING, png_malloc(), png_memcmp, png_memcpy, png_read_end(), png_read_info(), png_read_rows(), png_read_status_ptr_NULL, png_set_bKGD(), png_set_cHRM(), png_set_cHRM_fixed(), png_set_error_fn(), png_set_gAMA(), png_set_gAMA_fixed(), png_set_hIST(), png_set_iCCP(), png_set_IHDR(), png_set_interlace_handling(), png_set_keep_unknown_chunks(), png_set_oFFs(), png_set_pCAL(), png_set_pHYs(), png_set_PLTE(), png_set_read_fn(), png_set_read_status_fn(), png_set_read_user_transform_fn(), png_set_sBIT(), png_set_sCAL(), png_set_sRGB(), png_set_text(), png_set_tIME(), png_set_tRNS(), png_set_unknown_chunk_location(), png_set_unknown_chunks(), png_set_write_fn(), png_set_write_status_fn(), png_set_write_user_transform_fn(), png_size_t, png_sizeof, png_strcpy, png_uint_32, png_voidp_NULL, png_write_end(), PNG_WRITE_FLUSH_SUPPORTED, png_write_info(), PNG_WRITE_INTERLACING_SUPPORTED, png_write_rows(), png_write_status_ptr_NULL, PNG_ZBUF_SIZE, profile, proflen, purpose, read_row_callback(), READFILE, red_x, red_y, res_x, res_y, sig_bit, SINGLE_ROWBUF_ALLOC, status_dots_requested, STDERR, text_ptr, tIME_chunk_present, tIME_string, trans, trans_values, type, unit, unit_type, units, unknowns, verbose, white_x, white_y, width, write_row_callback(), wrote_question, X0, X1, and zero_samples.
Referenced by main().
void write_row_callback | ( | png_structp | png_ptr, | |
png_uint_32 | row_number, | |||
int | pass | |||
) |
Definition at line 155 of file pngtest.c.
References PNG_UINT_31_MAX, and stdout.
Referenced by test_one_file().
png_uint_32 filters_used[256] [static] |
int status_dots = 1 [static] |
int status_dots_requested = 0 [static] |
int status_pass = 1 [static] |
int tIME_chunk_present = 0 [static] |
char tIME_string[30] = "no tIME chunk present in file" [static] |
int wrote_question = 0 [static] |
png_uint_32 zero_samples [static] |