Recently I needed to edit some PNG files which were used in a grub2 theme (tutorial).
Many grub2 themes use a semi-transparent 'styled box' as a grey background on which the grub2 menu text entries are displayed.
The .png files seem to require 8-bit .png format (which is not the default in PhotoShop) and for transparency, you will need to adjust the Alpha-transparency value of the coloured object/pixel in each of the 9 files required by grub2 for a box...
The best online tool that I found which could adjust the Alpha values was at peko-step. This one was easy to use and had an advantage over some of the others in that it showed you the original Alpha value (A) of each object.
Instructions
1. First use MS Paint to set the colour(s) that you want and re-save it as a .png file. These are saved as fully opaque (solid) colours.
2. Load the file into peko-step and click on the area that you want to adjust - note that the RGB and A=Alpha values should update on the browser page - this can take several seconds so you must wait a short while for this to happen.
File - Open Image
3. Now you can adjust the Alpha value. There seemed to be a 3-20 second delay in my browser before the Alpha value (A=153) was updated on the screen.
A fully opaque colour will have an A value of 255, whereas a value of A=0 will be completely transparent.
In the screenshot above, 60% of 255 = Alpha value of 153. You may need to use the Apply button and/or click the graphics object to get the new Alpha value to take affect.
4. Use File - Save image to re-save the PNG file.
With the grub2 theme, I first adjusted and tested the menu_c.png file which is responsible for the large central portion of the grey box and once the colour and transparency looked OK, I then changed the other eight grub2 file to the use same RGB colour and Alpha settings.
Note: I also tried LunaPic and OnLinePngTools but one did not show the Alpha level used in the original image and the other didn't seem to work but you may have better luck!
If you are familiar with gimp, you can use that instead.
No comments:
Post a Comment