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?".
So I am using IM4JAVA to create a commandline call and it outputs the following, now problem is even though I tell imagemagick to force the size (-resize WxH!) it still does not do exactly what it is told, highly confusing.
I have moved each sub operation onto a new line for readability.
yes, I want use the first "original" image and create multiple sizes different sizes from it, unless im wrong (which wouldnt surprise me) I believe this is the way to do it as
+clone, should clone the image from the stack (the original image) then -write will put my new image on the stack, then +delete will that new image from the stack, so the next sub command can +clone the original image again.
You could be correct I have not tried it. This may be a neater way
This method again saves the tempory image into the memory; you can call the image whatever you like - in this case its called image. Once the image is saved into the memory you can call it as many times as you like.
the major problem I have is the results are completely unexpected and differ, mainly because the order of the commands is different per invocation also.
I'll see if i can do it the way you proposed with im4java
qwertywin wrote:yes, I want use the first "original" image and create multiple sizes different sizes from it, unless im wrong (which wouldnt surprise me) I believe this is the way to do it as
+clone, should clone the image from the stack (the original image) then -write will put my new image on the stack, then +delete will that new image from the stack, so the next sub command can +clone the original image again.
You command is cloning the previous image and not the original. To clone the original in each step use -clone 0 not +clone.
That is because you always need an output and you do not have any besides the ones after -write, thus there is no output. So you need to add a null output. Note if you break lines (lf or cr), i.e, it is not all one long command on the same line, you must put a new line character at the end before the break (no spaces after it)
linux: convert: unable to open image `/images/3/0/44/966/472/msyri_phototour22_Q.jpg': @ error/blob.c/OpenBlob/2588.
windows: convert.exe: unable to open image `C:\images\3\0\44\966\472\msyri_phototour22_Q.jpg': No such file or directory @ error/blob.c/OpenBlob/2614.
all the other images are generated as expected.
Last edited by qwertywin on 2012-06-29T15:54:52-07:00, edited 1 time in total.
I still don't see the null: in your code! Your last parenthesis has no -write. If you want the last line to generate the last image, you need to use the -clone 0 method and leave off the last parenthesis and then no null: is required, if there is no -write in the last line. However, the proper method is to keep the parens, the last write and end with a null: with either mpr or clones.
-compress lossless is probably useless as your giving it a quality value of less than 100 and even with 100, jpg will be lossy.
If you corrected code above is what you used, you still left off the -write in the last line which is probably why you are getting multiple images.
I need to see your command, but please put each paren on a separate line with ^ at the end (in windows) so that it is more readable. In unix each paren needs \ as an escape as \( ... \) and the end of line character is \
Alternately, try the simpler commands (with mpr or clone) as recommended above to test the concept with any reasonable image. See if that works fine.
qwertywin wrote:yes, I want use the first "original" image and create multiple sizes different sizes from it, unless im wrong (which wouldnt surprise me) I believe this is the way to do it as
+clone, should clone the image from the stack (the original image) then -write will put my new image on the stack, then +delete will that new image from the stack, so the next sub command can +clone the original image again.
But the original image is the 'first' image in the list... NOT the last image whcih was the image from the previous parenthesis.