在线PDF转换网站集合

Jquery CDN ,

网站加载速度在线监测工具

此实现不是 Windows 平台 FIPS 验证的加密算法的一部分。

13
2015
07

如何减小png 文件大小

 

  网站上的所用的图片要越小越好,  怎么才能在不失真的情况下 减小文件大小呢?

 

 

使用PhotoShop优化PNG图片


1.
使用PhotoShop打开要优化的PNG图片,点击菜单“文件”→“存储为WEB格式...”。
如何优化PNG图片减小图片文件大小
如何优化PNG图片减小图片文件大小
2
在“存储为WEB格式”对话框中将预设值设置为“PNG-8 128仿色”,根据图片颜色复杂度设置图片颜色:2、4、8、16、32、64、128、256,颜色数越少能够显示的颜色越少,图片尺寸越小。
如何优化PNG图片减小图片文件大小
如何优化PNG图片减小图片文件大小
3
设置时可以在图片下方的状态栏看到优化后的图片文件大小,调整到自己满意的尺寸和图片质量后点击“存储”按钮。

13
2015
07

查询数据库服务器上所有数据库文件的位置和大小

 

 

 

create table #tempTabelInfo
(
name nvarchar(100) not null,        fileid int,        filename nvarchar(300),        filegroup  nvarchar(300),        size nvarchar(300),
maxsize        nvarchar(300),growth nvarchar(300),        usage nvarchar(300)
)
go

13
2015
07

C# 判断png图片某区域是否透明

 

    先把图片分割成无数小块,然后再判断某一块是否透明。

 

       public bool IsTransparentPalette( Bitmap bmp)
       {    
           for (int i = 0; i < bmp.Width; i++)
           {
               for (int j = 0; j < bmp.Height; j++)
               {
                   Color cl = bmp.GetPixel(i, j);
                   if (cl.A != 0)
                   {
                       return false;
                   }
               }
           }
           return true;
       }

11
2015
07

C#图片切割

 

