Jump to content
UBot Underground

Image resizer via command line?


Recommended Posts

Anyone know how to resize image with ubot without using image resizer website or installing something in the user computer?

Or simple by creating image resizer command line?

 

Tried imagemagick but it needs to install on your computer before you can use it.

I tried this code I found on the net also but it didnt work.

"i_view32.exe c:\temp\testpics\*.jpg /resize=(200,100) /aspectratio /resample /convert=c:\temp\testpics\testsmall\*.png"

 

 

 

Thanks

Link to post
Share on other sites

i_view32.exe is from IrfanView so i would think you need to install that for this to work

If you use IrfanView i believe there are also some vbscripts that also work with Irfanview thats one more opton

Link to post
Share on other sites

Hey K,

 

Have you tried using a 3rd party website like online-image-editor?

 

I use it for many things. Might be worth looking into...

 

Not sure what your hoping to accomplish, but this might be an option to look into. You can resize during upload and then re-download. Or you can resize to your width and height specifications...

 

HTH,

Justin

Link to post
Share on other sites

Heres an example script to resize images to fit your needs:

image resizer.ubot

 

And here it is in code form

ui open file("Picture", #picture)
ui text box("Height", #height)
ui text box("width", #width)
define picture resize {
   navigate("http://www.online-image-editor.com/", "Wait")
   change file field(<name="FiletoUpload">, #picture)
   click($element offset(<class="parameters">, 1), "Left Click", "No")
   wait for element(<id="btn_resize">, "", "Appear")
   click(<id="btn_resize">, "Left Click", "No")
   wait for element(<name="aspect">, "", "Appear")
   change checkbox(<name="aspect">, "Unchecked")
   change attribute(<name="width">, "value", #width)
   change attribute(<name="height">, "value", #height)
   click(<value="Apply">, "Left Click", "No")
   wait(3)
   wait for element(<id="tlbr_hdr">, "", "Appear")
}

 

HTH,

Justin

Link to post
Share on other sites

Yes Justin, Tried some online image resizer.. It would be more convenient if the solution can be done within command line for what I am doing..

I guess that's the only option that i can do for now.

Thanks for the code. :)

 

K

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...