Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
imageio_png.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2009-2011, 2014 johannes hanika.
4 Copyright (C) 2012 Richard Wonka.
5 Copyright (C) 2012 Ulrich Pegelow.
6 Copyright (C) 2014 Roman Lebedev.
7 Copyright (C) 2016 Tobias Ellinghaus.
8 Copyright (C) 2019 Philippe Weyland.
9 Copyright (C) 2020 Pascal Obry.
10 Copyright (C) 2022 Martin Baƙinka.
11
12 darktable is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16
17 darktable is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with darktable. If not, see <http://www.gnu.org/licenses/>.
24*/
25
26#pragma once
27
28#include "common/image.h"
29#include "common/mipmap_cache.h"
30
31#include <png.h>
32
33typedef struct dt_imageio_png_t
34{
38 int bpp;
39 FILE *f;
40 png_structp png_ptr;
41 png_infop info_ptr;
43
44int read_header(const char *filename, dt_imageio_png_t *png);
45int read_image(dt_imageio_png_t *png, void *out);
46
48int dt_imageio_png_read_profile(const char *filename, uint8_t **out);
49
50// clang-format off
51// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
52// vim: shiftwidth=2 expandtab tabstop=2 cindent
53// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
54// clang-format on
55
static const dt_colormatrix_t dt_aligned_pixel_t out
Definition colorspaces_inline_conversions.h:184
dt_imageio_retval_t
Definition common/image.h:78
int read_image(dt_imageio_png_t *png, void *out)
Definition imageio_png.c:129
int read_header(const char *filename, dt_imageio_png_t *png)
Definition imageio_png.c:45
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:243
dt_imageio_retval_t dt_imageio_open_png(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
Definition imageio_png.c:160
Definition common/image.h:247
Definition imageio_png.h:34
int bit_depth
Definition imageio_png.h:37
png_infop info_ptr
Definition imageio_png.h:41
int max_width
Definition imageio_png.h:35
int color_type
Definition imageio_png.h:37
png_structp png_ptr
Definition imageio_png.h:40
int height
Definition imageio_png.h:36
FILE * f
Definition imageio_png.h:39
int max_height
Definition imageio_png.h:35
int bpp
Definition imageio_png.h:38
int width
Definition imageio_png.h:36
Definition mipmap_cache.h:68