Ruben Veiga
Ruben Veiga

Reputation: 343

Cut jpg file using imagemagick

I want to know if and how this is possible:

I want to make a function in C++ which will receive a JPEG file and coordinates from artoolkit marker and cut the JPEG using those coordinates in order to create a new smaller JPEG file. Coding in Xcode

Upvotes: 0

Views: 299

Answers (1)

Martin Beckett
Martin Beckett

Reputation: 96119

I don't know imagemagic but there is the commandline imagestack tool which can crop images

imagestack -load inputfilename.jpg -crop startx starty width height -save outputfilename.jpg

If you can get the coordinates out of the other app you can write a script to pass them on the commandline to imagestack - details depends on your OS

Upvotes: 1

Related Questions