Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Documentation/Gifbuilder/Examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,8 @@ on top of it.
Constants
~~~~~~~~~

.. code-block:: typoscript

lib.shadowIntensity = #999999
.. literalinclude:: _codesnippets/_variant2Constants.typoscript
:caption: EXT:my_sitepackage/Configuration/Sets/Main/constants.typoscript

.. _gifbuilder-examples-creating-shadows-images-variant-1-setup:

Expand Down
66 changes: 31 additions & 35 deletions Documentation/Gifbuilder/_codesnippets/_avif.typoscript
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
tt_content.image.20.1.file >
tt_content.image.20.1.file = GIFBUILDER
tt_content.image.20.1.file {
XY = [10.w]+20,[10.h]+20
# The background color of the image/content
backColor = #ffffff
lib.shadowImage = IMAGE
lib.shadowImage {
file = GIFBUILDER
file {
XY = [10.w]+20,[10.h]+20
format = jpg
quality = 88
# 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
width {
stdWrap = 1
stdWrap.field = imagewidth
stdWrap.wrap = |-20
prioriCalc = intval
}
# Create a "dummy" image from the real image
10 = IMAGE
10 {
file = fileadmin/image.jpg
file.width = 300
offset = 10,10
}
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.
color = {$lib.shadowIntensity}
}
# 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.
color = {$lib.shadowIntensity}
}

# Blur the black box
30 = EFFECT
30.value = blur=99 |
# Blur again if required (wider blurred edge/shadow)
# 31 < .30
# 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.
40 < .10
40.offset = 5,5
# Put the image on top again at a slightly more left top position.
40 < .10
40.offset = 5,5
}
}
60 changes: 27 additions & 33 deletions Documentation/Gifbuilder/_codesnippets/_avif2.typoscript
Original file line number Diff line number Diff line change
@@ -1,40 +1,34 @@
tt_content.image.20.1.file >
tt_content.image.20.1.file = GIFBUILDER
tt_content.image.20.1.file {
XY = [10.w],[10.h]
lib.shadowImage = IMAGE
lib.shadowImage {
file = GIFBUILDER
file {
XY = [10.w],[10.h]
format = jpg
quality = 88

10 = IMAGE
10 {
# Background image
file {
import.override = fileadmin/shadow.png
maxW.field = imagewidth
10 = IMAGE
10 {
# Background image, as wide as the result
file = fileadmin/shadow.png
file.width = 320
}
}

# Scale background image
15 = SCALE
15 {
width = [10.w]
# Background Image is 20 pixel higher than scaled down "real" image
# Thus it should have "normal" height.
height = [20.h]+20
}
# Scale background image
15 = SCALE
15 {
width = [10.w]
# Background image is 20 pixels higher than the real image
height = [20.h]+20
}

# Put real image on top of it
20 = IMAGE
20 {
file {
import.current = 1
width {
stdWrap = 1
stdWrap.field = imagewidth
# The real image is made 20 pixels more narrow than set in the Content element
stdWrap.wrap = |-20
prioriCalc = intval
}
# Put real image on top of it
20 = IMAGE
20 {
# The real image is 20 pixels narrower than the background image
file = fileadmin/image.jpg
file.width = 300
# Inserted at offset 10,10
offset = 10,10
}
# Inserted at offset 10,10
offset = 10,10
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib.shadowIntensity = #999999
Loading