Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
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?
Hey that works. And I understand it too since I've been reading up on parentheses. Well, mostly. I understand the -clones make in-memory copies of specific files from the list (which in this case has only a single element, bitonal.tif). I'm not sure what the -delete does here. Why do we need to delete the first of the two clones (if that is what -delete 0 does). And what is +append working on exactly? I could see that maybe it appends the two clones together but you went ahead and deleted one of them first. Wait, I answered my own question. -delete 0 removes the first image of the entire sequence which is bitonal.tif (not the first clone). So it is in fact the two remaining clones which get appended.
Yes, that's it. We have bitonal.tiff, counted as image number 0. We clone image 0 (and the clone is number 1). We again clone number 0, so this becomes number 2. Our list has numbers 0, 1 and 2. We delete number 0, so the two cloned versions now become numbers 0 and 1. We append these together.