Forum Moderators: not2easy

Message Too Old, No Replies

Home Web Album Software

Using VisualBasic 6

         

giggle

9:33 am on Dec 20, 2004 (gmt 0)

10+ Year Member



Hi

Not sure where exactly to post this question, this forum sounded close...

I'm in the process of writing some software to to upload my hundreds of family pictures to the web and have hit a problem...

Using VisualBasic I can't find a way to resize the image to something more web friendly. (I don't just want to set the width/height in HTML, but create smaller images for displaying)...

Does anyone know of a way of resizing images in VB or am I resigned to a painful manual process using Adobe and the Image>Image Size feature?

Thanks

CaseyRyan

4:17 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



Instead of using VB to programatically do it, you could use Irfan View [irfanview.com].
It is a free app that has a pretty robust command line interface. From your VB program you could piece together the command and execute it using the WshShell library. Irfan also does Bulk operations of converting, resizing and renaming so you.

-=casey=-

limbo

4:36 pm on Dec 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



..not just irfanview... Most Images editors have a batch/folder processor of sorts.

You say "painful manual process using Adobe", does that mean you are using Photoshop? If so the batch process will allow you to process as many images as you want, just set it running and put the kettle on.

CaseyRyan

4:55 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



Most Images editors have a batch/folder processor of sorts.

What Irfan View has that others do not is a command line interface which would be usable from VB. I've not run across many others that support batch processing without having to use the user interface.

-=casey=-

limbo

4:56 pm on Dec 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I Gotcha :)

Added > I was a user of irfanview till I gained access to Photoshop - It's very versatile freeware - not sure if photoshop can do what you mentioned but I guess it probably can, or has a plug-in.

giggle

6:51 am on Dec 21, 2004 (gmt 0)

10+ Year Member



Thanks guys, made me look into PhotoShop a bit more and, as you suggested, the answer lies in there...

Now where's that kettle...

garann

10:07 pm on Dec 21, 2004 (gmt 0)

10+ Year Member



giggle, you might want to look into GDI32. It lets you do simple image manipulation like resizing in VB. I've only used the VB.NET version (GDI+), but I know it was available for VB6, too.

I got a few example scripts searching for
"resize image" GDI32

I think it's easier to do it in Photoshop, but if you ever wanted to add the functionality to your code, GDI is probably a good place to start.