Support and General Use > Theming and Appearance Customization
(a better) Widescreen Theme, not possible?
(1/1)
audio-i:
I just uploaded a theme I've been playing with for a while and that I've found quite fun (Widescreen for iPod video). I performs nice right now, it takes album art images to 240x240, and then "trims" them to 240x192 using a "widescreen" vieport to achieve the desired effect; but when I made it, I had something a bit different in mind.
I thought using the "old" AA aligning flags (l,c,r & t,c,b http://www.rockbox.org/wiki/AlbumArt#The_Cl_tag) the image could be centered vertically in relation to the viewport (center of AA image and of the viewport would be the same) so that it would end up "trimming" the image a bit at the top of the image, and a bit at the bottom, which would be great for this theme. That would mean aligning the AA image in relation to the viewport, just the way smaller AA images were aligned in relation to the defined full size, before AA resizing was introduced.
Instead, what it does now, is trimming (or not drawing) the bottom of the image. Below are some examples (left=current behaviour). Now I'm guessing those flags were intended just for image aligning before image resizing came to effect, and at the moment, they have no effect. Is that so? If so, could it be "not so difficultly" changed? I admit in technical terms I have no idea what I'm asking here. But I guess asking to "remove" the "square resizing forcing", which would allow to exchange a little widening distortion, for less trimming, and thus make the effect more extreme, would be muuuch more difficult ;)
(There are some cases were the "trimming" difference is much more significant)
[Saint]:
Currently (to my understanding) the TAGS for AA Alignment will only clip/crop an image to fit a viewport if it is not square.
%CL|width|height|cmaxwidth (same width as AA viewport)|cmaxheight|
Provided the AA image is not square prior to resizing it this *should* display the AA centered in the viewport cropped to suit, and if the viewport is the same width as the AA AFTER resizing, only the top and bottom of the image should be clipped.
Code seems to suggest it will work this way anyhow, I have not tested it.
Let me know if it works...
[St.]
EDIT:
I just re-read your post, and now I'm unsure as to whether or not the "clipping" is desired, or undesired.
I'm not sure that it is possible to use the current tags to display an image in "widescreen fashion" (without cropping the image), the only real way for you to do this would be to manually (using irfanview or similar) resize all your album art to suit your letterbox window and make sure the AA viewport is the same size in the WPS.
audio-i:
Before album art resizing, if you would place a 100x100 AA image in a 100x80 viewport, choosing the centering flags mentioned here http://www.rockbox.org/wiki/AlbumArt#The_Cl_tag, the image would have been centered and cropped (10 pixels at the top and 10 at the bottom of course) which "did the trick" just fine for this theme, since at the moment the image gets cropped 20 at the bottom.
--- Quote from: [St.] on December 28, 2009, 04:11:45 AM ---Currently (to my understanding) the TAGS for AA Alignment will only clip/crop an image to fit a viewport if it is not square.
--- End quote ---
I run a couple tests and it seems you're right. Perhaps the mentioned wiki page should specify this, I'll see if I can make it clearer.
[Saint]:
Does it not say that currently?
This is the info I have currently on the WPS tags (specifically %C & %Cl) but I don't remember what I pulled it from, or if I have edited this to reflect any changes that may have been made over time.
B.16 Album Art
Tag Description
%Cl|x|y|[[l|c|r]maxwidth]|[[t|c|b]maxheight]| Define the settings for albumart
x: x coordinate
y: y coordinate
maxwidth: Maximum height
maxheight: Maximum width
%C Display the album art as configured. This tag can also be used as a conditional.
The picture will be rescaled, preserving aspect ratio to fit the given maxwidth and maxheight. If the aspect ratio doesn't match the configured values, the picture will be placed according to the flags to the maxwidth and maxheight parameters:
maxwidth: l. Align left c. Align center (default) r. Align right
maxheight: t. Align left c. Align center (default) b. Align right
Examples:
1. Load albumart at position 20,40 and display it without resizing:
%Cl|20|40|||
2. Load albumart at position 0,20 and re-size it to be at most 100x100 pixels. If the image isn't square, align it to the bottom-right corner:
%CL|0|20|r100|b100|
The relevant section is in bold, italics, and underlined.
But I do have to admit that it doesn't specifically say it won't align in this fashion if the AA is NOT square, though, it doesn't say that it does either.
Does this help at all?
To clarify, to achieve the effect you want (at the moment at least) your only option is to manually re-size all your AA (I use IrfanView) to the same dimensions as the widescreen letterbox viewport defined by the WPS.
[St.]
Navigation
[0] Message Index
Go to full version