Bug#495754: grub-pc: Support for screen resolutions other than 640x480 is not simple enough

Olaf Mandel olaf at mandel.name
Sun Aug 24 08:24:37 UTC 2008


Felix Zielcke schrieb:
-Snipp-
>> I do not know how GRUB2 is _supposed_ to behave if the picture
>> dimensions are smaller (different) from the resolution of the gfxmode.
>> But at least on my machine it shows a far too small picture in the upper
>> left corner.
> 
> Me neither I just stick with the default 640*480 and the default Debian
> picure.
> 

I feel that it might be better if grub actually scales its background
picture to fit the screen size. The attached patch adds this
functionality. It adds three preprocessor switches:

* BITMAP_CENTERED selects if the (unscaled) picture should be arranged
in the upper / left corner of the screen or if it should be centered.
* BITMAP_SCALED selects if the picture should be scaled to better fit
the screen size or not. The scaling goes in both directions (smaller or
larger, as needed).
* BITMAP_KEEPASPECTRATIO selects if the bitmap aspect ratio should be
preserved during scaling. If yes, then the resulting image will be
smaller than the screen, resulting in two black stripes where the bitmap
does not fill the screen.

At the moment, the "scaling algorithm" is _very_ minimal. I did not use
bi-linear or even linear interpolation. The nearest matching pixel to
the left / top of the current position simply gets copied.

Additionally, a small copy&paste bug is fixed: gfxterm internally stored
the wrong height of the bitmap.

> Your whole idea doestn't sound that bad.
> Maybe your report should just be merged with the desktop-grub symlink
> one to have the whole discussion only at one place.

I think most of my previous patch becomes deprecated by this one. Only
the variable to set the screen resolution (as already in bug #493106
before merging) is still needed.

> However I'm still a bit new to this whole grub business, so I think it's
> just better if I leave the whole topic more to Robert.
> He has more experience then me, so he probable sees more the problems
> which could arise.
> 
I included him in the CC.

Best regards,
Olaf Mandel
-- 
Olaf Mandel   <olaf at mandel.name>   <http://www.olaf.mandel.name/>
PGP key:      1024D/33398848 2002-09-19
Fingerprint:  0E33 BEA6 1A71 9C5E 62BD  FC0E 99A7 D2C6 3339 8848
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scaling.diff
Type: text/x-patch
Size: 9823 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20080824/bd59dd6a/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20080824/bd59dd6a/attachment-0001.pgp 


More information about the Pkg-grub-devel mailing list