On Fri, 11 Sep 2009 01:10:54 -0700 Glenn Linderman <[email protected]> wrote:
| On approximately 9/11/2009 12:27 AM, came the following characters from | the keyboard of Anthony Thyssen: | > On Fri, 11 Sep 2009 00:11:38 -0700 | > Glenn Linderman <[email protected]> wrote: | > | > Actually as it is outside the parentesis it is applied to BOTH | > setting the virtual canvas size only, while leaving the virtual offset | > as previously set by the other -page options. | > | > "All images in the current image sequence" would be the right phrase. | > Parenthesis creates a new seperate image sequence. | > | | Thanks for these clarifications. | | | > Actually to save reading the image twice you can do this... | > | > convert.exe in.jpg -repage 1159x1515+0+0 \ | > \( +clone -repage +409+765 \) \ | > -repage 1159x1515 -background white -compose multiply -flatten \ | > -compress zip -density 150 out.tif | > | > As the image data in the clone of in.jpg is not modified, only its | > virtual canvas position, the pixel memory will be shared by both images! | > that is this would be a near instant copy with reduced memory usage! | > | | Would be nice, but in general, I don't have the same image twice on a | page. This was just a test case, to isolate the problem I was having. I | doubt I'll even check for such an optimization, it would be so rare. | | > | Well, I've been playing a bit with -size, since that seems to be the | > | option that I had in the original command that produces the erroneous | > | effect in current versions of ImageMagick, but didn't in earlier versions. | > | | > | It appears that with some of the techniques you have proposed, the -size | > | setting isn't needed. But it appears that if it is used, it has a | > | strange effect. | > | > HOLD!!!! yes I know what is could on. | > | | Yippee! An explanation of my problem! But it doesn't explain why it | didn't used to happen on older versions :( | More than likely the setting was not being preserved correctly during the parenthesis interaction. This was later fixed. Currently the only setting that has problems with parenthesis is -compose for very obscure through logical reasons. | > The -size setting is used for creation of NEW images. (such as xc: and | > gradient:) however it is also used as a 'size' hint to the JPEG library | > for use when reading in images. | > | > Typically it is used to avoid reading in too much data. That is a large | > digital photo when you plan to generate a small thumbnail. I did not know | > that it can also increase the size of an input JPEG image!!! | > | | Maybe double is the max increase. The other "steps" were all integral | reductions 1, ½, ⅓, ¼, 1/5, 1/6, etc. of the original size... so this | explanation is quite likely. | The size is only a 'hint' to the JPEG library. which will return a image that is slightly larger than the specified hint. Generally a power of two sized larger due to the way JPEG are actually stored within files. Its purpose is to hint at the final size of the image so as to prevent too much data from being read in. Typically a -resize or -thumbnail operator, (or a 'resize on read' filename input option), will be used immediately after the read to finish the task. | > I think that perhaps it is time that the JPEG image size hint | > be delegated to a specific JPEG codec -define setting. The use of -size | > with JPEG images seems to cause no end of problems! | > | | Well, it wouldn't be so bad if there were a way to turn it off. +size | ??? But I couldn't find a way to turn it off. If there was a way to turn | it off, then that could be done after canvas creation, before reading | .jpg, when needed in that order. | That is exactly the solution! Add a +size before reading JPEG and it will not be a problem. Of course you can read in the jpeg images first, then 'insert' the canvas afterward too. convert image.jpg image.jpg -size 1159x1515 xc: +insert \ .... See Image Sequence ordering operators http://www.imagemagick.org/Usage/basics/#image_seq Anthony Thyssen ( System Programmer ) <[email protected]> ----------------------------------------------------------------------------- There is no point in being grown up, if you can't be childish, sometimes. -- Doctor Who, "Robot" ----------------------------------------------------------------------------- Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/ _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
