- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsHi,
I need a sub to copy all *.Tif files in folders+subfolders to some other destination folders and at the same time convert each of the *.tif file to *.jpg format since I have insufficient disk space. How do I do that in VB?
Thanks,
Kamarul
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: sonashishPosted on 2004-12-26 at 22:17:23ID: 12905068
I used following code for capturing screen image and save it as bmp and convert it to JPG.
p to " & App.Path & "\CaptureinBmp.jpg with 80% compress quality" , True)
wto/tif2jp eg.html#vb p.asp?ID=1 484 ode.com/vb /scripts/S howCode.as p? txtCodeI d=50065&ln gWId=1 e.com/Prog ramming/ Pr ogramming_ Languages/ Dot_Net/VB _DOT_NET/Q _21085272. html
**************Code Start
Public Declare Function getDesktop Lib "JPGUtils.dll" (ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal blnJpeg As Boolean, ByVal JPGCompressQuality As Integer, ByVal strFileName As String) As Integer
Public Declare Function ConvertBMPtoJPG Lib "JPGUtils.dll" (ByVal strFileName As String, ByVal JPGCompressQuality As Integer, ByVal blnKeepBMP As Boolean) As Integer
Public Declare Function ConvertJPGtoBMP Lib "JPGUtils.dll" (ByVal strFileName As String, ByVal blnKeepJPG As Boolean) As Integer
Sub Main()
Dim retval As Integer
getDesktop 400, 300, False, 10, App.Path & "\CaptureinBmp.bmp"
MsgBox "You just have captured the desktop and saved in " & App.Path & "\CaptureinBmp.bmp with resolution 400 X 300"
retval = ConvertBMPtoJPG(App.Path & "\CaptureinBmp.bmp", 80, True)
If retval Then MsgBox "You just have converted " & App.Path & "\ScreenCaptureinBitmap.bm
getDesktop 0, 0, True, 100, App.Path & "\ScreenCaptureinJpeg.jpg"
MsgBox "You just have captured the desktop and saved in " & App.Path & "\ScreenCaptureinJpeg.jpg with Screen resolution and Compress quality 100%"
retval = ConvertJPGtoBMP(App.Path & "\ScreenCaptureinJpeg.jpg"
If retval Then MsgBox "You just have converted " & App.Path & "\ScreenCaptureinJpeg.jpg to " & App.Path & "\ScreenCaptureinJpeg.bmp"
End Sub
**************Code End
Here is the another examples
http://www.catenary.com/ho
http://www.a1vbcode.com/ap
http://www.Planet-Source-C
http://www.experts-exchang
Hopefully above example solve yourproblem.
GoodLuck
Ashish