دوستان سلام میخواستم بدونم چظوری ما می تونیم روی عکس عملیات زوم کردن رو انجام بدیم
دوستان سلام میخواستم بدونم چظوری ما می تونیم روی عکس عملیات زوم کردن رو انجام بدیم
سلام دوست عزیز شما می تونید از jquery استفاده کنید .
یا هم از این کد :
protected void Page_Load(object sender, EventArgs e)
{
Mouse mouse = (Mouse)Session[Mouse.SessionName];
ImageViewParameters Pageparams = (ImageViewParameters)Session[ImageViewParameters.SessionName];
if (mouse == null || Pageparams == null )
{
Server.Transfer("Zoomzoom.aspx");
}
string loc = Request.QueryString[PageVariables.ImagePath].ToString(); // this.ImageButton1.ImageUrl.Replace("~", "");
if (loc == null)
{
return;
}
if (loc.Length < 5)
{
return;
}
Bitmap bitmap = new Bitmap(loc);
MouseToImageCoordinates(mouse, Pageparams, bitmap);
// Dimentions of the zoomed square
float squareSizeX = (int)( (float)bitmap.Width / (float)Pageparams.ZoomLevel );
float squareSizeY = (int)((float) bitmap.Height / (float)Pageparams.ZoomLevel );
// Create a new bitmap which we will draw on
Bitmap bitmap2 = new Bitmap(bitmap.Width, bitmap.Height);
// Get the graphics device from the blank image
Graphics g = Graphics.FromImage( bitmap2 );
// Make a rect around where the user clicked
float desX = ( mouse.X - (squareSizeX / 2.0f) ) ;
float desY = ( mouse.Y - (squareSizeY / 2.0f) );
RectangleF source = new RectangleF(desX, desY, squareSizeX, squareSizeY);
RectangleF destination = new RectangleF(0, 0, bitmap.Width, bitmap.Height);
g.DrawImage(bitmap, destination, source, GraphicsUnit.Pixel);
// Output the image to the stream
bitmap2.Save(Response.OutputStream, ImageFormat.Jpeg);
}
این هم یه مثال برای zoom عکس :
سلام
آقا بهمن اینجا تالار J2ME یه و کد شما ASPx
البته منظور رو رسوندی!
به این لینک سر یزن http://svtln.blogfa.com/post-9.aspx