开发者

How to resize an image smoothly (with resampling) using Windows API calls?

I need to resize images and resample them so they don't end up all jagged (I think that's called aliasing).

I found some code (sorry, lost the link) that does this in pure VB6 code but it's a bit slow (2-5 seconds) and I'm displaying pictures in real time so I need somethin开发者_JAVA技巧g faster.

I seem to recall seeing some examples of doing this with the GDI+ library. An example in VB6 would be ideal, but I can probably work with a simple example with Windows API calls in another language.


WIA 2.0's Scale filter seems to do a decent job. Windows® Image Acquisition Automation Library v2.0 Tool: Image acquisition and manipulation component for VB and scripting

No need for any funky .Net interop.


You could:

  1. Create a VB.net library that can return pictures to a VB6 program.
  2. Write some VB.Net to resize pictures without anti-aliasing.

Alternatively Rod Stephen's book Visual Basic Graphics Programming apparently explains how to do it all in VB6.

Or try to call GDI+ from VB6. Here's a wrapper and type library, good luck! ("Bring your hatchet!")

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