libjxl

FORK: libjxl patches used on blog
git clone https://git.neptards.moe/blog/libjxl.git
Log | Files | Refs | Submodules | README | LICENSE

image_loading.h (952B)


      1 // Copyright (c) the JPEG XL Project Authors. All rights reserved.
      2 //
      3 // Use of this source code is governed by a BSD-style
      4 // license that can be found in the LICENSE file.
      5 
      6 #ifndef TOOLS_COMPARISON_VIEWER_IMAGE_LOADING_H_
      7 #define TOOLS_COMPARISON_VIEWER_IMAGE_LOADING_H_
      8 
      9 #include <QByteArray>
     10 #include <QImage>
     11 #include <QString>
     12 
     13 #include "lib/jxl/base/common.h"
     14 
     15 namespace jpegxl {
     16 namespace tools {
     17 
     18 // `extension` should not include the dot.
     19 bool canLoadImageWithExtension(QString extension);
     20 
     21 // Converts the loaded image to the given display profile, or sRGB if not
     22 // specified. Thread-hostile.
     23 QImage loadImage(const QString& filename,
     24                  const QByteArray& targetIccProfile = QByteArray(),
     25                  float intensityTarget = jxl::kDefaultIntensityTarget,
     26                  const QString& sourceColorSpaceHint = QString());
     27 
     28 }  // namespace tools
     29 }  // namespace jpegxl
     30 
     31 #endif  // TOOLS_COMPARISON_VIEWER_IMAGE_LOADING_H_