I'm using the following command on a 216 x 8880 image
magick convert frames.png -crop 216x120 tiles/tile%04d.png
Unfortunately it only outputs one image at 216x120.
Could someone tell me what I am doing wrong?
Split image into large tiles?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Split image into large tiles?
What version of IM, on what platfom?
If your platfom is Windows BAT, you need to double the %.
If your platfom is Windows BAT, you need to double the %.
snibgo's IM pages: im.snibgo.com
Re: Split image into large tiles?
version 7.0.8-68 x64. I'm literally running it at command prompt in Windows 10 but it only seems to produce 1 image and not do the entire image?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Split image into large tiles?
What is the name of the file it makes? What does identify say about it?
snibgo's IM pages: im.snibgo.com
Re: Split image into large tiles?
The file created is tile000.png it's doing the first 216x120 piece of the image. I get the impression it's just not continuing down the file.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Split image into large tiles?
Your command works fine for me, using v7.0.8-64 on Windows 8.1.
I suggest you use "magick", not "magick convert". The usual Windows directory separator is backslash \ not forward-slash /. However, these make no difference for me.
What does identify say about your input frames.png? Please post the text output of "magick identify frames.png".
Try wriing to "info:" as the output filename:
Does the text output show one image, or many images?
How about a new input:
I suggest you use "magick", not "magick convert". The usual Windows directory separator is backslash \ not forward-slash /. However, these make no difference for me.
What does identify say about your input frames.png? Please post the text output of "magick identify frames.png".
Try wriing to "info:" as the output filename:
Code: Select all
magick frames.png -crop 216x120 info:
How about a new input:
Code: Select all
magick -size 216x8880 xc: -crop 216x120 info:
snibgo's IM pages: im.snibgo.com
Re: Split image into large tiles?
info: frames.png PNG 216x8880 216x120+0+0 8-bit sRGB 3.5611MiB 0.000u 0:00.000
magick frames.png -crop 216x120 tile%03d.png :info
magick: unable to open image 'tile%03d.png': No such file or directory @ error/blob.c/OpenBlob/3497.
magick frames.png -crop 216x120 tile%03d.png :info
magick: unable to open image 'tile%03d.png': No such file or directory @ error/blob.c/OpenBlob/3497.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Split image into large tiles?
That command is garbage. Try the commands I showed you.mattyrb wrote:magick frames.png -crop 216x120 tile%03d.png :info
magick: unable to open image 'tile%03d.png': No such file or directory @ error/blob.c/OpenBlob/3497.
That's the problem. Your image is 216x8880 but on a virtual canvas of only 216x120 pixels. The cure is to "+repage" after reading the input:mattyrb wrote:info: frames.png PNG 216x8880 216x120+0+0 8-bit sRGB 3.5611MiB 0.000u 0:00.000
Code: Select all
magick frames.png +repage -crop 216x120 tiles\tile%04d.png
snibgo's IM pages: im.snibgo.com
Re: Split image into large tiles?
Works perfectly! Thank you so much for your help!snibgo wrote: ↑2019-10-14T06:51:12-07:00That command is garbage. Try the commands I showed you.mattyrb wrote:magick frames.png -crop 216x120 tile%03d.png :info
magick: unable to open image 'tile%03d.png': No such file or directory @ error/blob.c/OpenBlob/3497.
That's the problem. Your image is 216x8880 but on a virtual canvas of only 216x120 pixels. The cure is to "+repage" after reading the input:mattyrb wrote:info: frames.png PNG 216x8880 216x120+0+0 8-bit sRGB 3.5611MiB 0.000u 0:00.000Code: Select all
magick frames.png +repage -crop 216x120 tiles\tile%04d.png