Hi All,
This is a really weird thing I am getting.
I have an HD frame of 1920x1080 and want to process it twice... once giving me the top 540pixels and the command '-crop 1920x540+0+0' works perfectly for this, but the minute I try to crop the top half out leaving me with the lower portion of the image using '-crop 1920x540+0+540' I simply get black frames returned.
My process doesn't end there though, I perform a -resize and then another -crop after the initial crop (above) and then place the result in the center of a larger frame using '-background black -gravity Center -extent 2048x1080'
Could the '-gravity Center' that comes 4 commands after the 540pixel crop be affecting its usage?!
Thanks,
Chris
Crop HD Frames in Half
- bydersjoint
- Posts: 6
- Joined: 2010-11-16T23:27:28-07:00
- Authentication code: 8675308
- GreenKoopa
- Posts: 457
- Joined: 2010-11-04T17:24:08-07:00
- Authentication code: 8675308
Re: Crop HD Frames in Half
I don't immediately see anything helpful. No, a setting after should not affect a command from before. Settings before, even ones intended for another operation (even when in parentheses) will. Is the black frame the correct size? It would be helpful if you could provide the shortest example that has the unexpected behavior.
Re: Crop HD Frames in Half
Why not check the resulting images after each process to find where the problem occures ?My process doesn't end there though, I perform a -resize and then another -crop after the initial crop (above) and then place the result in the center of a larger frame using '-background black -gravity Center -extent 2048x1080'
Your full code would be useful to see.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Crop HD Frames in Half
your input image may already have a virtual canvas with an offset.
try
convert image +repage -crop ... +repage result
see http://www.imagemagick.org/Usage/crop/#crop_repage
try
convert image +repage -crop ... +repage result
see http://www.imagemagick.org/Usage/crop/#crop_repage