Bilder mit SchattenSie möchten Bilder eines TYPO3-Text-mit-Bild oder eines TYPO3-Bildelements mit Schatten ausgeben? Binden Sie folgenden Code in Ihr TypoScript ein:
# Bild mit Schatten
tt_content.image.20.1.file >
tt_content.image.20.1.file = GIFBUILDER
tt_content.image.20.1.file {
60 = LOAD_REGISTER
60 {
abc = 4
}
XY = [10.w]+20,[10.h]+20
# The background color of the image/content
backColor = #ffffff
# Create a "dummy" image from the real image which is 20 pixel
# smaller than the set width.
10 = IMAGE
10 {
file.import.current = 1
file.width.stdWrap = 1
file.width.stdWrap.field = imagewidth
file.width.stdWrap.wrap = |-20
file.width.prioriCalc = intval
offset = 10,10
}
# Draw a black/gray box over the dummy image
20 = BOX
20.dimensions = 10,10,[10.w],[10.h]
# You have to set lib.shadowIntensity in your constants.
20.color = {$lib.shadowIntensity}
# Blur the black box
30 = EFFECT
30.value = blur=99 |
# Blur again if required (wider blurred edge/shadow)
# 31 < .30
# Put the image on top again at a slightly more left top position.
50 < .10
50.offset = 5,5
}
Nachteil dieser Lösung ist, dassdies bei mehreren Bildern auf der selben Webseite dazu führt, dass diese nicht ausgegeben werden. QuelleHaben wir Ihnen weitergeholfen?
|