Skip to content

Commit

Permalink
Pass through the profile info when creating a high-quality scaled off…
Browse files Browse the repository at this point in the history
  • Loading branch information
herbderby authored and Commit bot committed Apr 18, 2016
1 parent cd07bed commit b4b83dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/SkBitmapScaler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ bool SkBitmapScaler::Resize(SkBitmap* resultPtr, const SkPixmap& source, ResizeM
}

SkBitmap result;
result.setInfo(SkImageInfo::MakeN32(destWidth, destHeight, source.alphaType()));
// Note: pass along the profile information even thought this is no the right answer because
// this could be scaling in sRGB.
result.setInfo(SkImageInfo::MakeN32(destWidth, destHeight,
source.alphaType(), source.info().profileType()));
result.allocPixels(allocator, nullptr);

SkPixmap resultPM;
Expand Down

0 comments on commit b4b83dc

Please sign in to comment.