Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  SkImageEncoderFns.h

  Sprache: C
 

/*
 * Copyright 2012 The Android Open Source Project
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


#ifndef SkImageEncoderFns_DEFINED
#define SkImageEncoderFns_DEFINED

#include "include/codec/SkEncodedOrigin.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkData.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkTypes.h"
#include "include/encode/SkICC.h"
#include "include/private/SkExif.h"
#include "modules/skcms/skcms.h"

#include <cstring>
#include <optional>

typedef void (*transform_scanline_proc)(char* dst, const char* src, int width, int bpp);

static inline void transform_scanline_memcpy(char* dst, const char* src, int width, int bpp) {
    memcpy(dst, src, width * bpp);
}

static inline void transform_scanline_A8_to_GrayAlpha(char* dst, const char* src, int width, int) {
    for (int i = 0; i < width; i++) {
        *dst++ = 0;
        *dst++ = *src++;
    }
}

static inline sk_sp<SkData> icc_from_color_space(const SkColorSpace* cs) {
    if (!cs) {
        return nullptr;
    }
    skcms_Matrix3x3 toXYZD50;
    if (cs->toXYZD50(&toXYZD50)) {
        skcms_TransferFunction fn;
        cs->transferFn(&fn);
        return SkWriteICCProfile(fn, toXYZD50);
    }
    return nullptr;
}

static inline sk_sp<SkData> icc_from_color_space(const SkImageInfo& info) {
    return icc_from_color_space(info.colorSpace());
}

static inline sk_sp<SkData> exif_from_origin(const SkEncodedOrigin origin) {
    SkExif::Metadata metadata;
    metadata.fOrigin = origin;
    return SkExif::WriteExif(metadata);
}

#endif  // SkImageEncoderFns_DEFINED

Messung V0.5 in Prozent
C=94 H=85 G=89

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002