blob: a40340aacab53fea43d6f267543eabf96ff4a9dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright (c) the JPEG XL Project Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "plugins/gimp/common.h"
namespace jxl {
JpegXlGimpProgress::JpegXlGimpProgress(const char *message) {
cur_progress = 0;
max_progress = 100;
gimp_progress_init_printf("%s\n", message);
}
void JpegXlGimpProgress::update() {
gimp_progress_update(static_cast<float>(++cur_progress) /
static_cast<float>(max_progress));
}
void JpegXlGimpProgress::finished() { gimp_progress_update(1.0); }
} // namespace jxl
|