[TYPO3-dev] CropScale in imgResource
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Fri Jan 13 16:03:53 CET 2006
Stefan Geith schrieb:
> Martin Kutschker schrieb:
>
>> Stefan Geith schrieb:
>>
>>> Martin Kutschker schrieb:
>>>
>>>> Stefan Geith schrieb:
>>>>
>>>>> Wouldn't this be nice to have in the core ?
>>>>
>>>>
>>>> Yes, have missied it already on some occasions.
>>>>
>>>> But I want to have the alignment of cropped images configurable:
>>>>
>>>> cropVertAlign = top|center|bottom
>>>> cropHorAlign = left|center|right
>>>
>>>
>>> I would suggest
>>> cropV = -100...100
>>> cropH = -100...100
>>>
>>> Values are percentage:
>>> -100 = top/left
>>> 0 = centered
>>> 100 = bottom/right
>>
>>
>> Percentage of what? Of the target image size or the size of the
>> cropped image?
>
>
> Percentage of how mucht to move the scaled (but not cropped) image
> to the according borders.
>
> Example:
> Imagesize = 400x300px
> width/height = 200c x 100c
> Scaled Image is 200x150px
> - CropH now doesn't matter, because the width is already 200px
> - Set CropV to 0 to cut 25px at the top and 25px at the bottom
> - Set CropV to -50 to cut 12px at the top and 38px at the bottom
I see.
>> But I think that it doesn't make much sense. Simpler is a pixel offset
>> from the border. A positive offset is from top/left a negative from
>> bottom/right. 0 means center!
>
>
> No, a pixel offset doesnt work, because you don't know,
> wether width or height has to be cropped;
> And you do not know, how many pixels are available to crop ...
You're right.
File a bug with a reference to your extension after you have implemented
the alignement feature.
Masi
More information about the TYPO3-dev
mailing list