chromium/ui/gfx/image/image_util.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/gfx/image/image_util.h"

#include <stdint.h>

#include <algorithm>
#include <memory>

#include "build/build_config.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/codec/jpeg_codec.h"
#include "ui/gfx/codec/webp_codec.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_rep.h"
#include "ui/gfx/image/resize_image_dimensions.h"

namespace {

// Returns whether column |x| of |bitmap| has any "visible pixels", where
// "visible" is defined as having an opactiy greater than an arbitrary small
// value.
bool ColumnHasVisiblePixels(const SkBitmap& bitmap, int x) {}

}  // namespace

namespace gfx {

// The iOS implementations of the JPEG functions are in image_util_ios.mm.
#if !BUILDFLAG(IS_IOS)

Image ImageFrom1xJPEGEncodedData(const unsigned char* input,
                                 size_t input_size) {}

Image ResizedImageForSearchByImage(const Image& image) {}

Image ResizedImageForMaxDimensions(const Image& image,
                                   int max_width,
                                   int max_height,
                                   int max_area) {}

// The MacOS implementation of this function is in image_utils_mac.mm.
#if !BUILDFLAG(IS_MAC)
bool JPEG1xEncodedDataFromImage(const Image& image,
                                int quality,
                                std::vector<unsigned char>* dst) {}
#endif  // !BUILDFLAG(IS_MAC)

bool JPEG1xEncodedDataFromSkiaRepresentation(const Image& image,
                                             int quality,
                                             std::vector<unsigned char>* dst) {}

bool WebpEncodedDataFromImage(const Image& image,
                              int quality,
                              std::vector<unsigned char>* dst) {}

Image ResizedImage(const Image& image, const gfx::Size& size) {}
#endif  // !BUILDFLAG(IS_IOS)

void GetVisibleMargins(const ImageSkia& image, int* left, int* right) {}

}  // namespace gfx