StretchBlt Distortion On MY Screen

I use StretchBlt to display bitmaps thst I earlyer created with Photoshop V. 4.0.If the bitmap file was prepared rom a previouse scaned photo than the output is fine.If it was a cartoon taken from a Clipart cd-rom, than it is looked mostly grayscaled and only few areas looked ok, in the c program (while in Photoshop it looks fine).
I tryed to save the bitmap file in different modes(Indexed,RGB...)but nothing helped.

Thanks In Advance

Lesher Izack
Who is Participating?
xLsConnect With a Mentor Commented:
first StrechBlt may with some graphic cards be hw accelerated, which means it could give quite good quality, since the hardware will add a billiar filter(or any present) and will make the result look good. if your card does not support this StrechBlt gives a pretty ugly result(ugly distored lines every now and then and some ugly pixels).

However it seems like you have problems with loading the image properly. if you use the LoadImage
done with
//then use StretchBlt(...,..,hBitmap,...);


// This should atleast give you a a proper loading of the bitmap.

Good luck on you :)
Call SetStretchBltMode before stretching the bitmap.

Try different parameters for iStretchMode of SetStretchBltMode.
Are you making the image larger or smaller?
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

lesherAuthor Commented:
Even if I try to open the bitmaps with Bitblt(and not in Strechblt) it does not help.It means the problem exists somewhere else.

>> if I try to open the bitmaps with Bitblt(and not in Strechblt)
You can't "open" them with these functions.

>> it means the problem
>> exists somewhere else

If you stratch a bitmap it will look different.  You can't avoid that.  If you increase the size the bitmap will begin to get "chunky"  That is, you will start seeing large blocks of pixels and the edges of things will become "jagged".  If you scrink the bitmap you will loose detail.  Small peices of detail will be lost, faint portions may dissappear, the image may become darker (all this depends on the mode), but in any case the results will be a degradation in the image qauality.
>> StrechBlt may with some graphic cards be hw
>> accelerated, which means it could give quite
>> good quality
It can't prevent degradation of the image.  Nothing can.
lesher, do you understand how experts exchange works?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.