#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 {
bool ColumnHasVisiblePixels(const SkBitmap& bitmap, int x) { … }
}
namespace gfx {
#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) { … }
#if !BUILDFLAG(IS_MAC)
bool JPEG1xEncodedDataFromImage(const Image& image,
int quality,
std::vector<unsigned char>* dst) { … }
#endif
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
void GetVisibleMargins(const ImageSkia& image, int* left, int* right) { … }
}