need higher quality stretchblt (downsizing)

Posted on 2006-05-12
Last Modified: 2010-05-18
I have a bunch of 1000x1000 grayscale images, and I display thumbnails of them by using StretchBlt, setting the mode to HALFTONE. While you can tell what the thumbnails are of, they have, well, sort of a "denim" (yeah, like your jeans) quality/texture look to them which I've been told "is not good enough"

ha! so anyway, I've tried some of the other stretchblt modes and none of them make good looking images (I'm taking them from 1000x1000 down to about 85x85, and even smaller as the number of thumbnails I have to display in the given area increases)

Can somebody recommend an alternative to stretchblt that will give me quality thumbnails?

Question by:PMH4514
    LVL 22

    Accepted Solution

    You need the function DWIWNWCBDBAC(), sometimes known as "Do What I Want, Not What Can BE Done By A Computer".

    You're asking a computer to shrink a picture by a factor of 125, but keep the important details.
    I suspect that falls into the category of "hard AI".  I'm not sure you could give arbitrary images to,
    say a Leo DaVinci and get him to be generate a thumbnail that is "good".

    That said, you can eliminate the "jaggies" by filtering the image with a low-pass filter.
    Try some of the "demoire" options in your favorite graphics program and see if that helps.
    Note that this will smooth things out, making it look a bit better, but the resolution will still be fuzzy compared to the original.

    Author Comment

    hah! I get DWIWNWCBDBAC requests daily :)

    I can't use graphics editors, I have to do this with code as the user captures images.  problem is, the folks making those requests are aware of what Photoshop and such can do for them off-line. "It's just code right??"


    Author Comment


    Author Comment

    well, that codegury article solved my question, but your response made me laugh so I'm going to give you the points :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
    Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
    The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now