View previous topic :: View next topic |
Author |
Message |
Bojo
Joined: 22 Oct 2004 Posts: 23 Location: Denmark
|
Posted: Fri Feb 25, 2005 10:05 am Post subject: PictureBox stretching artifacts |
|
|
When using the sizeMode STRETCH_IMAGE, artifacts occur when image is reduced in size. (Black lines)
I've had this problem before, and it's due to the default StretchBlt-mode, which is BLACKONWHITE. Changing the mode to COLORONCOLOR, removes the artifacts and should be compatible with most windows versions.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_6cth.asp
Regards
Bo |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Fri Feb 25, 2005 12:25 pm Post subject: Re: PictureBox stretching artifacts |
|
|
Bojo wrote: | When using the sizeMode STRETCH_IMAGE, artifacts occur when image is reduced in size. (Black lines)
I've had this problem before, and it's due to the default StretchBlt-mode, which is BLACKONWHITE. Changing the mode to COLORONCOLOR, removes the artifacts and should be compatible with most windows versions. | The default StretchBlt mode is COLORONCOLOR. Perhaps you just don't like the poor quality of the nearest neighbor algorighm? The mode HALFTONE has a lot better quality but it's a lot slower and is only supported on NT. |
|
Back to top |
|
|
Bojo
Joined: 22 Oct 2004 Posts: 23 Location: Denmark
|
Posted: Fri Feb 25, 2005 1:00 pm Post subject: Re: PictureBox stretching artifacts |
|
|
Vathix wrote: | The default StretchBlt mode is COLORONCOLOR. Perhaps you just don't like the poor quality of the nearest neighbor algorighm? The mode HALFTONE has a lot better quality but it's a lot slower and is only supported on NT. |
I'm not talking about the poor aliased look of COLORONCOLOR , but about black lines and pixel-artifacts in the image. Only BLACKONWHITE does this.
COLORONCOLOR is only default on Win9X. On Win NT/2000/XP it's BLACKONWHITE. I'm pretty sure about this.
Regards
Bo |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Fri Feb 25, 2005 2:34 pm Post subject: |
|
|
Ok, thanks. I made the change in today's snapshot.
- Chris |
|
Back to top |
|
|
Bojo
Joined: 22 Oct 2004 Posts: 23 Location: Denmark
|
Posted: Fri Feb 25, 2005 3:59 pm Post subject: |
|
|
Vathix wrote: | Ok, thanks. I made the change in today's snapshot.
- Chris |
Great, looks fine now.
Regards
Bo |
|
Back to top |
|
|
|