zoukankan      html  css  js  c++  java
  • 保存图片

    Bitmap empPic;
       try
       {
        empPic = new Bitmap(File1.PostedFile.InputStream);
       }
       catch
       {
        lblErr.Text = "错误文件格式,请重试!!";
        lblErr.Visible = true;
        return;
       }
       lnkPic.Src = File1.PostedFile.FileName;










    Bitmap empPic;
        try
        {
         empPic = new Bitmap(lnkPic.Src);
        }
        catch
        {
         lblErr.Text = "错误文件格式,请重试!!";
         lblErr.Visible = true;
         return;
        }
        Bitmap picSmall = new Bitmap(empPic,110,130);
        MemoryStream stream = new MemoryStream();
        picSmall.Save(stream,ImageFormat.Jpeg);
        byte[]  byteArray = stream.ToArray();
        int empID = Convert.ToInt16(lblEmpID.Text,10);
        MrBaseInf PhotoAccess = new MrBaseInf();
        PhotoAccess.UpdateEmpPic(empID,byteArray);
        Response.Redirect("empbase.aspx?empid="+lblEmpID.Text,false);
  • 相关阅读:
    Android设备管理器
    Android中读取手机联系人
    PopupWindow
    Activity之间数据的传递
    wpa_supplicant
    nandflash之基本特性
    NAND NOR Flash 和MTD
    mtd-util
    linux 常用命令
    minizip -基于zlib开源代码库
  • 原文地址:https://www.cnblogs.com/lingxzg/p/504170.html
Copyright © 2011-2022 走看看