CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 1999
    Posts
    2

    StretchBlit distortion

    I am using the StretchBlit function to stretch a bitmap with 16777216 colors. When I 'shrink' the image, the image becomes distorted. I am hoping that I can adjust something , the Font or Pallette as an example, when the image is resized. Is their a way to resolve the distortion?

    Chip

  2. #2
    Join Date
    May 1999
    Posts
    8

    Re: StretchBlit distortion

    Lets see your code. Ive used StretchBit many times although i haven't used it on anything more than 256 colors. I do know this: Make sure that your destination RECT and source RECT are the same size, otherwise StretchBit will automaticlly adjust the source to fit the dest RECT, and the end result will be pixel degradation. My Best advice to you is make your own zooming algorithim.

    Regards,
    Abadon


  3. #3
    Join Date
    May 1999
    Location
    Republic of Korea
    Posts
    74

    Re: StretchBlit distortion

    Try to call SetStretchBltMode before you call StretchBitBlt.
    In my case COLORONCOLOR mode worked best.
    If you are not satisfied with the results, I agree with the other answer.
    You'd better to use your own zooming scheme.




  4. #4
    Join Date
    May 1999
    Posts
    2

    Re: StretchBlit distortion

    Yes, Thank you. That works just fine. I just found this site and did not read previous postings. Thank you Jason T.

    Chip

  5. #5
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: StretchBlit distortion

    Um... If you mean me, you're welcome.



    --
    Jason Teagle
    [email protected]

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