Page 1 of 1

Image Processing v.1.0

Posted: 16 Jun 2015 14:29
by waqu

Code: Select all

"Convert to JPG"
 foreach($token,<get SelectedItemsPathNames |>){
  $r=0;
  $i++;
  if($i==15){
   $i=0;
   $r=2;
  }
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /jpgq=91 /convert=$token.jpg /cmdexit",,$r,0;
 }
 sound "%SystemRoot%\media\tada.wav";
 status "Done";

"Convert to PNG"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /convert=$token.png /cmdexit",,2,0;
 }

"Convert to TIFF"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /convert=$token.tif /cmdexit",,2,0;
 }

"Convert to ICO 32x32"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /resize=(32,32) /resample /aspectratio /convert=""$token-32x32.ico"" /cmdexit",,2,0;
 }
-
"Resize to 480x320"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /resize=(480,320) /resample /aspectratio /convert=""<curpath>\<curbase>-480x320.<curext>"" /cmdexit",,2,0;
 }

"Resize to 200x150"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /resize=(200,150) /resample /aspectratio /convert=""<curpath>\<curbase>-200x150.<curext>"" /cmdexit",,2,0;
 }

"Resize to 800x600"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /resize=(800,600) /resample /aspectratio /convert=""<curpath>\<curbase>-800x600.<curext>"" /cmdexit",,2,0;
 }

-
"Rotate 90° Right"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /rotate_r /convert=""<curpath>\<curbase>-rotate90right.<curext>"" /cmdexit",,2,0;
 }

"Rotate 90° Left"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /rotate_l /convert=""<curpath>\<curbase>-rotate90left.<curext>"" /cmdexit",,2,0;
 }

"Rotate 180°"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /rotate_r /rotate_r /convert=""<curpath>\<curbase>-rotate180.<curext>"" /cmdexit",,2,0;
 }

-
"Capture Fullscreen"
 run "<xydrive>\SP\IrfanView\i_view32.exe $token /capture=0 /convert=""I:\Temp\capture_$U(%d%m%Y_%H%M%S).png"" /cmdexit",,2,0;

-
"Effect Median"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /effect=(6,3,0) /convert=""<curpath>\<curbase>-median.<curext>"" /cmdexit",,2,0;
 }

"Effect Blur"
 foreach($token,<get SelectedItemsPathNames |>){
  run "<xydrive>\SP\IrfanView\i_view32.exe $token /effect=(2,3,50) /convert=""<curpath>\<curbase>-blur.<curext>"" /cmdexit",,2,0;
 }
-
"Crop: Top and Bottom"
 foreach($token,<get SelectedItemsPathNames |>){
  $r=0;
  $i++;
  if($i==15){
   $i=0;
   $r=2;
  }
  run "<xydrive>\SP\IrfanView\i_view32.exe ""$token"" /crop=(6,126,705,324,0) /convert=""<curpath>\<curbase>-crop.<curext>"" /cmdexit",,$r,0;
 }
Install:
* Replace "<xydrive>\SP\IrfanView\i_view32.exe" on your a path to the program IrfanView.

Re: Image Processing

Posted: 16 Jun 2015 14:49
by bdeshi
you can make the paths to the programs into global variables, declared in "_Initialize", and include them in each subscript. That way, if the paths change, the user only has to update them in one place.

btw, XYplorer can do b64 en/de-coding itself. check the undocumented commands.