Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
60K Images
#1 this works an every photo I've test except on 1 photo. It just keeps taking one off the quality until it gets down to zero.

Function Resize60K
Copy      Help
ARRAY(str) a
tok _command a -1 " ''" 4
if a.len=0
str ToDay.timeformat("{yyyy}-{MM}-{dd}")

for int'i 0 a.len
,str sPath=a[i]
,out sPath
,str Sizes=
,for int'ii 0 numlines(Sizes)
,,int SKIP=0
,,str Size.getl(Sizes ii)
,,int W=val(Size)
,,double Q=100
,,double C=24
,,str Directory=F"$desktop$\60K\{ToDay}"
,,mkdir Directory
,,str nPath.getfilename(sPath)
,,str cl=
,,cl.findreplace("[]" " ")
,,out cl
,,run "C:\irfanview\i_view32.exe" cl "" "" 0x400
,,nPath.findreplace(".png" ".jpg")
,,if Q>1
,,,Dir d
,,,if d.dir(nPath 0)
,,,,long nSize=d.FileSize
,,,,if nSize>=61440
,,,,,out Q
,,,,,out nSize
,,,,,out "==============="
,,,,,goto BUFFER
run Directory

I was wondering if I could scale the image down to 450px using IrfanView and then call to reduce file size down to 60K.
The RIOT DLL is able to run in Irfanview on the image just fine. Of course there is no way to manipulate plugins through the irfanview command line.

Perhaps there is something that has a command line that will work for this better.


Forum Jump:

Users browsing this thread: 1 Guest(s)