Thanks for your response, Anthony.

On approximately 9/10/2009 5:28 PM, came the following characters from
the keyboard of Anthony Thyssen:
> On Thu, 10 Sep 2009 01:27:35 -0700
> Glenn Linderman <[email protected]> wrote:
>
> | convert.exe -density 150 -size 1159x1515 xc:white -compose multiply ( 
> | in.jpg -repage 1159x1515+0+0 ) -compose multiply -flatten ( in.jpg 
> | -repage 1159x1515+409+765 ) -compose multiply -flatten -compress zip out.tif
> | 
> | You can obtain in.jpg from http://nevcal.com/temporary/in.jpg
> | 
> | I can't figure out why the above command seems to double the size of 
> | in.jpg when creating out.tif
> | 
> | The density of in.jpg is 150, the density of the first image in the 
> | stack is 150.
> | 
> | I expect two full non-overlapping copies of in.jpg, but instead get 
> | double size fractional ones.
> | 
> | This worked in earlier versions of ImageMagick, but I upgraded it hoping 
> | to fix a different bug... didn't, and this got introduced.
> | 
> | Versions 6.5.5-7 and 6.5.5-8 exhibit this symptom.  I don't think that 
> | 6.5.4 did, but I uninstalled it.
> | 
> | OK, I found an old 6.3.6 and it works the way I remembered.  Probably 
> | other versions between also did, but I didn't save them, it seems.
> | 
> | So probably a code change, rather than a problem with the file.
>
> What is doubling in size?
>
>  Is it the number of pixels in the image?
>   

The width and height of the copy of in.jpg merged onto my background
canvas is doubling in height and width, so that is quadrupling its
number of pixels.  And then it gets cropped, because 1500x1500 doesn't
fit in 1159x1515.

And then the same double happens for the second copy.


>  The file size saved to disk,
>  or the real world size of the image?
>   

The image size saved to disk is 1159x1515 as the canvas was created, and
each -repage specifies.

But in.jpg, being 750x750, should fit in those boundaries, if it were
not doubled in size.

Through experimentation, I have determined that the following command
does what I want... probably in a better way, but I don't know why the
command above doesn't do what I want (it used to, with older imagemagick).

convert.exe ( in.jpg -repage 1159x1515+0+0 ) ( in.jpg -repage
1159x1515+409+765 ) -compose multiply -flatten -density 150 -compress
zip out.tif

Then I also determined that the following command is sufficient to
introduce the problem.  But I don't understand why in.jpg is doubled in
size, rather than being scaled at some other factor, to better fit
1159x1515.  I actually don't think it should be scaled at all.

convert.exe -size 1159x1515 ( in.jpg -repage 1159x1515+0+0 ) ( in.jpg
-repage 1159x1515+409+765 ) -compose multiply -flatten -density 150
-compress zip out.tif


_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to