Page 1 of 1

crop image which is outside

Posted: 2018-08-23T12:56:29-07:00
by ifkey
Help me how to crop an image that goes beyond the frame.

Image

if I change the size then nothing comes out
source file https://drive.google.com/file/d/1bsjy3N ... 7H0da/view

Code: Select all

convert *.tif -resize 1000x1000 test.tif
Image

Re: crop image which is outside

Posted: 2018-08-23T13:14:49-07:00
by snibgo
Your posted image, sc1.png, seems to be a screen shot of some software that is displaying some image, possibly 1.tiff. If so, please post the actual image, not a screenshot of it.
ifkey wrote:...an image that goes beyond the frame.
I don't know what that means. A raster image cannot have any pixels outside its own boundary.

Re: crop image which is outside

Posted: 2018-08-23T14:16:11-07:00
by ifkey

Re: crop image which is outside

Posted: 2018-08-23T14:57:40-07:00
by snibgo
That tif file contains two images. So when you process them with IM, you will often get two outputs. Use [0] or [1] if you want to process just one image.

The first is fully opaque, but the second has transparency.

So, what do you want to do with those images? Or with just one?

Also, what version of IM do you use, on what platform?

Re: crop image which is outside

Posted: 2018-08-23T16:56:30-07:00
by ifkey
ImageMagick-7.0.8-10-Q16-x64-dll

how did you determine that there are 2 pictures?

I have 1 layer in this file.
I want to batch file preparation for printing, and I want to configure so that if such files come across that they could also be processed in batches.
In Photoshop, you can delete the superfluous image, can you do it in the IM?
Image

Re: crop image which is outside

Posted: 2018-08-23T19:04:05-07:00
by fmw42
Your tif file has a virtual canvas that provide the outside area. You can remove that by

Code: Select all

convert 179.tif +repage -resize 1000x1000 test.tif

Re: crop image which is outside

Posted: 2018-08-24T00:15:57-07:00
by ifkey
Does not help, the same result

Re: crop image which is outside

Posted: 2018-08-24T09:15:00-07:00
by fmw42
I am sorry, but I do not understand the issue. There is no outside of the main image if +repage is used. Please clarify. How do you see any outside region? What was your ImageMagick command and post your resulting image.

Re: crop image which is outside

Posted: 2018-08-24T18:58:40-07:00
by fmw42
You have a tif with 2 pages. Try this

Code: Select all

convert -quiet 179.tif[0] +repage 179_0.tif
convert -quiet 179.tif[1] +repage 179_1.tif
Are either of these what you want? My guess is that you want 179_0.tif