2 * Copyright (C) 2004 John Ellis
3 * Copyright (C) 2008 - 2016 The Geeqie Team
5 * Author: Vladimir Nadvornik
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef IMAGE_LOAD_JPEG_H
23 #define IMAGE_LOAD_JPEG_H
27 #include <gdk-pixbuf/gdk-pixbuf.h>
30 #include "image-load.h"
32 struct ImageLoaderJpeg : public ImageLoaderBackend
35 ~ImageLoaderJpeg() override;
37 void init(AreaUpdatedCb area_updated_cb, SizePreparedCb size_prepared_cb, AreaPreparedCb area_prepared_cb, gpointer data) override;
38 void set_size(int width, int height) override;
39 gboolean write(const guchar *buf, gsize &chunk_size, gsize count, GError **error) override;
40 GdkPixbuf *get_pixbuf() override;
41 void abort() override;
42 gchar *get_format_name() override;
43 gchar **get_format_mime_types() override;
46 AreaUpdatedCb area_updated_cb;
47 SizePreparedCb size_prepared_cb;
48 AreaPreparedCb area_prepared_cb;
53 guint requested_width;
54 guint requested_height;
60 std::unique_ptr<ImageLoaderBackend> get_image_loader_backend_jpeg();
62 #endif /* IMAGE_LOAD_JPEG_H */
64 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */