picturebox的backColor属性设置成baiColor.Transparent 然后设置picturebox.Parent = 父容器;

using (FileStream fs = new FileStream(@"1.jpg", FileMode.Open, FileAccess.Read)) { System.Drawing.Image image = System.Drawing.Image.FromStream(fs); string width = image.Width.ToString(); string height = image.Height.ToString(); }

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="用来测试.aspx.cs" Inherits="用来测试" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <t…