How to convert JPEG file to .xpm.gz format

Asked by Arindam

Hi,
Now I am getting greedy :-). I asked Question #53194 and got the solution for it(about how to change the background of GRUB menu). I was able to put one of the files I downloaded ( .xpm.gz format) as the background of my GRUB menu. Now I want to put one of my personal photos (jpeg format) as the background. But I am not able to convert them to ".xpm.gz" format. Could any one please let me know how to do this?

Thanks in advance!!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
bhuvi (bhuvanesh) said :
#1

you could use gimp to convert it to xpm format.you could also use .xpm format it will work or you can compress the .xpm file to .gz format

Revision history for this message
Adam Buchbinder (adam-buchbinder) said :
#2

You'll need to change the image resolution to 640x480, as well as changing the color count to 14; grub wants to use images of that size. Either crop/resize it in Gimp, or do the following from a command prompt:

$ convert -resize 640x480 -colors 14 INPUT.jpg mysplash.xpm && gzip mysplash.xpm

More information here: http://jbakshi.50webs.com/Linux_tutorial/GRUB/GNU%20GRUB%20simplified.html (skip down to "splashimage"). You can then install mysplash.xpm.gz, but you should note that 14 colors will make any photo look pretty poor, even if you reduce it to grayscale first.

If you would like any clarification, please feel free to ask.

Revision history for this message
Arindam (arindam-biswas) said :
#3

Adam,
Your solution has worked perfectly fine. I was able to use the command as mentioned by you. After the xxpm.gz file was created I opened it and saw the picture. I noticed it lost some of the sharpness, but was still good enough. Then I placed the same in /boot/grub. But after restart I found the photo has actually lost much more sharpness (almost not recognizable :-( ). Hence I had to revert back to one of the photos I found by default. Any thing else?

Thanks again!!

Revision history for this message
bhuvi (bhuvanesh) said :
#4

a software package named startup-manager in repositories will be helpful for you.

Can you help with this problem?

Provide an answer of your own, or ask Arindam for more information if necessary.

To post a message you must log in.