Bug#561923: grub-pc: Automatically convert background images to suitable format

2011-01-27 Thread Alexander Kurtz
Am Mittwoch, den 26.01.2011, 14:36 + schrieb Colin Watson:
 My main concern is that in future I want GRUB_GFXMODE to be dynamic,
 detected from VBE at boot time (it's already this way in Ubuntu).  This
 means that userspace wouldn't know what size to convert to.

That's a valid argument against doing automatic conversions. I've got
two more:

 a) Adding ImageMagick as an extra dependency would pull in over 100 
additional packages with a total size of over 50 MB. I don't think
this is desirable, especially as the benefit wouldn't be that large.

 b) Adding support for using ImageMagick to 05_debian_theme only if
available would make the code much more complicated and add a 
number of special cases. Consider the following example:

The background image is directly readable by GRUB: Normally no 
caching would be necessary, but if you have ImageMagick installed 
the picture would be automatically converted and stored 
under /boot/grub/. This may be useful in some cases, however
if GRUB could have read the picture without any extra conversion
this is just a waste of (possible precious) disk space. Consequently
we would have to add logic to determine whether converting the 
background image is useful. I really don't think that's the task of
a bootloader.

 Can't we do whatever conversion is needed at boot time instead?  GRUB
 has some fairly sophisticated image processing facilities nowadays.

After doing some testing, I think that there are actually no conversions
necessary. I've tested all the pictures from these paths

/usr/share/backgrounds/cosmos/
/usr/share/images/desktop-base/
/usr/share/pixmaps/backgrounds/gnome/nature/

plus some private pictures from my digital camera. Apart from #611123[1]
everything worked just fine - regardless of resolution or file format of
the pictures.

IMHO this bug can be closed beginning with version 1.98-1 (this version
added support for bitmap scaling). Any objections?

Best regards

Alexander Kurtz

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611123


signature.asc
Description: This is a digitally signed message part


Bug#561923: grub-pc: Automatically convert background images to suitable format

2011-01-26 Thread Colin Watson
On Tue, Jan 25, 2011 at 01:38:02PM +0100, Alexander Kurtz wrote:
 Am Montag, den 21.12.2009, 10:00 + schrieb Paul Saunders:
  I am attaching a patch that uses convert (from ImageMagick) to allow the
  use of arbitrary images as the grub background. In particular it resizes
  the image to the desired GRUB_GFXMODE and sets the pixel depth to 8-bit.
  Although this would necessitate an extra dependency, it seems to me it
  would also fix bugs #560978, #495282 and  #539963
 
 I really like the idea and would like to include something like this in
 the new version of /etc/grub.d/05_debian_theme. This would make the
 background handling even more flexible and could simplify the code. 
 
 Colin, what do you think of this? If you don't want to add the
 dependency, we could still add the code and make it fail gracefully if
 ImageMagick isn't installed.

