Fixed Transparency issues: always using transparent when the captured image is transparent, if not use the DWMBackgroundColor. (and fixed a compile error due to forgotten commit)

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1671 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-02-20 16:40:00 +00:00
parent d3cb2d3e41
commit 096c33656c
3 changed files with 22 additions and 13 deletions

View file

@ -890,6 +890,15 @@ namespace GreenshotPlugin.Core {
public static Bitmap Clone(Image sourceBitmap) {
return CloneArea(sourceBitmap, Rectangle.Empty, PixelFormat.DontCare);
}
/// <summary>
/// Wrapper for just cloning & TargetFormat which calls the CloneArea
/// </summary>
/// <param name="sourceBitmap">Image to clone</param>
/// <param name="targetFormat">Target Format, use PixelFormat.DontCare if you want the original (or a default if the source PixelFormat is not supported)</param>
/// <returns>Bitmap with clone image data</returns>
public static Bitmap Clone(Image sourceBitmap, PixelFormat targetFormat) {
return CloneArea(sourceBitmap, Rectangle.Empty, targetFormat);
}
/// <summary>
/// Clone an image, taking some rules into account: