Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
manideep78
Partner - Specialist
Partner - Specialist

conversion of .bmp images to .jpg format using macro.

Dear Community,

I'm looking for an efficient solution which converts ".bmp" imges to ".jpg" format.

Let me explain my problem in detail.

I am having an external machine which is having Millions of images with .bmp format. Now i'm copying the .bmp images from source to destination and when copying into destination it should convert into .JPG format.

Please let me know where and how to convert the format using below macro code

Sub CopyPasteImages
Dim sOriginFolder, sDestinationFolder, sFile, oFSO
Dim iCount, i
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set vLensInspectionImageNames=ActiveDocument.Variables("vLensInspectionImageNames")
Set vImageSourcePath=ActiveDocument.Variables("vImagesLocation")
Set vImageDestinationPath=ActiveDocument.Variables("vImagesDestination")
Set       vSuffixImageName=ActiveDocument.Variables("vSuffixImageName")
ArrFields = split(vLensInspectionImageNames.GetContent.String, ",")
ArrFields2= Split(vSuffixImageName.GetContent.String,",")

'           iCount = 0

For Each fIndex in ArrFields
sOriginFolder = vImageSourcePath.GetContent.string&fIndex  
sDestinationFolder = vImageDestinationPath.GetContent.string&ArrFields2(i)&"-"&fIndex

if oFSO.fileExists(sOriginFolder) then
'                                   iCount = iCount + 1
oFSO.CopyFile sOriginFolder, sDestinationFolder
end if 
'                       If iCount >=500 then Exit Sub

Next
End Sub

Thanks a ton in advance.

Regards,

Manideep

0 Replies