My main concern is that in future I want GRUB_GFXMODE to be dynamic,
detected from VBE at boot time (it's already this way in Ubuntu).  This
means that userspace wouldn't know what size to convert to.

Can't we do whatever conversion is needed at boot time instead?  GRUB
has some fairly sophisticated image processing facilities nowadays.

-- 
Colin Watson   [cjwat...@debian.org]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#561923: grub-pc: Automatically convert background images to suitable format

2011-01-25 Thread Alexander Kurtz
Am Montag, den 21.12.2009, 10:00 + schrieb Paul Saunders:
 I am attaching a patch that uses convert (from ImageMagick) to allow the
 use of arbitrary images as the grub background. In particular it resizes
 the image to the desired GRUB_GFXMODE and sets the pixel depth to 8-bit.
 Although this would necessitate an extra dependency, it seems to me it
 would also fix bugs #560978, #495282 and  #539963

I really like the idea and would like to include something like this in
the new version of /etc/grub.d/05_debian_theme. This would make the
background handling even more flexible and could simplify the code. 

Colin, what do you think of this? If you don't want to add the
dependency, we could still add the code and make it fail gracefully if
ImageMagick isn't installed.

Best regards

Alexander Kurtz


signature.asc
Description: This is a digitally signed message part


Bug#561923: grub-pc: Automatically convert background images to suitable format

2009-12-21 Thread Paul Saunders
Package: grub-pc
Version: 1.98~20091210-1
Severity: wishlist
Tags: patch

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hello,

I am attaching a patch that uses convert (from ImageMagick) to allow the
use of arbitrary images as the grub background. In particular it resizes
the image to the desired GRUB_GFXMODE and sets the pixel depth to 8-bit.
Although this would necessitate an extra dependency, it seems to me it
would also fix bugs #560978, #495282 and  #539963


- -- Package-specific info:

*** BEGIN /proc/mounts
/dev/disk/by-uuid/80623242-f5fa-41e6-a7ea-53c18a3b2d6a / reiserfs rw,relatime 0 0
/dev/mapper/mainVG-var /var xfs rw,noatime,attr2,logbufs=8,noquota 0 0
/dev/mapper/mainVG-usr /usr xfs rw,relatime,attr2,noquota 0 0
/dev/mapper/mainVG-usr--local /usr/local xfs rw,noatime,logbufs=8,noquota 0 0
/dev/mapper/mainVG-squid /var/spool/squid reiserfs rw,noatime,notail 0 0
/dev/mapper/mainVG-home /home xfs rw,relatime,attr2,noquota 0 0
/dev/mapper/mainVG-Torrents /usr/local/share/torrents xfs rw,relatime,noquota 0 0
/dev/mapper/mainVG-var /tmp/projects xfs rw,noatime,attr2,logbufs=8,noquota 0 0
*** END /proc/mounts

*** BEGIN /boot/grub/device.map
(hd0)   /dev/sda
(hd1)   /dev/sdb
*** END /boot/grub/device.map

*** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default=0
insmod lvm
insmod xfs
set root=(mainVG-usr)
search --no-floppy --fs-uuid --set a407b7d3-d5c4-4699-9c78-42d20855013d
if loadfont /share/grub/unicode.pf2 ; then
  set gfxmode=1680x1050
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
  fi
fi
set locale_dir=/boot/grub/locale
set lang=en
insmod gettext 
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod reiserfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set 80623242-f5fa-41e6-a7ea-53c18a3b2d6a
insmod jpeg
if background_image /boot/grub/splashimage.jpeg ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/05_debian_theme.new ###
insmod reiserfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set 80623242-f5fa-41e6-a7ea-53c18a3b2d6a
insmod jpeg
if background_image /boot/grub/splashimage.jpeg ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme.new ###

### BEGIN /etc/grub.d/10_linux ###
menuentry Debian GNU/Linux, with Linux 2.6.32 {
insmod reiserfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set 80623242-f5fa-41e6-a7ea-53c18a3b2d6a
linux   /boot/vmlinuz-2.6.32 
root=UUID=80623242-f5fa-41e6-a7ea-53c18a3b2d6a ro panic=30 agp=off 
iommu=noaperture,noagp i8042.noaux nmi_watchdog=0 
initrd  /boot/initrd.img-2.6.32
}
menuentry Debian GNU/Linux, with Linux 2.6.32 (recovery mode) {
insmod reiserfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set 80623242-f5fa-41e6-a7ea-53c18a3b2d6a
linux   /boot/vmlinuz-2.6.32 
root=UUID=80623242-f5fa-41e6-a7ea-53c18a3b2d6a ro single panic=30 agp=off 
iommu=noaperture,noagp i8042.noaux nmi_watchdog=0
initrd  /boot/initrd.img-2.6.32
}
menuentry Debian GNU/Linux, with Linux 2.6.32 (w/ Bootchart) {
insmod reiserfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set 80623242-f5fa-41e6-a7ea-53c18a3b2d6a
linux   /boot/vmlinuz-2.6.32 
root=UUID=80623242-f5fa-41e6-a7ea-53c18a3b2d6a ro panic=30 agp=off 
iommu=noaperture,noagp i8042.noaux nmi_watchdog=0  init=/sbin/bootchartd
initrd  /boot/initrd.img-2.6.32
}
menuentry Debian GNU/Linux, with Linux 2.6.32.old {
insmod reiserfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set 80623242-f5fa-41e6-a7ea-53c18a3b2d6a
linux   /boot/vmlinuz-2.6.32.old 
root=UUID=80623242-f5fa-41e6-a7ea-53c18a3b2d6a ro panic=30 agp=off 
iommu=noaperture,noagp i8042.noaux nmi_watchdog=0 
initrd  /boot/initrd.img-2.6.32
}
menuentry Debian GNU/Linux, with Linux 2.6.32.old (recovery mode) {
insmod reiserfs
set root=(hd0,2)
search --no-floppy --fs-uuid --set 80623242-f5fa-41e6-a7ea-53c18a3b2d6a
linux   /boot/vmlinuz-2.6.32.old 
root=UUID=80623242-f5fa-41e6-a7ea-53c18a3b2d6a ro single panic=30 agp=off 
iommu=noaperture,noagp i8042.noaux nmi_watchdog=0
initrd  /boot/initrd.img-2.6.32
}
menuentry Debian GNU/Linux, with Linux 2.6.32.old (w/ Bootchart) {
insmod reiserfs