2
* Copyright (C) 2013-2014 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
#ifndef GALLERY_PHOTO_EDIT_THREAD_H_
18
#define GALLERY_PHOTO_EDIT_THREAD_H_
20
#include "photo-caches.h"
21
#include "photo-edit-command.h"
24
#include "orientation.h"
33
* \brief The PhotoEditThread class
35
class PhotoEditThread: public QThread
39
PhotoEditThread(PhotoData *photo, const PhotoEditCommand& command);
41
const PhotoEditCommand& command() const;
44
void run() Q_DECL_OVERRIDE;
47
QImage enhanceImage(const QImage& image);
48
QImage compensateExposure(const QImage& image, qreal compansation);
49
QImage doColorBalance(const QImage& image, qreal brightness, qreal contrast, qreal saturation, qreal hue);
50
void handleSimpleMetadataRotation(const PhotoEditCommand& state);
53
PhotoEditCommand m_command;