tags:

views:

96

answers:

2

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 something 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.

+1  A: 

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!")

MarkJ
+2  A: 

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.

Bob Riemersma