i have different sige of photo files which was scanned through a scaner and save as *.jpg file , now i want to use all this files in a form made in vb6 where i want to link all these files trough data base so that i can see each photos one by one . but these file has different width and hight but in my form i have make a fix space , so i want to make all these photo files of same width and hight to fit and defined space . but i want this through some program , because this photos are approx. 40000. so manually is not possible. pls help me.

Recommended Answers

All 4 Replies

Yes, But it's a lot more detailed and complex than you might think. Basically, I've devised a way using the API (StretchBlt) That shows how you can copy an image from a picture box, to another picturebox, changing size from one to the other. A Few things to note, is that the quality diminishes during this process (quality of the picture) AND the picture must be visible in order to copy from it. This project loads an image into form2, and when you click the button, makes form2 visible (makes the picture visible), and then copies it to the picturebox on form1, and then hides form2.

As you can see, this would be intensive on the processor, and probably take up quite a bit of RAM. I'm still devising a way to use objects or API Calls to specific graphic programs that would allow for better picture quality and faster processing, but for now, this is how to use the stretchblt API.

thank u Comatose
it is nice solution , but i want in my project that first i will make all the available jpg files of same size than i will use these files in my project form directly by applying simply a path of that file , so i need that type of converter which will make all available jpg file to same size

i have different sige of photo files which was scanned through a scaner and save as *.jpg file , now i want to use all this files in a form made in vb6 where i want to link all these files trough data base so that i can see each photos one by one . but these file has different width and hight but in my form i have make a fix space , so i want to make all these photo files of same width and hight to fit and defined space . but i want this through some program , because this photos are approx. 40000. so manually is not possible. pls help me.

Two thoughts.

- Change the size in a photo editor.

- Make a blank (white or black) space larger than the photo, then do the equivalent of pasting the photo into it.

Two thoughts.

- Change the size in a photo editor.

- Make a blank (white or black) space larger than the photo, then do the equivalent of pasting the photo into it.

There was a program called WINJPEG (shareware) where you could batch reduce. Set the size you wanted the photos and walk away. MAINTAIN Aspect RATIOS!! for sharper output images.

I would make a blank square. where the photos could fit, landscape or portrait. Paste all into blank square , then batch resize.

Watch for compression change. some will compress original too much and you have a lot of 'jaggies' or unusable image. (Keep at 100% for your existing quality)

I had to place over 3000 images of albums in The Complete Motown www.kegtapper.net/TCMC and it was a learning experience. Though I only had to work with smaller sized images.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.