buletov Posted January 26, 2005 Posted January 26, 2005 ok, here's something we migh want to achieve.let's say we want the possibilty that the end-user chooseswhat text is to be displayed in the bottom-left part of thewindows xp boot logo instead of a copyright notice.(he would choose this in the T-12 minute of the windows setup)so, we need some app that would generate a image based onan existing boot image with an empty bottom-left portion,and mix it with text, while still retaining exact 16 colors palleteof the original windows boot screen;next step is to automatically insert our image into resourcesection of the kernel, which could be autoomated by using someexisting resurce editing tool. after that, coping part is less than easy.so, throw you ideas on which tools to use!
buletov Posted January 29, 2005 Author Posted January 29, 2005 Heh, we are making progress here...SimonSays found this one:i think i got it:http://www.imagemagick.org/command-line examples# convert -font helvetica -fill white -pointsize 36 \-draw 'text 10,50 "Floriade 2002, Canberra, Australia"' \floriade.jpg comment.jpgTesting pending...
Tsunami Posted January 29, 2005 Posted January 29, 2005 The following command works for me (all on one line):convert -font %SystemRoot%\Fonts\Arial.ttf -fill white -pointsize 18 -draw "text 10,20 'Floriade 2002, Canberra, Australia'" floriade.jpg comment.jpgYou need to specify the full path to your font file.You need to specify the draw string in double quotes, and the text in single quotes.The following DLLs are needed to use convert.exe:CORE_RL_bzlib_.dllCORE_RL_jpeg_.dllCORE_RL_lcms_.dllCORE_RL_magick_.dllCORE_RL_tiff_.dllCORE_RL_ttf_.dllCORE_RL_zlib_.dllMSVCR71.dllX11.dllAlso, convert.exe depends on some other components installed by ImageMagick, which are the modules and a registry tweak.And here's the command to replace the background in ntoskrnl.exe using Resource Hacker:ResHacker.exe -modify "%SystemRoot%\system32\ntoskrnl.exe", "<new filename>", "<modified bitmap>", BITMAP,1,
buletov Posted January 30, 2005 Author Posted January 30, 2005 nice one Tsunamione more catch is how will convert handle this bitmap, since it'sa 16 color pallete will all entries colors set to 0,0,0
Tsunami Posted January 30, 2005 Posted January 30, 2005 Well, I was looking for the 16 color palette, and I came across this totorial. I was also looking for an answer to the question: do we have to change the color palette back to the one Microsoft put in the original ntoskrnl.exe? This tutorial, however, doesn't say anything about resetting the color palette, so this makes me believe we can put any 16 color bitmap in the modified ntoskrnl.exe, without changing the color palette back.The thing I'm looking for now is, what font Microsoft used for the original copyright text (I don't know if you want to let people choose the font used, or if you just want to use the same font Microsoft used, but either way, I need the font to get the exact position of the original copyright text).
buletov Posted January 30, 2005 Author Posted January 30, 2005 yes, we can keep it, but the problem is that you would see aquick flash of the image once the fade in starts, and that is jerky... (or at least I think so)well, to fix this, we CAN use a normal 16 color image,and AFTER adding the text use some tool to unattendendlyset all pallete entries to 0,0,0...
buletov Posted January 30, 2005 Author Posted January 30, 2005 well, i've been getting some sucess with the following:convert oldlogo.bmp -type Palette -colors 16 -colorspace RGB -font c:\windows\fonts\arial.ttf +antialias -fill "#FCFCFC" -annotate 0x0+22+459 "My New Text" newlogo.bmphowever the problem is that new image is a 32bit bitmap, and not 16 colors palette...(note: +antialias disables font smothing)it would be good if -fill would support palette entry instead of a color (ie -fill 14)
Tsunami Posted January 30, 2005 Posted January 30, 2005 Well, I am able to convert it to a 216 colors (web safe) image with this command:convert -map netscape: oldlogo.bmp newlogo.bmpEdit: this site talks about replacing the colors using convert.exe, but I'm not yet sure how it works.And another edit: it seems that the -colors switch doesn't work in conjunction with the -draw switch. First drawing the text and then converting the image back to 16 colors works for the colors, but the text is gone then too (even though I use a color for the text that's in the palette).
buletov Posted February 3, 2005 Author Posted February 3, 2005 i am making some serious progres with this,and will be reporting my sucess shortly...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now