/// <summary>
/// 图像缩略图处理
/// </summary>
/// <param name="bytes">图像源数据</param>
/// <param name="compression">压缩质量 1-100</param>
/// <param name="thumbWidth">缩略图的宽</param>
/// <param name="thumbHeight">缩略图的高</param>
/// <returns></returns>
public static byte[] ConvertToThumbnail(byte[] bytes, int compression = 100, int thumbWidth = 0, int thumbHeight = 0)
{
byte[] bs = null;
try
{
if (bytes != null)
{
using (MemoryStream ms = new MemoryStream(bytes))
{
using (Bitmap srcimg = new Bitmap(ms))
{