Hi all - apologies if this is in the wrong forum - I have no idea where this should go. Mods, feel free to move to the appropriate place if need be.
I use an application to compose music that is - I believe this is what you would call it - bitmap-based. Load the app, and you are looking at bitmaps that make up most of the GUI.
What I am trying to do is alter the colors and brightness of the bitmaps, as the color scheme which is changed in the prefs does not allow for this. I assume that I would need to create new bitmaps - that I would not be able to alter the ones that already exist. This I can do in Photoshop.
So, what I did is opened the app's skin file in a hex editor. Towards the end, I see a whole bunch of <filename>.bmp - deleting even one of these and then saving the skin file, results in an error when trying to open the app, and then a message saying that GUI resources could not be loaded. Not sure why deleting just one does this, but ok....
Does anyone know of any way that an end user who does not have access to the source code - and could not compile even if that were in fact available - might be able to do this? Seemingly, the hex editor is not the way to go - is there some other method to replace the bitmaps? The one thing I did manage to do was change the font that the app displays - did this by opening the app's .exe in the hex ed., and changing the font there. But that's as far as I got.
Any ideas for someone who is a complete newbie to this would be appreciated. Thanks in advance!
12 replies to this topic
#1
Posted 28 March 2011 - 07:18 PM
|
|
|
#2
Posted 29 March 2011 - 10:24 AM
I'm assuming this is Windows? In that case you might want to use Resource Hacker. It's worked great for me.
sudo rm -rf /
#3
Posted 29 March 2011 - 07:32 PM
Thanks much for the reply.
"It is used to modify program or operating system elements such as icons by extracting resources from executable program (.exe), program extension (.dll), and resource (.res) files."
Sounds like this is exactly what I need. Actually had to search around for a bit - I am using a 64-bit app, in W7 64, and needed a newer version. But thank you for pointing me in the right direction!
Am going to give this a shot, and will post back with any Qs, and/or my findings.
Cheers.
"It is used to modify program or operating system elements such as icons by extracting resources from executable program (.exe), program extension (.dll), and resource (.res) files."
Sounds like this is exactly what I need. Actually had to search around for a bit - I am using a 64-bit app, in W7 64, and needed a newer version. But thank you for pointing me in the right direction!
Am going to give this a shot, and will post back with any Qs, and/or my findings.
Cheers.
#4
Posted 29 March 2011 - 08:15 PM
#5
Posted 29 March 2011 - 09:07 PM
Ok, yes and no. Leaning more towards the no.
I opened the v4 .exe in RH, and I was able to change some of the cursors, just for testing. This worked fine; I saw the results when I saved, and opend the app. So, this was encouraging. But the .exe does not contain the bitmaps. There are only two bitmaps in the bitmap tree - the startup splash screen, and the 'about' screen. That's it.
So, I opened the v5 .exe - the one I use and really want to change - and same thing - only the two bitmaps. Furthermore, no cursor tree.
I am willing to bet that these bitmaps - and now the cursors as well - are in the app's skin file, which happens to be 2.4 MB
So the Q is, how do I get into the skin file? The extension is .srf, which is the dev name, resource file. RH, and other like apps, can not open this particular skin file. And a google search only yielded those other similiar apps, which do me no good here. The only thing I can open the skin file with is the hex ed., which does me no good here either.
Any other ideas?
Thanks again!
I opened the v4 .exe in RH, and I was able to change some of the cursors, just for testing. This worked fine; I saw the results when I saved, and opend the app. So, this was encouraging. But the .exe does not contain the bitmaps. There are only two bitmaps in the bitmap tree - the startup splash screen, and the 'about' screen. That's it.
So, I opened the v5 .exe - the one I use and really want to change - and same thing - only the two bitmaps. Furthermore, no cursor tree.
I am willing to bet that these bitmaps - and now the cursors as well - are in the app's skin file, which happens to be 2.4 MB
So the Q is, how do I get into the skin file? The extension is .srf, which is the dev name, resource file. RH, and other like apps, can not open this particular skin file. And a google search only yielded those other similiar apps, which do me no good here. The only thing I can open the skin file with is the hex ed., which does me no good here either.
Any other ideas?
Thanks again!
#6
Posted 01 April 2011 - 04:28 AM
This is not a bullet proof method, but you can search (using the hex editor) for bitmap file/stream signature. Bitmap file/stream starts with 0x42 0x4D bytes values. When you found these bytes, you can analyze if the following bytes match bitmap header format (see this: BMP file format - Wikipedia, the free encyclopedia), and if it's a match then using information in the header you can extract the bitmap.
#7
Posted 01 April 2011 - 09:55 AM
Yeah, this'll probably work pretty well. I've done it with Ogg files before; as long as you find the magic number and do a few sanity checks on the headers (see required values and for valid ranges of values) you'll most likely get valid stuff.
EDIT: Here you go. I really don't recommend using macros like I did, but it was a quick way to do it and I'm lazy as hell. :D
[ATTACH]3821[/ATTACH]
EDIT: Here you go. I really don't recommend using macros like I did, but it was a quick way to do it and I'm lazy as hell. :D
[ATTACH]3821[/ATTACH]
Attached Files
Edited by dargueta, 01 April 2011 - 11:07 AM.
Created code.
sudo rm -rf /
#8
Posted 02 April 2011 - 06:13 AM
Thanks for the responses guys.
LuthfiHakim > my goal is not to extract the bmp files - it is to replace them.
dargueta - thanks for the script. Not sure what to do with it tho...it opens in my hex ed., but now what?
Cheers.
LuthfiHakim > my goal is not to extract the bmp files - it is to replace them.
dargueta - thanks for the script. Not sure what to do with it tho...it opens in my hex ed., but now what?
Cheers.
#9
Posted 02 April 2011 - 08:44 AM
A shot in the dark, can you force this file to open up with a file compression utility? Developers very often use these archives to store semi-permanent things such as graphics or logos or datapiles, from your description of the names being at the bottom, the zip file format will display them in plain text (deleting them would break the archive, so that may have even caused the error loading the whole file)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#10
Posted 03 April 2011 - 07:45 AM
JHayat said:
LuthfiHakim > my goal is not to extract the bmp files - it is to replace them.
If you know what to extract, you also know what to replace, right? By extracting to an external file, you can confirm whether the part is really what you want to replace. After you confirm this, you can remove that part and insert your own bitmap. The only potential problem left is if the application employ signature check of the content (like CRC, MD5 or other similar hashing algorithm).
Quote
dargueta - thanks for the script. Not sure what to do with it tho...it opens in my hex ed., but now what?Cheers.
I did not check the code, but I believe the code is to automatically finding bitmaps using the magic number/signature.
#11
Posted 03 April 2011 - 03:33 PM
Alexander said:
A shot in the dark, can you force this file to open up with a file compression utility?
Thanks for the idea, but no.
LuthfiHakim said:
If you know what to extract, you also know what to replace, right? By extracting to an external file, you can confirm whether the part is really what you want to replace. After you confirm this, you can remove that part and insert your own bitmap. The only potential problem left is if the application employ signature check of the content..
Ok, but how do physically perform the bmp extraction once I find the correct one? This is where I am lost. Here are some of the bmps:

I dont mind playing around, and having to figure out what is what, but how do I physically extract/import the bmps?
Thanks!
#12
Posted 04 April 2011 - 12:58 AM
To extract the bitmap you can either:
From the screenshot, i see that it only lists the files used (i think) for the skin file. They are not the actual content. Perhaps this information is used only for tracking by the skin file creator software.
- write a small program to do it for you.
with Delphi or FreePascal you can use this routine:
procedure CopyToFile(const ASrcFile, ADestFile: string; const AStartPos, AEndPos: Integer); var vSrc, vDest: TStream; begin vSrc := TFileStream.Create(ASrcFile, fmOpenRead); try vSrc.Position := AStartPos; vDest := TFileStream.Create(ADestFile, fmCreate); try vDest.CopyFrom(vSrc, AEndPos-AStartPos); finally vDest.Free; end; finally vSrc.Free; end; end;
- use the hex editor to copy the area you want from the srf file, and paste the copied data to another file (you can create an empty file first for the target).
From the screenshot, i see that it only lists the files used (i think) for the skin file. They are not the actual content. Perhaps this information is used only for tracking by the skin file creator software.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top










