CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Shrinking Pictures

    Is there a way to shrink pictures? Stretchblt will expand them but how do you do the opposite? If I try to pass a target Picturebox to Stretchblt that is smaller than the source, it gives RC = 0.
    Thanks in advance


    John G

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

    Re: Shrinking Pictures

    StretchBlt does shrink images. You must have made some mistake. The destination height and width, the scalemode etc are the parameters to check.

    PaintPicture does it too, but it is quite slow. Nevertheless, ou can use paintpicture to make the parameters work, and then port them to StretchBlt.


  3. #3
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Shrinking Pictures

    Shree. Thanks for your reply. Believe it or not, while twiddling my thumbs, I decided to search Codeguru forum for some suggestions and got a hit for a post I REPLIED to a couple of weeks ago. My reply was the solution to my current problem. I guess Senility is creeping in. I even posted a complete working sample in my reply.

    John G

  4. #4
    Join Date
    May 2001
    Posts
    155

    Re: Shrinking Pictures

    i guess you know more than you think

    --Ant
    --------------------------------------------------
    check out my newest freeware
    E-mail me at: [email protected]
    for the address

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

    Re: the url...

    I was looking for it, but I was unable to find your post. May you provide the url?

    Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
    ...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.

  6. #6
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: the url...

    Here it is. It doesn't specificaly address shrinling a picture, but it does do the job.
    http://63.236.73.79/cgi-bin/bbs/wt/s...age=0&Limit=25

    John G

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