Results 1 to 10 of 10

Thread: [RESOLVED] Get the image generated by Graphics into a bitmap

Threaded View

  1. #1

    Thread Starter
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Resolved [RESOLVED] Get the image generated by Graphics into a bitmap

    Inside PictureBox1_Paint I used PaintEventArgs parameter to draw some graphics and make transformations (rotation/scale).
    All changes are visible in the picturebox. Now I want to extract the image/bitmap updated, I mean, a bitmap with all that transformations I did, how to do it? The image in the picturebox is always Nothing.
    VB Code:
    1. Private Sub PictureBox1_Paint(ByVal sender As System.Object, _
    2.         ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
    3.         e.Graphics.Clear(PictureBox1.BackColor)
    4.         RotateImage(e) 'Another sub
    5.         ZoomImage(e)   'Another sub
    6.         e.Graphics.DrawImage(MyBitmap, -PosX, -PosY) 'My bitmap drawn with transformation
    7.     End Sub
    There I send MyBitmap to be drawn by e.Graphics, but it's not 'transformed', it's just used to draw, How can I get the transfomed bitmap?
    Last edited by jcis; Mar 6th, 2006 at 08:20 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width