Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7421535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:25:37+00:00 2026-05-29T08:25:37+00:00

I’m using Windows (both 7 & XP – both 32bit) and coding in C++

  • 0

I’m using Windows (both 7 & XP – both 32bit) and coding in C++

I am receiving bitmaps from an external source. These bitmaps are of a fixed resolution (384×288)

After I receive a bitmap, I need to resize it based on a variable sized layout, so I’m currently using StretchBlt to perform these tasks.

If I resize the bitmap to a larger on screen image, this works great.

However, if I shrink the incoming bitmap to a smaller version to place on the screen I get some strange ‘boxing’ type effect that occurs over the image.

In the following example, the source image is the same for each of the three panels. But the left hand two (resize smaller) both have the boxing/lines effect on them.

enter image description here

For the actual StretchBlt call, I’m doing this:

        memcpy(at_TempPointer[PortNo], // Destination
          (void *)VideoBufferAddress, // Source
          FIXED_IMAGE_WIDTH * FIXED_IMAGE_HEIGHT * BYTES_PER_PIXEL // Number of bytes
          );

    StretchBlt(at_ImageDC[PortNo], // HDC Dest
               0, // X Origin Dest
               0, // Y Origin Dest
               at_Width[PortNo], // Width Dest
               at_Height[PortNo], // Height Dest
               at_GhDC[PortNo], // HDC Source
               0, // X Origin Source
               0, // Y Origin Source
               FIXED_IMAGE_WIDTH, // Width Source
               FIXED_IMAGE_HEIGHT, // Height Source
               SRCCOPY // Graphic Operation
               );

But I’m wondering if perhaps the issue is elsewhere.

Has anyone else had experience of this kind of resizing image corruption that knows how I can fix it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:25:38+00:00Added an answer on May 29, 2026 at 8:25 am

    Are you setting StretchBlt mode using SetStretchBltMode?

    HALFTONE

    Maps pixels from the source rectangle into blocks of pixels in the
    destination rectangle. The average color over the destination block of
    pixels approximates the color of the source pixels.

    After setting the HALFTONE stretching mode, an application must call
    the SetBrushOrgEx function to set the brush origin. If it fails to do
    so, brush misalignment occurs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.