Cyotek Forums

Products => Slicr => Topic started by: woozyvision on October 16, 2018, 09:03:13 PM

Title: How to properly use the Slicr command line tool?
Post by: woozyvision on October 16, 2018, 09:03:13 PM
Hello

I'm having trouble understanding the Slicr command line tool and how to use the snippets properly in the documentation. I'm usually able to search google and piece something together. I must be looking in the wrong places.

All I want to do is make a command line prompt that automatically slices as many 300 x 600 pixel images from the selected image or images. The slices are automatically saved to the location of the original file that was selected and processed. The original file is left untouched.

Ideally, I don't want to have to input any file names or destinations. I plan to add an option in the context menu, so I can just select my photos, right click and say left click "slicr 300 x 600" and it handles the rest for me.

I apologize if there is any confusion on the goal at hand. I don't know how to further explain. Anyone who could help me accomplish this would be much appreciated.

Thanks!
Title: Re: How to properly use the Slicr command line tool?
Post by: Richard Moss on October 20, 2018, 09:15:00 AM
Hello,

Welcome to the forums and thanks for the question.

Are you able to clarify which version of the tool you're using? There are a number of bugs and documentation errors in how 0.3 processes files, so you should probably use 0.4 if you're not already.

The following command line should take the source input file and slice it up in 300x600 chunks. Each chunk will be saved in the working directory with a filename based on the source image, overwriting any existing files.

grid.png /a:fixed /z 300 /v 600 /y

There are a few caveats however

If you wanted to manipulate the filename slightly to avoid any chance of clashes, you can specify a custom string that still means you don't need to provide any concrete filenames, but Slicr will fill the bits, for example

grid.png $(ImageName)-Partial-$(SliceIndex).$(SliceExt) /a:fixed /z 300 /v 600 /y

However, as I said, this will only work with 0.4 as 0.3 had quite a few bugs in command line processing (and no doubt there's still a few more to go).

I will review the documentation as well as it doesn't seem to be helpful enough as it is!

Hopefully this information helps, please let me know if it doesn't. If you do decide to use Slicr for your processing then any feedback would be gratefully received.

Regards;
Richard Moss