Is there an official, up-to-date guideline or list of image type support for the background, icons, etc? Is there a single image rendering mechanism meaning all images support the same types, or does it differ by case?
Some of the details on the website are incorrect... The highlight background for example is listed as "must be bmp" but it works just fine as a png too. Refind also resizes all images from what I can tell, leading me to question all the "must be x-by-y resolution" notes.
I know png works for all of them. I believe bmp works for all of them as well, but let's not. I'm guessing jpg works for at least the background. Is lzw-compressed tif for example supported? I have a rather large background image I want to use, but saving it as png makes refind load incredibly slowly as it needs to parse a huge sub-optimal png, and saving it as jpg has the obvious drawback of jpg...
On a sidenote, I absolutely love refind. This is a great piece of software. Very flexible, error-proof, convenient, and capable of looking really sexy. Thanks for making it.
Last edit: Marnick L'Eau 2018-07-15
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I first forked rEFInd from rEFIt, the program supported Apple ICNS files for some purposes and BMP files for others. Because ICNS files are Apple-specific, I added PNG support and broadened the scope and flexibility of support for all file types so that it's possible to use any of the three file formats for most or all purposes. (There may be some no-go combinations, but I honestly don't recall the details if there are.) Some file formats have features that are practical necessities for some purposes; for instance, ICNS and PNG support transparency, which is a practical necessity for icons overlaid on anything but a solid-color background; but BMP does not support transparency. ICNS supports multiple image resolutions in a single file, which is theoretically useful for scaling; but to scale to arbitrary sizes, an actual scaling function is needed, which I added to version 0.7.8. IIRC, ICNS supports only square sizes (e.g., 128x128, but not 128x256). Thus, ICNS is now the least useful image format, and PNG is the most useful. I have not officially deprecated either ICNS or BMP, but I do recommend using PNG whenever that's practical.
At this time, no other file formats are supported. The trouble is that the EFI environment is extremely sparse. When writing for Linux, macOS, Windows, or most other OSes, there are numerous libraries for handling image file formats, and in many cases you can either assume that a necessary library is installed or use packaging tools to ensure that it is. For rEFInd (or any other EFI application), though, this isn't true; it's necessary to either write new code to handle the image format or find a library that can be compiled for EFI and linked to rEFInd. This creates both technical and licensing challenges -- if a library includes OS-specific assumptions or uses a license that's not compatible with rEFInd's GPLv3, it won't work. PNG support was made possible because of LodePNG, which is an extremely compact PNG library that compiles and links with rEFInd with few changes, and that uses a GPLv3-compatible BSD license. Out of curiosity, I just Googled for a compact JPEG library and discovered nanojpeg, which might fit the bill. I'll play with it a bit, but I make absolutely no promises to add it; there are too many ways in which it might prove to be incompatible with rEFInd.
As to the documentation, it sometimes falls behind program development. I've just reviewed both the configfile.html and refind.conf-sample files and updated them; see the git repository for the latest versions. If I've missed something, please be more specific in what you believe to be incorrect.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there an official, up-to-date guideline or list of image type support for the background, icons, etc? Is there a single image rendering mechanism meaning all images support the same types, or does it differ by case?
Some of the details on the website are incorrect... The highlight background for example is listed as "must be bmp" but it works just fine as a png too. Refind also resizes all images from what I can tell, leading me to question all the "must be x-by-y resolution" notes.
I know png works for all of them. I believe bmp works for all of them as well, but let's not. I'm guessing jpg works for at least the background. Is lzw-compressed tif for example supported? I have a rather large background image I want to use, but saving it as png makes refind load incredibly slowly as it needs to parse a huge sub-optimal png, and saving it as jpg has the obvious drawback of jpg...
On a sidenote, I absolutely love refind. This is a great piece of software. Very flexible, error-proof, convenient, and capable of looking really sexy. Thanks for making it.
Last edit: Marnick L'Eau 2018-07-15
Some testing meanwhile has shown that for the background only png seems supported. Jpg, bmp, and lzw-tif all fail...
Last edit: Marnick L'Eau 2018-07-15
When I first forked rEFInd from rEFIt, the program supported Apple ICNS files for some purposes and BMP files for others. Because ICNS files are Apple-specific, I added PNG support and broadened the scope and flexibility of support for all file types so that it's possible to use any of the three file formats for most or all purposes. (There may be some no-go combinations, but I honestly don't recall the details if there are.) Some file formats have features that are practical necessities for some purposes; for instance, ICNS and PNG support transparency, which is a practical necessity for icons overlaid on anything but a solid-color background; but BMP does not support transparency. ICNS supports multiple image resolutions in a single file, which is theoretically useful for scaling; but to scale to arbitrary sizes, an actual scaling function is needed, which I added to version 0.7.8. IIRC, ICNS supports only square sizes (e.g., 128x128, but not 128x256). Thus, ICNS is now the least useful image format, and PNG is the most useful. I have not officially deprecated either ICNS or BMP, but I do recommend using PNG whenever that's practical.
At this time, no other file formats are supported. The trouble is that the EFI environment is extremely sparse. When writing for Linux, macOS, Windows, or most other OSes, there are numerous libraries for handling image file formats, and in many cases you can either assume that a necessary library is installed or use packaging tools to ensure that it is. For rEFInd (or any other EFI application), though, this isn't true; it's necessary to either write new code to handle the image format or find a library that can be compiled for EFI and linked to rEFInd. This creates both technical and licensing challenges -- if a library includes OS-specific assumptions or uses a license that's not compatible with rEFInd's GPLv3, it won't work. PNG support was made possible because of LodePNG, which is an extremely compact PNG library that compiles and links with rEFInd with few changes, and that uses a GPLv3-compatible BSD license. Out of curiosity, I just Googled for a compact JPEG library and discovered nanojpeg, which might fit the bill. I'll play with it a bit, but I make absolutely no promises to add it; there are too many ways in which it might prove to be incompatible with rEFInd.
As to the documentation, it sometimes falls behind program development. I've just reviewed both the
configfile.html
andrefind.conf-sample
files and updated them; see the git repository for the latest versions. If I've missed something, please be more specific in what you believe to be incorrect.Could you please try this version:
http://www.rodsbooks.com/refind-bin-0.11.2.4.zip
This includes JPEG support.
Works beautifully from the first try, thanks!
A note will need to be added to the pages about nanojpeg's limitations (like no support for progressive jpeg) though.
I've already modified the documentation. If you think I've missed something, please be more specific.
I gave it a quick look, seems fine to me