in Windows, convert a xx.jpg picture to a xx.bmp picture method:
Generate PPM images in Linux (PPM images should be files in other formats parsed into data sequences)
The method 1 conversion method is as follows:
BMP pictures Use bmptoppm. Jpg,png,gif have the corresponding TOPNM tools, but I have not tried.
$BMPTOPPM pic.bmp > temp1.ppm//Generate PPM
$ppmquant 224 temp1.ppm > temp2.ppm//Convert to 224 colors
$pnmnoraw temp2.ppm > logo.ppm//converted to ASCII format
LOGO.PPM is the desired image (if there is an error during the conversion, try converting the PNG picture format to ppm image format)
The method 2 conversion method is as follows:
A random editing picture software saves the current picture in PNG format, such as Linuxlogo.png. Then use the following command under Linux:
# PNGTOPNM Linuxlogo.png > LINUXLOGO.PNM
# pnmquant 224 LINUXLOGO.PNM > LINUXLOGO224.PNM
# PNMTOPLAINPNM LINUXLOGO224.PNM > linuxlogo224.ppm
Then replace the/usr/src/linux-2.6.8.1/drivers/video/logo/logo_linux_ with the generated linuxlogo224.ppm CLUT224.PPM (preferably a backup), and then delete the same directory of logo_linux_clut224.c files, recompile the kernel, you can start after the screen in the upper left to see their own logo.
(using GIMP Software under Windows, enter GIMP in the Baidu search bar to download to the software)
The method 3 conversion method is as follows:(this method is strongly recommended for Lin)
Software gimp download Address: https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=0&rsv_idx=1&tn=baidu&wd=gimp%20 &rsv_pq=9ee1f00f00028e99&rsv_t=af6azCYDbvbhBkRfO3DMR%2BbTf4uLVxd%2FpIIEHDcID1PyoV%2BhQWiyXqt6OVA& rqlang=cn&rsv_enter=0&rsv_sug3=2&rsv_sug1=3&rsv_sug7=100&inputt=11412&rsv_sug4=11412
1, install the Windows version of the GIMP software after successful, open the software
open a picture that will be converted in any format
selection: Image---> Mode---> Index color conversion---> Maximum color set to (224)---> Conversion
You can also use the image---> Zoom image---> Set the desired image size (such as 320*240)
finally: File---> Save as---> select ppm format---> Save format is ASCII, you can generate xxx.ppm files
2. Copy the converted picture to drivers\video\logo\ replacement logo_linux_clut224.ppm
Delete logo_linux_clut224.c and logo_linux_clut224.o
re -make Zimage
"Put the resulting PPM files in the specified directory"
One, the easiest way: replace your picture with a small penguin image to mutate again.
Copy the produced ppm file (the blog has a production method) to the kernel source Driver/video/logo, the old logo_linux_clut224.ppm deleted or renamed, Rename the newly made PPM picture to logo_linux_clut224.ppm and put it in the Driver/video/logo to delete the logo_linux_ generated by the logo_linux_clut224.ppm file clut224.c and logo_linux_clut224.o files. Then make Clean;make uimage
"Issues encountered during debugging"
1. If the converted PPM format is not correct, the kernel will be compiled directly error;
2. Conversion of the PPM format (compiled kernel through no error), the start of the kernel has been an error (that is, did not enter to the Display Boot logo interface), the production of the PPM image size >LCD screen, need to adjust the size of the production of PPM files First adjust to 80*80, the machine start to show the logo, slowly to raise large ppm picture size
3. If your machine is 4 cores (4 logo lines open), currently want to display only one can and full screen, then you can set the logo centered,
Logo Center:
1, set the logo picture in the screen position
VI DRIVERS/VIDEO/FBMEM.C
Find the "fb_show_logo_line" function and put
IMAGE.DX = 0;
Image.dy = y;
To
IMAGE.DX = (INFO->VAR.XRES/2)-(610/2);
Image.dy = (INFO->VAR.YRES/2)-(206/2);
Note:
Info->var.xres and Info->var.yres are resolution sizes
610 and 206 are the size of the logo picture
or modify the following
#ifdef config_logo_lowerpower_warning
if (1 = get_battery_status ()) {
IMAGE.DX = (INFO->VAR.XRES/2)-(logo->width)/2;
Image.dy = (INFO->VAR.YRES/2)-(logo->height)/2;
}else{
IMAGE.DX = 0;
Image.dy = y;
}
#else
IMAGE.DX = 0;
Image.dy = y;
IMAGE.DX = (INFO->VAR.XRES/2)-(logo->width)/2;
Image.dy = (INFO->VAR.YRES/2)-(logo->height)/2;
#endif
Then just show a picture, if the picture is not full screen, and the picture and the LCD screen in the direction of 90 degrees, you can make the following adjustments:
I: First in the production of PPM pictures to adjust the direction and LCD screen consistent direction;
II: How to create ppm images through the image-> zoom function, the PPM image and LCD screen size can be consistent size
--------------------------Split Line---------------------------------
all of the above methods are summarized as follows:
Use commands in Linux to convert pixels in 800*480 format to xx.bmp or xx.png pictures into xx.ppm format; (generally use cow software to crop a xx.jpg picture into pixels for 800* 480 format for xx.bmp or xx.png pictures)
or download the GIMP software in the PC's XP operating system, and turn the xx.jpg picture into a xx.ppm format picture (this method is cumbersome and less recommended, unless the PPM files generated by the command on Linux are not available)
Finally modify the xx.ppm format of the picture name for logo_linux_clut224.ppm
Then replace the old/usr/src/linux-2.6.8.1/drivers/video/logo/logo_linux_clut224.ppm with the file (preferably backup first)
Then delete the logo_linux_clut224.c files and logo_linux_clut224.o files in the same directory
Finally make clean
Make Uimage