CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: save picture

  1. #1
    Join Date
    Nov 2000
    Location
    Tokyo and Memphis
    Posts
    238

    save picture

    Once I count the black pixels on a picture I load a label that displays that count. I'd like to save the picture with the label on it as a picture. I realise the label isn't part of the picture but to save the image as a composite would I use bitblt and save it that way or is there a better way?

    I also paint some lines onto the picture but then saving the picture doesn't record those new paintings. Is that bitblt again?


    Many thanks

    Phil



  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: save picture

    Use

    Picture1.CurrentX = 10
    Picture1.CurrentY = 10
    Picture1.print numBlack



    to print the number directly on the picture box.
    Though IntelliSense doesn't sense the Print method, it works for the picturebox too.

    About the lines, are you using the line from the toolbox, or the Line statement.

    To make sure that the lines you draw are saved, set the sutoredraw property of the picturebox to true and draw lines using

    Picture1.Line (x1,y1)-(x2,y2)

    Now, the lines that you draw will be saved.


  3. #3
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: save picture

    Use

    Picture1.CurrentX = 10
    Picture1.CurrentY = 10
    Picture1.print numBlack



    to print the number directly on the picture box.
    Though IntelliSense doesn't sense the Print method, it works for the picturebox too.

    About the lines, are you using the line from the toolbox, or the Line statement.

    To make sure that the lines you draw are saved, set the Autoredraw property of the picturebox to true and draw lines using

    Picture1.Line (x1,y1)-(x2,y2)

    Now, the lines that you draw will be saved.


  4. #4
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: save picture

    Swift and nice. Great.

    Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

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

Featured