FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PictureBox stretching artifacts

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
Bojo



Joined: 22 Oct 2004
Posts: 23
Location: Denmark

PostPosted: Fri Feb 25, 2005 10:05 am    Post subject: PictureBox stretching artifacts Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Fri Feb 25, 2005 12:25 pm    Post subject: Re: PictureBox stretching artifacts Reply with quote

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
View user's profile Send private message
Bojo



Joined: 22 Oct 2004
Posts: 23
Location: Denmark

PostPosted: Fri Feb 25, 2005 1:00 pm    Post subject: Re: PictureBox stretching artifacts Reply with quote

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 Wink, 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. Confused



Regards

Bo
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Fri Feb 25, 2005 2:34 pm    Post subject: Reply with quote

Ok, thanks. I made the change in today's snapshot.
- Chris
Back to top
View user's profile Send private message
Bojo



Joined: 22 Oct 2004
Posts: 23
Location: Denmark

PostPosted: Fri Feb 25, 2005 3:59 pm    Post subject: Reply with quote

Vathix wrote:
Ok, thanks. I made the change in today's snapshot.
- Chris


Great, looks fine now. Very Happy

Regards

Bo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group