Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: batch conversion
I'm scanning in my family photo albums, which is a manual process. Much to my chagrin, I discovered that my scanning software only returns bitmap files (.BMP) with 24-bit color. I want to convert these to .JPG format, with baseline image processing (as opposed to progressive processing) and highest quality (e.g. lowest compression) on the .JPG file that gets produced. The .JPG format is more efficient than .BMP format even when the image quality is set to its highest possible value. What I want to do is to simply reduce the overall disk space used by the image files.
I currently have 3 x 1.0GB Jaz disks filled with images, which equates to about 150 B&W and color photographs. This is just a single photo album and there are about 15 more of them that need to be scanned. I want to batch process all of these from .BMP to .JPG format. Once the image conversion is done they get entered into a photo catalog database and then burned onto a CD-ROM.
I currently have the Adobe PhotoDeluxe v2.0 and Adobe PhotoShop v4.0 LE software packages that came bundled with my scanner and digital camera. I cannot find any information at http://www.deja.com or http://www.adobe.com regarding any OLE automation features in these products. Each of these products has nice fuctions for doing an automatic image quality enhancement and saving to a different format. I could take some time to use the Control Manager extender to automate PhotoDeluxe, but I'm really hoping that OLE automation support is available in a decent graphics editing package. Does anybody know about such a product with OLE automation features?
Lview Product Page
See as follows...
list=FileItemize("*.gif") count=ItemCount(list,@tab) Run("C:\Apps\lviewpro\LVIEWPRO.EXE","") Timedelay(2) lv=WinIDGet(WinGetActive()) for xx=1 to count giffile=ItemExtract(xx,list,@tab) clipput(giffile) jpgfile=strcat(FileRoot(giffile),".jpg") if FileExist(jpgfile) then continue SendMenusto(lv,"FileOpen") SendKey("^v~") wa=0 wx2=0 while wa<20 TimeDelay(1) wx2=wx2+1 if wx2>10 then break wa=strlen(WinGetActive()) endwhile Errormode(@off) LastError() :woop SendMenusTo(lv,"FileSaveAs") if lasterror()!=0 then goto woop Errormode(@cancel) if FileExist(jpgfile) then continue Clipput(jpgfile) SendKey("^v~") while Filesize(jpgfile)==0 TimeDelay(1) endwhile ; break next
AddExtender("WWHTM34I.DLL") ; This is the Camera Copier BaseDirectory=DirGet() UseHtmlFile=strcat(BaseDirectory,"jpg.html") tempfile=Environment("TEMP") if strsub(tempfile,strlen(tempfile),1)!="\" then tempfile=strcat(tempfile,"\") tempfile=strcat(tempfile,"jpegtemp.html") WinTitle("","Camera Copier") srcfolder="A:\imolym\" destfolder=Strcat(BaseDirectory,"Pictures\") if !DirExist(destfolder) then DirMake(destfolder) x=0 while x==0 ErrorMode(@off) x=LogDisk("A:") ErrorMode(@CANCEL) if x==1 then break Pause("A:","Not ready. Insert disk") endwhile DirChange(basedirectory) srclist=FileItemize("%srcfolder%*.jpg") srccount=ItemCount(srclist,@TAB) realcount=srccount if ((srccount mod 2) == 1) srclist=strcat(srclist,@tab,"NONE") srccount=srccount+1 endif linecount=srccount / 2 bb=BinaryAlloc(10000) gosub dohtmlfixup ;debug(1) url=hBrowse(2,tempfile,3) if url=="" then exit button=hGetVarValue("button","xxx") if button=="Cancel" then exit if button=="Ok" newlist="" for xx = 1 to linecount indexplusone=(xx*2) index=indexplusone-1 if xx!=1 then newlist=strcat(newlist,@tab) TA=hGetVarValue("index%index%","NONE") TB=hGetVarValue("index%indexplusone%","NONE") newlist=strcat(newlist,TA,@TAB,TB) next for xx=1 to realcount origname=ItemExtract(xx,srclist,@tab) newname=ItemExtract(xx,newlist,@tab) if newname=="NONE" ;Message("Skipping #%xx%",origname) continue endif srcfile=strcat(srcfolder,origname) destfile=strcat(destfolder,newname,".jpg") rslt=FileCopy("%srcfile%","%destfile%",1) next endif Message("All","Doned") exit ; bye :DoHtmlFixup ;debug(1) BinaryEODSet(bb,0) BinaryRead(bb,UseHtmlFile) Structure=BinaryTagInit(bb,"{{","}}") while 1 structure=BinaryTagFind(structure) if structure=="" then break wbdata=strtrim(BinaryTagExtr(structure,0)) wbcmd=strlower(ItemExtract(1,wbdata," ")) wbparams=strtrim(strsub(wbdata,strlen(wbcmd)+1,-1)) HtmlValue="???????" gosub %wbcmd% ; structure=BinaryTagRepl(structure,HtmlValue) endwhile BinaryWrite(bb,tempfile) return :Value HtmlValue=%wbparams% return :INSERTPICTURES HtmlValue="" for xx = 1 to linecount indexplusone=(xx*2) index=indexplusone-1 jpga=ItemExtract(index,srclist,@tab) jpgb=ItemExtract(indexplusone,srclist,@tab) fulljpga=strcat(srcfolder,jpga) fulljpgb=strcat(srcfolder,jpgb) temp=StrReplace(wbparams,"XXXJPGA",FileRoot(jpga)) temp=StrReplace(temp,"XXXJPGB",FileRoot(jpgb)) temp=StrReplace(temp,"XXXFULLJPGA",fulljpga) temp=StrReplace(temp,"XXXFULLJPGB",fulljpgb) temp=StrReplace(temp,"XXXTA","index%index%") temp=StrReplace(temp,"XXXTB","index%indexplusone%") htmlvalue=strcat(htmlvalue,temp) next return
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Microsoft FrontPage Express 2.0"> <title>JPG Renamer</title> </head> <body bgcolor="#FFFFFF"> <h1 align="center">JPG Renamer</h1> <div align="center"><center> <table border="0"> <tr> <td><p align="center">From:</p> </td> <td><p align="center">{{VALUE SRCFOLDER}}</p> </td> </tr> <tr> <td><p align="center">To:</p> </td> <td><p align="center">{{VALUE DESTFOLDER}}</p> </td> </tr> </table> </center></div> <p> </p> <div align="center"><center> <form method="POST" action="ignored"> <table border="0" width="95%"> {{INSERTPICTURES <!--new pair--> <tr> <td valign="top"><img src="XXXFULLJPGA" align="middle" width="320" height="240"></td> <td valign="top"><img src="XXXFULLJPGB" align="middle" width="320" height="240"></td> </tr> <tr> <td align="center"> <p> <b>XXXJPGA</b> <br><input type="text" size="35" name="XXXTA" value=""></p> </td> <td align="center"> <p> <b>XXXJPGB</b> <br><input type="text" size="35" name="XXXTB" value=""></p> </td> </tr> }} </table> <p><INPUT TYPE="SUBMIT" VALUE="Ok" name="button"> <INPUT TYPE="SUBMIT" VALUE="Cancel" name="button"> </form> </center></div> </body> </html>
Article ID: W14376
Filename: Batch Graphics Conversion.txt
File Created: 2001:12:04:15:06:32
Last Updated: 2001:12:04:15:06:32