Server IP : 92.205.26.207 / Your IP : 216.73.216.16 Web Server : Apache System : Linux 207.26.205.92.host.secureserver.net 4.18.0-553.60.1.el8_10.x86_64 #1 SMP Thu Jul 10 04:01:16 EDT 2025 x86_64 User : zikryat ( 1002) PHP Version : 8.3.23 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/zikryat/public_html/node_modules/sharp/src/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
// Copyright 2013 Lovell Fuller and others. // SPDX-License-Identifier: Apache-2.0 #ifndef SRC_STATS_H_ #define SRC_STATS_H_ #include <string> #include <napi.h> #include "./common.h" struct ChannelStats { // stats per channel int min; int max; double sum; double squaresSum; double mean; double stdev; int minX; int minY; int maxX; int maxY; ChannelStats(int minVal, int maxVal, double sumVal, double squaresSumVal, double meanVal, double stdevVal, int minXVal, int minYVal, int maxXVal, int maxYVal): min(minVal), max(maxVal), sum(sumVal), squaresSum(squaresSumVal), mean(meanVal), stdev(stdevVal), minX(minXVal), minY(minYVal), maxX(maxXVal), maxY(maxYVal) {} }; struct StatsBaton { // Input sharp::InputDescriptor *input; // Output std::vector<ChannelStats> channelStats; bool isOpaque; double entropy; double sharpness; int dominantRed; int dominantGreen; int dominantBlue; std::string err; StatsBaton(): input(nullptr), isOpaque(true), entropy(0.0), sharpness(0.0), dominantRed(0), dominantGreen(0), dominantBlue(0) {} }; Napi::Value stats(const Napi::CallbackInfo& info); #endif // SRC_STATS_H_