[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] background_image: image centering and scaling

From: Colin D Bennett
Subject: Re: [patch] background_image: image centering and scaling
Date: Sun, 31 Aug 2008 08:46:13 -0700

On Fri, 29 Aug 2008 22:11:02 -0700
Olaf Mandel <address@hidden> wrote:

> Vesa Jääskeläinen schrieb:
> -Snipp-
> > I will however look at if there are some ideas that you have
> > provided what is still missing from new graphical menu
> > implementation that should be there.
> -Snipp-
> Hello,
> thanks. I must admit to not looking at the source code for the
> project. Will scaling also be used for "simple" background_image
> commands? If yes and if the scaling does preserve the aspect ratio of
> the image, then the background picture is not necessarily in the
> upper left corner of the screen (an assumption in the code in grub2
> trunk).
> I hope some version of the gfxmenu project finds its way into the
> trunk of the grub2 repository soon.  :-)
> Best regards,
> Olaf

Hi Olaf,

Thanks for your work!  It would be great if you wanted to enhance my
code by adding a preserve-aspect-ratio mode; currently my
background_image command scales to fit the screen without regard for
the image's original aspect ratio.  Currently the '--mode' / '-m'
option to 'background_image' accepts the following values:

  Stretch the image to fit without regard for the original aspect ratio.

  Do not scale the image; origin anchored to upper-left corner.

I think if you added a "fit" option which would fit the image
preserving aspect, that would be nice.  Also, you could either
add a "center" option which would center the background image without
altering its size.  I think the "normal" option will not be very
desirable when scaling and centering are both available, since I can't
imagine why you'd want an image stuck in the corner instead of centered
or scaled in some way.

If you want to see the code for this, take a look at the message I sent
to the grub-devel list today entitled "[PATCH] GSoC #09 Bitmap scaling".
This patch may require some of the prior patches as well, however
(possibly #06 and/or #07).


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]