summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer/importer_util.h
blob: 9c76efe8674230c00275d417f9b7913ff6958213 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_IMPORTER_IMPORTER_UTIL_H_
#define CHROME_BROWSER_IMPORTER_IMPORTER_UTIL_H_
#pragma once

#include <cstddef>
#include <vector>

namespace importer {

// Given raw image data, decodes the icon, re-sampling to the correct size as
// necessary, and re-encodes as PNG data in the given output vector. Returns
// true on success.
bool ReencodeFavicon(const unsigned char* src_data,
                     size_t src_len,
                     std::vector<unsigned char>* png_data);

}  // namespace importer

#endif  // CHROME_BROWSER_IMPORTER_IMPORTER_UTIL_H_