Can this be combined into one command?
Posted: 2014-02-11T08:52:54-07:00
I'm taking portions of a single image, resizing them and combining them into a new composite image. Right now I'm creating temporary files and I think that's causing me some problems. I'm getting sporadic, unreproduceable errors like "convert.exe: LZWDecode: Strip 0 not terminated with EOI code", "convert.exe: Not enough data at scanline 2 (short 1209 bytes)". I suspect that the operations may not have a chance to write to disk before the next operation tries to read them. Especially since it doesn't happen to the same image twice and seems to be more of a problem when the load is heavier. I've added some pauses in the program which might solve the problem but I'd like to eliminate the temporary file step in any event. My question is is there a way to eliminate the temporary files and directly generate the composite image?
Code: Select all
convert bitonal.tif -depth 24 -crop 600x800+696+1031 -compress LZW center.tif
convert bitonal.tif -depth 24 -crop 300x1200+1692+1118 -gravity west -background blue -splice 3x0 -gravity east -background black -splice 40x0 -resize 20x800^ -compress LZW edge.tif
convert center.tif edge.tif -depth 24 +append composite.jpg