public class ImageManager
    {
        /// <summary>
        /// 图像切割
        /// </summary>
        /// <param name="url">图像文件名称</param>
        /// <param name="width">切割后图像宽度</param>
        /// <param name="height">切割后图像高度</param>
        /// <param name="savePath">切割后图像文件保存路径</param>
        /// <param name="fileExt">切割后图像文件扩展名</param>
        public static void Cut(string url, int width, int height,string savePath,string fileExt,string logofile)
        {
            Bitmap bitmap = new Bitmap(url);
            Decimal MaxRow = Math.Ceiling((Decimal)bitmap.Height / height);
            Decimal MaxColumn = Math.Ceiling((decimal)bitmap.Width / width);
            for (decimal i = 0; i < MaxRow; i++)
            {
                for (decimal j = 0; j < MaxColumn; j++)
                {
                    string filename = i.ToString() + "," + j.ToString() + "." + fileExt;
                    Bitmap bmp = new Bitmap(width, height);
                  
                    for (int offsetX = 0; offsetX < width; offsetX++)
                    {
                        for (int offsetY = 0; offsetY < height; offsetY++)
                        {
                            if (((j * width + offsetX) < bitmap.Width) && ((i * height + offsetY) < bitmap.Height))
                            {
                                bmp.SetPixel(offsetX, offsetY, bitmap.GetPixel((int)(j * width + offsetX), (int)(i * height + offsetY)));
                            }
                        }
                    }                   
                    Graphics g = Graphics.FromImage(bmp);
                    g.DrawString("哲慧科技", new Font("黑体", 20), new SolidBrush(Color.FromArgb(70, Color.WhiteSmoke)), 60, height/2);//加水印
                    ImageFormat format = ImageFormat.Png;                  
                    switch (fileExt.ToLower())
                    {
                        case "png":
                            format = ImageFormat.Png;
                            break;
                        case "bmp":
                            format = ImageFormat.Bmp;
                            break;
                        case "gif":
                            format = ImageFormat.Gif;
                            break;                        

11
2015
07

C#图片分割

 

   Bitmap image = new Bitmap(textBox1.Text);//从TextBox里获得图像的路径
    int Height = image.Height;//图像高度
    int Width = image.Width;//图像宽度
    int x = Convert.ToInt32(comboBox1.Text);//横切x份
    int y = Convert.ToInt32(comboBox2.Text);//纵切y份

11
2015
07

c#分割图片代码

 

public static class ImageSplitTool
    {
        public static ImageSource[] SplitImage(BitmapSource source, int tileWidth, int tileHeight)
        {
            var colCount = source.PixelWidth / tileWidth;
            var rowCount = source.PixelHeight / tileHeight;
            var results = new ImageSource[rowCount * colCount];
            var stride = tileWidth * ((source.Format.BitsPerPixel + 7) / 8);
            var pixelsCount = tileWidth * tileHeight;
            var tileRect = new Int32Rect(0, 0, tileWidth, tileHeight);

11
2015
07

C#图片切割,图片压缩,缩略图的生成代码

 

**//// <summary>
    /// 图片切割函数
    /// </summary>
    /// <param name="sourceFile">原始图片文件</param>
    /// <param name="xNum">在X轴上的切割数量</param>
    /// <param name="yNum">在Y轴上的切割数量</param>
    /// <param name="quality">质量压缩比</param>
    /// <param name="outputFile">输出文件名,不带后缀</param>
    /// <returns>成功返回true,失败则返回false</returns>
    public static bool imageCut(String sourceFile, int xNum, int yNum, long quality, String outputFile)
    {
        try
        {
            long imageQuality                        =    quality;
            Bitmap sourceImage                       =    new Bitmap(sourceFile);
            ImageCodecInfo myImageCodecInfo          =    GetEncoderInfo("image/jpeg");
            Encoder myEncoder                        =    Encoder.Quality;
            EncoderParameters myEncoderParameters    =    new EncoderParameters(1);
            EncoderParameter myEncoderParameter      =    new EncoderParameter(myEncoder, imageQuality);
            myEncoderParameters.Param[0]             =    myEncoderParameter;
            float xWidth                             =    sourceImage.Width / xNum;
            float yWidth                             =    sourceImage.Height / yNum;
            String outputImage                       =    "";
           
            for (int countY = 0; countY < yNum; countY++)
                for (int countX = 0; countX < xNum; countX++)
                {

07
2015
07

国外网站搜索引擎和目录提交入口

国内的网站只需提交到谷歌、百度、搜狗、有道等几个搜索引擎和几个网站目录就可以了。
 

网上整理的搜索引擎提交入口
 
google.com
http://www.google.com/addurl/?continue=/addurl

yahoo.com
http://siteexplorer.search.yahoo.com/submit

01
2015
07

Aspose.Total for .NET 2015 - Unlimited License 注册码

 

 

网上看到的,还没验证过呢、

 

 

How to license Aspose.Total for .NET products
Add
"License.cs" [C#] OR
"License.vb" [Visual Basic] to your application
License.cs
Code:
using System;
using System.IO;
namespace LicenseHelper
{   
    public static class License
    {       
        public const string Key =
            "PExpY2Vuc2U+DQogIDxEYXRhPg0KICAgIDxMaWNlbnNlZFRvPkFzcG9zZSBTY290bGFuZCB" +
            "UZWFtPC9MaWNlbnNlZFRvPg0KICAgIDxFbWFpbFRvPmJpbGx5Lmx1bmRpZUBhc3Bvc2UuY2" +
            "9tPC9FbWFpbFRvPg0KICAgIDxMaWNlbnNlVHlwZT5EZXZlbG9wZXIgT0VNPC9MaWNlbnNlV" +
            "HlwZT4NCiAgICA8TGljZW5zZU5vdGU+TGltaXRlZCB0byAxIGRldmVsb3BlciwgdW5saW1p" +
            "dGVkIHBoeXNpY2FsIGxvY2F0aW9uczwvTGljZW5zZU5vdGU+DQogICAgPE9yZGVySUQ+MTQ" +
            "wNDA4MDUyMzI0PC9PcmRlcklEPg0KICAgIDxVc2VySUQ+OTQyMzY8L1VzZXJJRD4NCiAgIC" +
            "A8T0VNPlRoaXMgaXMgYSByZWRpc3RyaWJ1dGFibGUgbGljZW5zZTwvT0VNPg0KICAgIDxQc" +
            "m9kdWN0cz4NCiAgICAgIDxQcm9kdWN0PkFzcG9zZS5Ub3RhbCBmb3IgLk5FVDwvUHJvZHVj" +
            "dD4NCiAgICA8L1Byb2R1Y3RzPg0KICAgIDxFZGl0aW9uVHlwZT5FbnRlcnByaXNlPC9FZGl" +
            "0aW9uVHlwZT4NCiAgICA8U2VyaWFsTnVtYmVyPjlhNTk1NDdjLTQxZjAtNDI4Yi1iYTcyLT" +
            "djNDM2OGYxNTFkNzwvU2VyaWFsTnVtYmVyPg0KICAgIDxTdWJzY3JpcHRpb25FeHBpcnk+M" +
            "jAxNTEyMzE8L1N1YnNjcmlwdGlvbkV4cGlyeT4NCiAgICA8TGljZW5zZVZlcnNpb24+My4w" +
            "PC9MaWNlbnNlVmVyc2lvbj4NCiAgICA8TGljZW5zZUluc3RydWN0aW9ucz5odHRwOi8vd3d" +
            "3LmFzcG9zZS5jb20vY29ycG9yYXRlL3B1cmNoYXNlL2xpY2Vuc2UtaW5zdHJ1Y3Rpb25zLm" +
            "FzcHg8L0xpY2Vuc2VJbnN0cnVjdGlvbnM+DQogIDwvRGF0YT4NCiAgPFNpZ25hdHVyZT5GT" +
            "zNQSHNibGdEdDhGNTlzTVQxbDFhbXlpOXFrMlY2RThkUWtJUDdMZFRKU3hEaWJORUZ1MXpP" +
            "aW5RYnFGZkt2L3J1dHR2Y3hvUk9rYzF0VWUwRHRPNmNQMVpmNkowVmVtZ1NZOGkvTFpFQ1R" +
            "Hc3pScUpWUVJaME1vVm5CaHVQQUprNWVsaTdmaFZjRjhoV2QzRTRYUTNMemZtSkN1YWoyTk" +
            "V0ZVJpNUhyZmc9PC9TaWduYXR1cmU+DQo8L0xpY2Vuc2U+";
        public static Stream LStream = (Stream)new MemoryStream(Convert.FromBase64String(LicenseHelper.License.Key));
               
    }
}
License.vb
Code:
Imports System
Imports System.IO
Namespace LicenseHelper
    Public Class License
        Public Const Key As String =
            "PExpY2Vuc2U+DQogIDxEYXRhPg0KICAgIDxMaWNlbnNlZFRvPkFzcG9zZSBTY290bGFuZCB" +
            "UZWFtPC9MaWNlbnNlZFRvPg0KICAgIDxFbWFpbFRvPmJpbGx5Lmx1bmRpZUBhc3Bvc2UuY2" +
            "9tPC9FbWFpbFRvPg0KICAgIDxMaWNlbnNlVHlwZT5EZXZlbG9wZXIgT0VNPC9MaWNlbnNlV" +
            "HlwZT4NCiAgICA8TGljZW5zZU5vdGU+TGltaXRlZCB0byAxIGRldmVsb3BlciwgdW5saW1p" +
            "dGVkIHBoeXNpY2FsIGxvY2F0aW9uczwvTGljZW5zZU5vdGU+DQogICAgPE9yZGVySUQ+MTQ" +
            "wNDA4MDUyMzI0PC9PcmRlcklEPg0KICAgIDxVc2VySUQ+OTQyMzY8L1VzZXJJRD4NCiAgIC" +
            "A8T0VNPlRoaXMgaXMgYSByZWRpc3RyaWJ1dGFibGUgbGljZW5zZTwvT0VNPg0KICAgIDxQc" +
            "m9kdWN0cz4NCiAgICAgIDxQcm9kdWN0PkFzcG9zZS5Ub3RhbCBmb3IgLk5FVDwvUHJvZHVj" +
            "dD4NCiAgICA8L1Byb2R1Y3RzPg0KICAgIDxFZGl0aW9uVHlwZT5FbnRlcnByaXNlPC9FZGl" +
            "0aW9uVHlwZT4NCiAgICA8U2VyaWFsTnVtYmVyPjlhNTk1NDdjLTQxZjAtNDI4Yi1iYTcyLT" +
            "djNDM2OGYxNTFkNzwvU2VyaWFsTnVtYmVyPg0KICAgIDxTdWJzY3JpcHRpb25FeHBpcnk+M" +
            "jAxNTEyMzE8L1N1YnNjcmlwdGlvbkV4cGlyeT4NCiAgICA8TGljZW5zZVZlcnNpb24+My4w" +
            "PC9MaWNlbnNlVmVyc2lvbj4NCiAgICA8TGljZW5zZUluc3RydWN0aW9ucz5odHRwOi8vd3d" +
            "3LmFzcG9zZS5jb20vY29ycG9yYXRlL3B1cmNoYXNlL2xpY2Vuc2UtaW5zdHJ1Y3Rpb25zLm" +
            "FzcHg8L0xpY2Vuc2VJbnN0cnVjdGlvbnM+DQogIDwvRGF0YT4NCiAgPFNpZ25hdHVyZT5GT" +
            "zNQSHNibGdEdDhGNTlzTVQxbDFhbXlpOXFrMlY2RThkUWtJUDdMZFRKU3hEaWJORUZ1MXpP" +
            "aW5RYnFGZkt2L3J1dHR2Y3hvUk9rYzF0VWUwRHRPNmNQMVpmNkowVmVtZ1NZOGkvTFpFQ1R" +
            "Hc3pScUpWUVJaME1vVm5CaHVQQUprNWVsaTdmaFZjRjhoV2QzRTRYUTNMemZtSkN1YWoyTk" +
            "V0ZVJpNUhyZmc9PC9TaWduYXR1cmU+DQo8L0xpY2Vuc2U+"
        Public Shared LStream As Stream = New MemoryStream(Convert.FromBase64String(LicenseHelper.License.Key))
    End Class
End Namespace

23
2015
06

国内的广告推广网站

 除了百度联盟,一直在寻找其他的广告联盟,有一下几个

 

  1. 聚效广告

    http://juxiao.mediav.com/

  2. 网易联盟

    http://union.163.com/