> I don't want to be difficult, but this patch does not give correct
> behavior. In particular, this is not true:
>> Assume you have a 2cm x 4cm image and want to have it in double size.
>> So you would write in the dialog the values 4cm x 8cm but as the
>> smaller value is taken as border you get as result again 2cm x4cm image.

Yes, you are right, I was talking nonsense here because I mixed up my image 
settings. Sorry.

> The attached LaTeX file and graphic demonstrate how this works. The
> graphic itself is (about) 2cm wide by 1cm high. For the first image, we
> have the options [width=4cm, height=1.5cm, keepaspectratio], and we get
> a graphic that is 3cm wide and 1.5 cm high. That's as big as it can get
> without exceeding either value.

This can also be achieved by just setting 1.5 x 1.5cm.

> For the second image, we have the
> options [width=2cm, height=1.5cm, keepaspectratio]. If it were only the
> smaller figure that mattered, as Uwe's patch assumes, then the size of
> the graphic would not change. But it does. You get a graphic that is 2cm
> wide and 1 cm high.

No, I get an image with 2 x 1cm, that is the original size, so nothing has changed. That's the reason for my implementation. setting 2 x 1.5cm is the same as setting 2 x 2cm. But I see that my description in the manual isn't clear enough.

> So the problem with Uwe's patch is that it makes it impossible to have
> either of these sets of options. It forces you to have width=height if
> you have keepaspectratio.

As seen above this is not a loss of function.

> So it seems to me that only a more extensive re-working of the dialog,
> along the lines proposed in ...

Personally I don't like that there is an "auto" in the value fields.
In my opinion the best solution would be to calculate the aspectration from the image bounding box and calculating the width and height accordingly. We already have the infrastructure for this. I'll try to implement this until tomorrow.

regards Uwe

Reply via email to