# [scribus] Gravity of images in image frames

Gregory Pittman gregp_ky at yahoo.com
Wed Jan 25 03:54:16 UTC 2012

```On 01/24/2012 10:27 PM, Gregory Pittman wrote:
> On 01/24/2012 08:00 PM, Hadmut Danisch wrote:
>> Hi,
>>
>> when creating image frames, either in free scaling or scaling to frame
>> size, the image seems to be always anchored to the top left corner.
>>
>>
>> Is there a menu or setting to have an image anchored to the other
>> corners or to have it vertically or horizontally centered in its frame?
>>
> For one thing, you have to think through what you are asking. If we
> might think of images having some absolute dimensions of themselves, the
> DPI would be unsuitable for most purposes, so you must decide what DPI
> you wish to have for your image, then consider how to center.
>
> Let's imagine you wish to import an image to a frame of a certain size,
> at a certain scaling, then center it.
>
> Make your frame, import the image, then adjust scaling as desired (you
> will need to use Free Scaling of course), but leave the image with its
> X-Pos, Y-Pos (as shown in the Image tab of Properties) at 0, 0. Now open
> the Multiple Duplicate dialog, use the By Number of Copies tab, select 1
> copy, select Shift Created Items By, and leave the Horizontal and
> Vertical Shifts at 0 each, then click OK. Your copy will be right over
> Image -- this size of this frame will be the size of the image at the
> scaling you have chosen. Now push this down a level below the original.
>
> In X,Y,Z you can get the Width and Height of this adjusted frame. let's
> imagine these values are 897.76 and 602.64 pts. Let's imagine that the
> width and height of the original are 398.54 and 314.42. Now, select your
> original, small frame and go to Image tab of Properties, and in the
> X-Pos spinbox enter -843.21/2 + 398.54/2,

typo here, should be: -897.76/2 + 398.54/2

and in the Y-Pos -602.64/2 +
> 314.42/2. This will center the middle of the image horizontally and
> vertically with the original frame.
>
> This description may sound complicated but conceptually it's rather
> simple (I think) -- you are shifting the midpoint of the image to the
> upper left of the original frame, then adding half the width and height
> of the frame.
>
> Again, I would repeat that this kind of operation seems unlikely to be
> in much use once you consider the scaling variability.
>

And if you wanted to have the lower right corner of the image at the
lower right corner of the frame, in this example above, enter X-Pos =
-897.76+398.54 and for Y-Pos = -602.64+314.42.

Greg

```