Ansel 0.0
A darktable fork - bloat + design vision
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
imageio_png.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2009-2020 darktable developers.
4
5 darktable is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 darktable is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with darktable. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#include "common/image.h"
22#include "common/mipmap_cache.h"
23
24#include <png.h>
25
26typedef struct dt_imageio_png_t
27{
31 int bpp;
32 FILE *f;
33 png_structp png_ptr;
34 png_infop info_ptr;
36
37int read_header(const char *filename, dt_imageio_png_t *png);
38int read_image(dt_imageio_png_t *png, void *out);
39
41int dt_imageio_png_read_profile(const char *filename, uint8_t **out);
42
43// clang-format off
44// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
45// vim: shiftwidth=2 expandtab tabstop=2 cindent
46// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
47// clang-format on
48
dt_imageio_retval_t
Definition common/image.h:37
int read_image(dt_imageio_png_t *png, void *out)
Definition imageio_png.c:119
int read_header(const char *filename, dt_imageio_png_t *png)
Definition imageio_png.c:35
struct dt_imageio_png_t dt_imageio_png_t
int dt_imageio_png_read_profile(const char *filename, uint8_t **out)
Definition imageio_png.c:224
dt_imageio_retval_t dt_imageio_open_png(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
Definition imageio_png.c:150
Definition common/image.h:195
Definition imageio_png.h:27
int bit_depth
Definition imageio_png.h:30
png_infop info_ptr
Definition imageio_png.h:34
int max_width
Definition imageio_png.h:28
int color_type
Definition imageio_png.h:30
png_structp png_ptr
Definition imageio_png.h:33
int height
Definition imageio_png.h:29
FILE * f
Definition imageio_png.h:32
int max_height
Definition imageio_png.h:28
int bpp
Definition imageio_png.h:31
int width
Definition imageio_png.h:29
Definition mipmap_cache.h:58