Some time ago I was looking to join images (comic strips) and ended up finding some precious information and at the same time I got to know Irfanview.
This precious information was a small Vbs script, which gathered 3 images in a single image horizontal or vertically using naturally Irfanview.
Performed by the "Professional User Mij", I dedicated myself to try to change the script to the merge not of three, but of two images, which I manage to.
The script went like this:
**************************************************
dim shell, fso
Dim f, folderlist, item, File(4), process, panout, Irfanview, Appcall
Dim mask, test, dot, extn, count
set fso = CreateObject("Scripting.FileSystemObject")
set shell = createObject("WScript.shell")
'Defaults
Irfanview = "C:\Programas\Irfanview\i_view32.exe" 'location of irfanview application
mask = "jpg,png,gif" 'files to process inside folder
panextn = ".jpg" 'file type for panoramas
If wscript.arguments.count = 0 then
msgbox "No folder selected" : wscript.quit
else
process = wscript.arguments(0)
end if
Appcall = chr(34) & Irfanview & chr(34) & " "
panout= process & "\panoramas"
if fso.FolderExists(panout) = false then fso.CreateFolder(panout)
Set f = fso.GetFolder(process)
Set folderlist = f.Files
Count=1
For Each item in folderlist
test= item.name : dot=InstrRev(test,".")
if dot >1 and len(test)-dot >1 then extn = mid(test,dot+1) else extn = "none"
if instr(1,mask,extn,1) >0 then
File(count) = test
If count=2 then count=0 : pano File(1), File(2)
count=count+1
End If
Next
set shell=nothing
set objFSO=nothing
WScript.quit
Sub pano (f1,f2)
concat = panout & "" & head(f1) & "_" & head(f2) & panextn
filestring = "2," & f1 & "," & f2 ' horizontal=1 , vertical=2
shell.Run Appcall & "/panorama=("& filestring & ") /convert=" & concat ,2 ,true
' wscript.echo concat
End sub
Function head(name)
head=left(name, instr(name, ".")-1)
name= process & "" & name
End function
**************************************************
I'm missing a small situation, which I don't know if you can help, which is to create a space between the two images of about 25 pixels.
I know that in the "image - create panorama" I can do this for every two images, but the idea is to work with a large amount of images.
Above all, thank you very much
This precious information was a small Vbs script, which gathered 3 images in a single image horizontal or vertically using naturally Irfanview.
Performed by the "Professional User Mij", I dedicated myself to try to change the script to the merge not of three, but of two images, which I manage to.
The script went like this:
**************************************************
dim shell, fso
Dim f, folderlist, item, File(4), process, panout, Irfanview, Appcall
Dim mask, test, dot, extn, count
set fso = CreateObject("Scripting.FileSystemObject")
set shell = createObject("WScript.shell")
'Defaults
Irfanview = "C:\Programas\Irfanview\i_view32.exe" 'location of irfanview application
mask = "jpg,png,gif" 'files to process inside folder
panextn = ".jpg" 'file type for panoramas
If wscript.arguments.count = 0 then
msgbox "No folder selected" : wscript.quit
else
process = wscript.arguments(0)
end if
Appcall = chr(34) & Irfanview & chr(34) & " "
panout= process & "\panoramas"
if fso.FolderExists(panout) = false then fso.CreateFolder(panout)
Set f = fso.GetFolder(process)
Set folderlist = f.Files
Count=1
For Each item in folderlist
test= item.name : dot=InstrRev(test,".")
if dot >1 and len(test)-dot >1 then extn = mid(test,dot+1) else extn = "none"
if instr(1,mask,extn,1) >0 then
File(count) = test
If count=2 then count=0 : pano File(1), File(2)
count=count+1
End If
Next
set shell=nothing
set objFSO=nothing
WScript.quit
Sub pano (f1,f2)
concat = panout & "" & head(f1) & "_" & head(f2) & panextn
filestring = "2," & f1 & "," & f2 ' horizontal=1 , vertical=2
shell.Run Appcall & "/panorama=("& filestring & ") /convert=" & concat ,2 ,true
' wscript.echo concat
End sub
Function head(name)
head=left(name, instr(name, ".")-1)
name= process & "" & name
End function
**************************************************
I'm missing a small situation, which I don't know if you can help, which is to create a space between the two images of about 25 pixels.
I know that in the "image - create panorama" I can do this for every two images, but the idea is to work with a large amount of images.
Above all, thank you very much
Comment