Image Crop

Results 1 to 2 of 2

Thread: Image Crop

  1. #1
    Join Date
    Dec 1969

    Default Image Crop

    I want to crop the image to the size that I want. How do I have to do? The problem is if I using bitmap, it&#039;s only show the crop image, but not the other things (label, list, table, etc)<BR>I want to display the cropping image and other things together, please help, thx.<BR>Ex :<BR>dim Gambar as System.Drawing.Image<BR>dim strFilename as string = server.mappath("/Image/abc.jpg") Gambar = System.Drawing.Image.FromFile(strFileName) <BR><BR>dim b as New system.drawing.bitmap(Gambar.width, Gambar.height, pixelformat.format24bpprgb) <BR><BR>dim g as graphics = graphics.fromimage(b) <BR>g.clear(color.white)<BR>&#039;####CROP THE IMAGE<BR>g.drawimage(Gambar,140,100,New rectangle(180,80,60,110),GraphicsUnit.Pixel) <BR> <BR>response.contenttype="image/jpeg"<BR>&#039;###After this line, evertything gone, I mean it&#039;s only display <BR>&#039;###the cropping image, but the other things has gone<BR>, imageformat.jpeg)<BR>&#039;###-------------------------------- <BR>b.dispose()

  2. #2
    Join Date
    Dec 1969

    Default RE: Image Crop

    Do you have this image code in the same file as the code that handles the other elements? If so, then you will have problems. You should create your ASPX page with all of your elements and an Image Server Control or a regular HTML Image Element with the src attribute or imageURL attribute pointing to another ASPX page that has only the code you listed in your post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts