How to crop an image that is zoomed(zoomed in/out). Cropping works fine when the image is normal, that is not zoomed. I have used a panel whose AutoScroll property is true and a picturebox inside the panel whose sizemode property is AutoSize and BackgroundImageLayout is Tile. Load image: [CODE] Image img = Image.FromFile("filepath"); picBoxImageProcessing.Image = img;[/CODE] zoom in: [CODE] zoomFactor += 1; picBoxImageProcessing.Size = new Size((img.Width * zoomFactor), (img.Height * zoomFactor)); picBoxImageProcessing.SizeMode = PictureBoxSizeMode.StretchImage;[/CODE] cropping: Draw a rectangular shape on the image and then crop. [CODE]Crop(Image img, Rectangle r) { // }[/CODE] In this way when i zoom in first …

Member Avatar
+0 forum 0

Hi experts, I am trying to find the current level of zoom in a webbrowser control. I know how to zoom but the same doesn't work for retrieving the current level of zoom. I am trying the following: [CODE] Dim currentZoom As Integer DirectCast(Me.ActiveXInstance, SHDocVw.WebBrowser).ExecWB(Exec.OLECMDID_OPTICAL_ZOOM, ExecOpt.OLECMDEXECOPT_PROMPTUSER, IntPtr.Zero, currentZoom) [/CODE] But I keep getting a value of 0 in currentZoom. Here is the MSDN documentation on this: [url]http://msdn.microsoft.com/en-us/library/ms691264%28VS.85%29.aspx[/url] In the documentation you will see the following information regarding extracting the current zoom level: "To query the current zoom value. The caller of IOleCommandTarget::Exec passes OLECMDEXECOPT_DONTPROMPTUSER as the execute option in nCmdExecOpt …

Member Avatar
+0 forum 0

The End.