Archived
Fixed: icon transparency fault
This commit is contained in:
1 parent
4c031108f0
commit
2af53adcae
4 files changed
+13
-43
No files matched your search
@@ -3,7 +3,6 @@ using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BookmarkManager
|
||||
{
|
||||
@@ -96,7 +95,6 @@ namespace BookmarkManager
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public Image FindIcon(string id)
|
||||
{
|
||||
if (dbConnection == null) return null;
|
||||
@@ -148,7 +146,8 @@ namespace BookmarkManager
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Bitmap(img, 16, 16);
|
||||
return img;
|
||||
//return new Bitmap(img, 16, 16);
|
||||
}
|
||||
|
||||
public bool HasIcon(string id)
|
||||
@@ -236,11 +235,14 @@ namespace BookmarkManager
|
||||
|
||||
protected byte[] ImageToBytes(Image image)
|
||||
{
|
||||
MemoryStream stream = new MemoryStream();
|
||||
image.Save(stream, ImageFormat.Bmp);
|
||||
stream.Close();
|
||||
//MemoryStream stream = new MemoryStream();
|
||||
//image.Save(stream, image.RawFormat);
|
||||
//stream.Close();
|
||||
|
||||
return stream.ToArray();
|
||||
//return stream.ToArray();
|
||||
|
||||
ImageConverter imageConverter = new ImageConverter();
|
||||
return (byte[])imageConverter.ConvertTo(image, typeof(byte[]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user