Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: tools/imagediff/image_diff.cc

Issue 6696085: Add the ability to write comments to PNGCodec::Encode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: strdup Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/imagediff/image_diff.cc
diff --git a/tools/imagediff/image_diff.cc b/tools/imagediff/image_diff.cc
index 4a3e3475e2bb29aa3a68bae8cd547371fba79c26..795bc98e8a7aa7685fe93381391a63eb23aa62ad 100644
--- a/tools/imagediff/image_diff.cc
+++ b/tools/imagediff/image_diff.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// 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.
@@ -23,6 +23,7 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "ui/gfx/codec/png_codec.h"
+#include "ui/gfx/size.h"
#if defined(OS_WIN)
#include "windows.h"
@@ -316,8 +317,9 @@ int DiffImages(const FilePath& file1, const FilePath& file2,
std::vector<unsigned char> png_encoding;
gfx::PNGCodec::Encode(diff_image.data(), gfx::PNGCodec::FORMAT_RGBA,
- diff_image.w(), diff_image.h(), diff_image.w() * 4,
- false, &png_encoding);
+ gfx::Size(diff_image.w(), diff_image.h()),
+ diff_image.w() * 4, false,
+ std::vector<gfx::PNGCodec::Comment>(), &png_encoding);
if (file_util::WriteFile(out_file,
reinterpret_cast<char*>(&png_encoding.front()), png_encoding.size()) < 0)
return kStatusError;

Powered by Google App Engine
This is Rietveld 408576698