[TYPO3] resizing images using the SCALE object
Dylan Barwick
info at tiptoptoons.com
Wed May 17 16:10:53 CEST 2006
Hi all,
I've got a very simple but annoyingly elusive problem, I'm sure someone
can point out what I'm doing wrong. I want to get top quality jpegs (ie
no artifacts) as a horizontal menu. I've rendered the images at twice
the size and I've got the links working but unfortunately I can't get
the SCALE object to work as I would like it to.
Instead of scaling the images to half their size it seems to pick the
colour of the first pixel of an image and produce a flat coloured
graphic. It's the right size but instead of the designer's graduated
tint background with lettering across the top I get a blank, coloured
rectangle.
The relevant TS code looks like this:
################################
#TOP LEVEL NAVIGATION
################################
# NAV101 cObject
temp.NAV101 = HMENU
temp.NAV101.entryLevel = {$nav1EntryLevel}
temp.NAV101.1 = GMENU
temp.NAV101.1.begin = 1
temp.NAV101.1.maxItems = 1
temp.NAV101.1.NO {
wrap = <td>|</td>
XY = [5.w], [5.h]
4 = IMAGE
4.file = {$navImagesPath}l_home.png
4.format = jpg
4.quality = 100
5 = SCALE
5.width = [4.w]/2
5.height = [4.h]/2
}
temp.NAV101.1.RO < temp.NAV101.1.NO
temp.NAV101.1.RO = 1
temp.NAV101.1.RO {
4.file = {$navImagesPath}l_home_f2.png
}
temp.NAV101.1.ACT < temp.NAV101.1.RO
temp.NAV101.1.ACT = 1
################################
I have also tried to use the SCALE "params" attribute but I can't find
any examples of its use anywhere.
Anyone have any ideas?
D
More information about the TYPO3-english
mailing list