| Author: Madeshwaran 04 Jul 2009 | Member Level: Bronze | Rating:  Points: 2 |
Hi gourav, Try this <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
for more information you may check http://www.microsoft.com/windows/internet-explorer/readiness/developers-new.aspx
|
| Author: gaurav tyagi 04 Jul 2009 | Member Level: Silver | Rating:  Points: 2 |
thanks buddy for the response.I tried this one also but it was not working.I am really stuck on this issue for the last few days.I dont know how to stop this <pre> tag
|
| Author: monisha 04 Jul 2009 | Member Level: Bronze | Rating:  Points: 2 |
send me generated HTML code.
|
| Author: gaurav tyagi 04 Jul 2009 | Member Level: Silver | Rating:  Points: 2 |
fr
html.doc |
| Author: Madeshwaran 05 Jul 2009 | Member Level: Bronze | Rating:  Points: 2 |
hi in your html file also i am not able find the <pre> tag you mentioned so i am not sure what <pre> tag you are talking about.
Moreover i am also using IE8 only and the html document you gave rendered me a crop button and a div with the inner html and an image.
So not clear what exactly your problem is.
|
| Author: gaurav tyagi 05 Jul 2009 | Member Level: Silver | Rating:  Points: 2 |
thanks Madeshwaran for reply. I finally got the solution.Actually I commented the Response.ContentType line from my aspx.cs file.Its working now
|
| Author: gaurav tyagi 10 Jul 2009 | Member Level: Silver | Rating:  Points: 2 |
lblResults.Text = "X: " + this._txtX.Value + ", Y: " + this._txtY.Value +" "+ "Width: " + this._txtWidth.Value + ", Height: " + this._txtHeight.Value;
int Tmpwidth = Convert.ToInt32(this._txtWidth.Value); int TmpHeight = Convert.ToInt32(this._txtHeight.Value);
int _x = Convert.ToInt32(this._txtX.Value); int _y = Convert.ToInt32(this._txtY.Value);
BaseDataDB tmpDB1 = new BaseDataDB(); BaseDataDB tmpDB2 = new BaseDataDB(); SqlDataReader tmpReader1 = null; try { binaryID = Convert.ToInt32(Utility.GetFromtheContext("id"));
tmpReader1 = tmpDB1.GetBinaryData(binaryID, Utility.GetUserID(), false, Request.IsAuthenticated); if (tmpReader1.Read()) { MemoryStream imgMemoryStream = new MemoryStream(); byte[] img = (byte[])tmpReader1["BINARY_BATA"];
OATIBASE.ImageProcess tmpImgProcess = new OATIBASE.ImageProcess( (int)Utility.GetSystemVariables(Utility.IMAGE_MAX_HEIGHT, Utility.ReturnType.INT), (int)Utility.GetSystemVariables(Utility.IMAGE_MAX_WIDTH, Utility.ReturnType.INT), (int)Utility.GetSystemVariables(Utility.THUMB_SIZE, Utility.ReturnType.INT)); System.Drawing.Image __img = System.Drawing.Image.FromStream(new MemoryStream(img)); tmpImgProcess.DoCropping(__img, _x, _y, Tmpwidth, TmpHeight).Save(imgMemoryStream, System.Drawing.Imaging.ImageFormat.Jpeg); _croppedImage.Visible = true; //tmpImgProcess.DoCropping(imgMemoryStream, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] imgByteArray = imgMemoryStream.ToArray(); Session["ImageBinaryArray"] = imgByteArray; _croppedImage.ImageUrl = "ReturnImage.aspx";
System.Drawing.Image croppedimg = System.Drawing.Image.FromStream(new MemoryStream(imgByteArray)); // byte[] arr = tmpImgProcess.ConvertImage(__img, ImageFormat.Jpeg); byte[] arr = tmpImgProcess.ConvertImage(croppedimg, ImageFormat.Jpeg); byte[] thumb = tmpImgProcess.GetThumbNail(); string mimeType = tmpReader1["MIMEType"].ToString(); string fileName = tmpReader1["FileName"].ToString(); DateTime approvaldt = Convert.ToDateTime(tmpReader1["ApprovalDT"]); int tabId = Convert.ToInt32(tmpReader1["BinaryIdentificationID"]); // tmpDB2.SubmitImage("POR", "TabID", "GalleryPhoto", mimeType, fileName, img, thumb, Utility.GetUserID(), tabId, System.DateTime.UtcNow,approvaldt, new System.DateTime(3000, 1, 1),binaryID); //tmpReader2 = tmpDB2.GetBinaryData(BinaryID, Utility.GetUserID(), false, Request.IsAuthenticated);
tmpDB2.SubmitImage("POR", "TabID", "GalleryPhoto", mimeType, fileName, img, thumb, Utility.GetUserID(), tabId, approvaldt, new System.DateTime(3000, 1, 1), null, binaryID); tmpDB1.CloseConnection(); tmpDB2.CloseConnection(); Response.Write("<script language='javascript'>window.opener.location=window.opener.location;</script>");
|
| Author: gaurav tyagi 29 Jul 2009 | Member Level: Silver | Rating:  Points: 2 |
api
api.rar |
| Author: gaurav tyagi 07 Sep 2009 | Member Level: Silver | Rating:  Points: 2 |
using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls;
namespace Movable { /// <summary> /// Summary description for WebForm1. /// </summary> public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here }
#region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); } /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() {
} #endregion
protected void _btnCrop_Click(object sender, System.EventArgs e) { this._lblResults.Text = "X: "+ this._txtX.Value +", Y: "+ this._txtY.Value + "<br>Width: "+ this._txtWidth.Value +", Height: "+ this._txtHeight.Value;
int Tmpwidth = Convert.ToInt32(this._txtWidth.Value); int TmpHeight = Convert.ToInt32(this._txtHeight.Value);
int _x = Convert.ToInt32(this._txtX.Value); int _y = Convert.ToInt32(this._txtY.Value);
System.Drawing.Image __img = System.Drawing.Image.FromFile(Server.MapPath(this.Image_To_Crop.ImageUrl)); System.Drawing.Image newBitMap = new Bitmap(Tmpwidth,TmpHeight); Graphics tmpGphs = Graphics.FromImage(newBitMap); Rectangle tmpRect = new Rectangle(0,0,Tmpwidth,TmpHeight); tmpGphs.DrawImage(__img,tmpRect,_x,_y,Tmpwidth,TmpHeight,GraphicsUnit.Pixel); tmpGphs.Dispose(); newBitMap.Save(Server.MapPath("TmpPics\\"+ _x.ToString() + _y.ToString() + Tmpwidth.ToString() + TmpHeight.ToString() +".jpg"), System.Drawing.Imaging.ImageFormat.Jpeg); this._croppedImage.ImageUrl = "TmpPics\\"+ _x.ToString() + _y.ToString() + Tmpwidth.ToString() + TmpHeight.ToString() +".jpg"; this._croppedImage.Visible = true; }
protected void _btnNewPic_Click(object sender, System.EventArgs e) { try { System.Drawing.Image __img = System.Drawing.Image.FromStream(this._flNewPic.PostedFile.InputStream);
string strFileName = this._flNewPic.PostedFile.FileName; strFileName = strFileName.Substring(strFileName.LastIndexOf("\\") + 1);
__img.Save(Server.MapPath("TmpPics\\"+ strFileName)); this.Image_To_Crop.ImageUrl = "TmpPics\\"+ strFileName; this._croppedImage.Visible = false; this._txtHeight.Value = "50"; this._txtWidth.Value = "50"; this._txtX.Value = "0"; this._txtY.Value = "0"; } catch(Exception ex) { Trace.Warn(ex.ToString()); } } } }
|