Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resize JPG Images in Code

Status
Not open for further replies.

Ktx7ca

IS-IT--Management
Apr 5, 2008
88
CA
HI Everyone

I'm looking for code to take large jpg images and convert them to a smaller thumb nail size. That way I can reference and show on forms. For the obvious reasons I won't be imbedding them.

Any IDeas or help Greatly Aprecaited

 
How are ya Ktx7ca . . .

Have a look at the [blue]Size Mode[/blue] property of the [purple]Image[/purple] & [purple]Unbound Object Frame[/purple] and select [blue]Zoom[/blue]!

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Thanks AceMan

Thats not quite what I'm looking for as there is a long wait time as the picture loads. What I'm wanting to do is to rezise the pic and save is a 50K file. Done by the program and not have use an outside program as there are diffent users and skill levels.

I have seen it done in some other access apps. I just can't seam to find the code or function for it.
 
Ktx7ca said:
[blue]What I'm wanting to do is to rezise the pic and save is a 50K file.[/blue]
Access can't do this for you. In fact, I've never seen or heard of, any program that [blue]automatically[/blue] resizes to a given byte range and saves!

Access [blue]renders[/blue] a graphic according to the [blue]Size Mode[/blue] property. Since you have large graphics, the processing time you see comes from rendering to the size of the image object (much smaller).

I wish I had better news, but I don't see you accomplishing you task unless you render the large graphics to smaller files yourself. [surprise]

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Ktx7ca . . .

The graphics will have to be presized if you want get rid of the processing time!

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
HI Ace and Joe

I had the same Idea as you Joe and was looking around in VB and it gave me the Idea to try some API calls. It looks like It might work from the quick test I did. I'll be giving a proper look at in the next day or so.
 
If you can find any program that does picture resizing, such as Microsoft Office Picture Manager, you could research if you could get it to run with command line arguments. If so, you could probably use Shell to run the program from VBA.

Joe Schwarz
Custom Software Developer
 
HI Joe before I got the API idea Last nigth I found 2 small command line utillites that resize that I thought might do the job as a back up.

Have you ever run from shell can it seen buy the user?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top