OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_THUMBNAILS_CONTENT_ANALYSIS_H_ | 5 #ifndef CHROME_BROWSER_THUMBNAILS_CONTENT_ANALYSIS_H_ |
6 #define CHROME_BROWSER_THUMBNAILS_CONTENT_ANALYSIS_H_ | 6 #define CHROME_BROWSER_THUMBNAILS_CONTENT_ANALYSIS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | |
11 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
12 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
13 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
14 | 13 |
15 class SkBitmap; | 14 class SkBitmap; |
16 | 15 |
17 namespace thumbnailing_utils { | 16 namespace thumbnailing_utils { |
18 | 17 |
19 // Compute in-place gaussian gradient magnitude of |input_bitmap| with sigma | 18 // Compute in-place gaussian gradient magnitude of |input_bitmap| with sigma |
20 // |kernel_sigma|. |input_bitmap| is requried to be of SkBitmap::kA8_Config | 19 // |kernel_sigma|. |input_bitmap| is requried to be of SkBitmap::kA8_Config |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // |kernel_sigma| defines the degree of image smoothing in gradient computation. | 75 // |kernel_sigma| defines the degree of image smoothing in gradient computation. |
77 // For a natural-sized (not shrunk) screenshot at 96 DPI and regular font size | 76 // For a natural-sized (not shrunk) screenshot at 96 DPI and regular font size |
78 // 5.0 was determined to be a good value. | 77 // 5.0 was determined to be a good value. |
79 SkBitmap CreateRetargetedThumbnailImage(const SkBitmap& source_bitmap, | 78 SkBitmap CreateRetargetedThumbnailImage(const SkBitmap& source_bitmap, |
80 const gfx::Size& target_size, | 79 const gfx::Size& target_size, |
81 float kernel_sigma); | 80 float kernel_sigma); |
82 | 81 |
83 } // namespace thumbnailing_utils | 82 } // namespace thumbnailing_utils |
84 | 83 |
85 #endif // CHROME_BROWSER_THUMBNAILS_CONTENT_ANALYSIS_H_ | 84 #endif // CHROME_BROWSER_THUMBNAILS_CONTENT_ANALYSIS_H_ |
OLD | NEW |