Search found 10 matches

by the dsc
2017-12-11T07:58:55-07:00
Forum: Users
Topic: Crop image based on coordinates from a "-trim +repage" of a different image?
Replies: 16
Views: 13882

Re: Crop image based on coordinates from a "-trim +repage" of a different image?

The idea of cropping the mask itself based on the original image size did work, and was incomparably simpler than the "second version". I haven't yet made it clean the temporary files, and perhaps there are some declarations of variables that aren't even being used, leftovers from earlier ...
by the dsc
2017-12-10T21:20:57-07:00
Forum: Users
Topic: Crop image based on coordinates from a "-trim +repage" of a different image?
Replies: 16
Views: 13882

Re: Crop image based on coordinates from a "-trim +repage" of a different image?

https://thumb.ibb.co/fqTwvG/comparisons.jpg These results from the original script, with the modifcations suggested, and a few iterations. The intermediate files/steps are the same. Without the subprocess (or "physical" intermediate file), or the whole mask-cropping twice thing, all I cou...
by the dsc
2017-12-10T18:55:07-07:00
Forum: Users
Topic: Crop image based on coordinates from a "-trim +repage" of a different image?
Replies: 16
Views: 13882

Re: Crop image based on coordinates from a "-trim +repage" of a different image?

I've managed to tweak things a bit so that there's no need for the "extent" on the original image to crop it. Instead it uses the process twice, but cropping the mask itself before (unless the image itself happens to be square). I'll keep trying to strip down parts and get closer to your o...
by the dsc
2017-12-09T14:28:27-07:00
Forum: Users
Topic: Crop image based on coordinates from a "-trim +repage" of a different image?
Replies: 16
Views: 13882

Re: Crop image based on coordinates from a "-trim +repage" of a different image?

Trying cropv=`convert /dev/shm/masktmp-${original}.gif -format "%@" info:` convert "${original}" -gravity northwest -extent $expandvar -crop $cropv +repage "${original/.jpg/-cropped.jpg}" Still gives me misaligned cropping. The script first crops/"undoes" a mo...
by the dsc
2017-12-09T13:46:46-07:00
Forum: Users
Topic: Crop image based on coordinates from a "-trim +repage" of a different image?
Replies: 16
Views: 13882

Re: Crop image based on coordinates from a "-trim +repage" of a different image?

I just "learned" of it yesterday, I think the "extent" thing is expanding the canvas into a square, just like the squares of the montage reference. My reasoning is that the squiggle-mask is made over a thumbnail that is fit into a square, regardless of the aspect of the original ...
by the dsc
2017-12-09T12:36:02-07:00
Forum: Users
Topic: Crop image based on coordinates from a "-trim +repage" of a different image?
Replies: 16
Views: 13882

Re: Crop image based on coordinates from a "-trim +repage" of a different image?

For some reason, it does not have the same effect. It ends up mysteriously misaligning the crop mask and the image, and the cropped results are totally off. "${original/.jpg/-cropped.jpg}" is a bash string manipulation/editing, there's no directory called jpg. The string manipulation repla...
by the dsc
2017-12-09T11:36:32-07:00
Forum: Users
Topic: Crop image based on coordinates from a "-trim +repage" of a different image?
Replies: 16
Views: 13882

Re: Crop image based on coordinates from a "-trim +repage" of a different image?

Here's what I have at the moment, not fully automated yet: These are the original images to be cropped in batch, all jpegs, all in the same folder: https://image.ibb.co/dBtMAG/originals.jpg The next step is to create a montage (still done manually): montage -define jpeg:size=220x -geometry 220x220 *...
by the dsc
2017-12-09T08:18:52-07:00
Forum: Users
Topic: Crop image based on coordinates from a "-trim +repage" of a different image?
Replies: 16
Views: 13882

Re: Crop image based on coordinates from a "-trim +repage" of a different image?

The "different image" would be one with just the green markings. My example is just how it looks on GIMP while you have both images/layers visible at once. But at some point you export just the layer with the markings as a separate image, which would then be used to crop the other image. O...
by the dsc
2017-12-08T21:35:48-07:00
Forum: Users
Topic: Crop image based on coordinates from a "-trim +repage" of a different image?
Replies: 16
Views: 13882

Re: Crop image based on coordinates from a "-trim +repage" of a different image?

Wow! Many, many thanks, I've got it now! I just did a brief test and it worked just as I hoped. The marks don't need to be green, but apparently one can use just use whatever color seems more practical while in GIMP, and later the script converts it with threshold + flatten to achieve the pure black...
by the dsc
2017-12-08T19:53:22-07:00
Forum: Users
Topic: Crop image based on coordinates from a "-trim +repage" of a different image?
Replies: 16
Views: 13882

Crop image based on coordinates from a "-trim +repage" of a different image?

Is it possible to reproduce roughly this same process, on Imagemagick? http://i64.tinypic.com/2l95px.gif (My keyboard is missing the 5+1 key :P ) Assuming the layer with the green markings already exists as a file of the same dimensions. Roughly speaking, it would be the same of "applying"...