[help] Skinning Itunes

hi, i managed to extract the portion of iTunes.exe where images are stored :)

it's a mac .rsrc file.

unfortunately, after i change some of the PICT files with ThemePark (in PearPC), the file becomes a little bigger and won't work anymore >.:)

i attached the file so you can try to edit it...

if you succeed editing it without making the file larger, please post it here!

Thanks in advance.

#214291

I guess iTunes has integrity check, since it's not only a media player, but e-shopping tool too. I tried to localize iTunes, but it fais to work too.

#214329

Originally posted by .max@Sep 16 2004, 12:49 PM

I guess iTunes has integrity check, since it's not only a media player, but e-shopping tool too. I tried to localize iTunes, but it fais to work too.

<{POST_SNAPBACK}>

:/ that's exactly what he said....

#214345

that's strange :blink: i tried changing strings before, font names for example, and it works great as long as the new string is the same length or shorter.

#214377

I tried this when it first came out and ran into the same problems.

Everything looked promising at first, but then I ran into the same issues you did.

I more or less gave up on trying to tweak the app at the EXE level.

#214382

Yeah, I've seen something like that before localhost, when I was trying to hack Opera. (Ok, to tell the truth, I didn't see it, but I read it in a tutorial :D ). I don't think that's just iTunes.

Why would you want to skin iTunes? It's perfect like it is :D . Ok, never mind. I have faith in you localhost.

I actually had a question about your plugin. I know it's off-topic, but...Is there an alternative way to get to the menu that was removed?

-nightcrawler1089

#214384

keyboards shortcuts still work with MPlugin

they wil bring up the menus ;)

#214392

Originally posted by rjohnstone+Sep 16 2004, 11:09 PM-->
QUOTE(rjohnstone @ Sep 16 2004, 11:09 PM)
I tried this when it first came out and ran into the same problems.

Everything looked promising at first, but then I ran into the same issues you did.

I more or less gave up on trying to tweak the app at the EXE level.

<{POST_SNAPBACK}>

i understand :/

well, i managed to change some of the bitmaps on the fly, but it slows down iTunes' startup a bit >.:(

have you already tried it as well?

#214394

i understand :/

well, i managed to change some of the bitmaps on the fly, but it slows down iTunes' startup a bit

and if i change the background mask, the background really changes, but i can't find a way to change the base gradient, so i can't make the background darker

have you already tried it as well?

I haven't tried changing the gradients.

I was looking more to editing the titlebar to accept a visual style overlay or at least give it a true aqua look.

The app bypasses the windows common controls function and draws it's own titlebar and the associated min/max/close buttons.

I found the resource file where they are contained and this is where I ran into the problem you described. Same result... any edit would trash the file.

#214402

When iTunes first came out, I tried skinning iTunes as well. I created a program which scanned the .exe for Image files. I ended coming up with quite a few PNG files which all contained valid headers and what not. They could be viewed in any image viewer and contained the scrollbars, buttons and what not of iTunes.

when I attempted to simply just change the color of one of these images and save it back into the .exe I was greeted with a nice error. I went back and attempted to simply change the color and save it so that the filesizes would be exactly the same but I could not. No matter what I did, even simply resaving the image would result in an image file that was larger.

- Evolution

#214404

Originally posted by evolution@Sep 17 2004, 12:15 AM

When iTunes first came out, I tried skinning iTunes as well. I created a program which scanned the .exe for Image files. I ended coming up with quite a few PNG files which all contained valid headers and what not. They could be viewed in any image viewer and contained the scrollbars, buttons and what not of iTunes.

when I attempted to simply just change the color of one of these images and save it back into the .exe I was greeted with a nice error. I went back and attempted to simply change the color and save it so that the filesizes would be exactly the same but I could not. No matter what I did, even simply resaving the image would result in an image file that was larger.

- Evolution

<{POST_SNAPBACK}>

Great example of a useless post. Everyone - if you don't have anything creative to say, just don't post. This topic is too important.

#214495

Localhost, I still think that the gradient is calculated.

Reason: iTunes imports the AlphaBlend function from msimg32.dll -

together with the usual suspects from gdi32.dll, it makes sense to me that it creates a pitch black bitmap in memory and alpha blits it on top of the tiled and stretched brushed pattern.

#214520

Originally posted by herd@Sep 17 2004, 11:12 AM

Localhost, I still think that the gradient is calculated.

Reason: iTunes imports the AlphaBlend function from msimg32.dll -

together with the usual suspects from gdi32.dll, it makes sense to me that it creates a pitch black bitmap in memory and alpha blits it on top of the tiled and stretched brushed pattern.

<{POST_SNAPBACK}>

i also think it is calculated.

i've changed the import table in iTunes.exe to DLL's i made instead of gdi32, user32, etc. so i could trace the functions it calls, but i couldn't find any HBITMAP or HDC that contained the gradient only.

this is the mask:

Mask.PNG

and it is applied this way:

x = y+z*y/255

while x is the final color value of the background

y is the color value of the gradient - (in windows: 118 in the edges to 139 in the middle, in OSX: 87 in the edges to 110 in the middle)

z is the color value of a pixel in the tiled mask.

the mask is exactly the same in Windows and OSX.

now if somehow i could change y, i could make the background darker.

i tried some reverse engineering to see where it is, but i hardly got anywhere as i don't know assembly...

#214523

well, I have just figured out how to edit the PNG files within iTunes.exe and have iTunes display the edited files properly. Granted, this will not change the background but the scrollbar images and things like this can be changed.. I will post a screenshot and the program I created to do this in a little bit :)

I guess my posts are of value afterall :)

- Evolution

#214653

Ok, here is the screenshot of the scrollbars and scrollbar buttons changed.

iTunes_Scrolls.png

I know it is not much but it's probably more than any of you all have every seen. I will soon post the program once I have completed it for use by regular people.

Yes, you can even change the button completely, not just the color.

Ooh, i forgot to add that the filesizes do not have to match but the new file cannot be larger than the original file.

So the new file can be smaller and my program will pad that file when it is written so that iTunes doesn't error out when you run it.

- Evolution

#214661

i succeed changing them as well, but in another method. btw, if PICT's also have such a known header/footer, maybe you could change the PICT's iTunes uses for all the other controls using your method as well.

#214726

Well, it's no secret as to what I'm doing. Basically, I opened up up iTunes.exe for Binary Access and read in it's bytes. I scanned the array for the PNG header and footer sequence and extracted all of that data to a seperate files.

I then loaded one of them into Photoshop where I changed the hue and saturation. Resaved the file but chose 16 Bit as the Pallette and came out with the smaller filesize which I was then able to pad with 00 until the bytes matched that of the original and simply wrote it back to the iTunes EXE file.

What if at all are the other image formats saved in ? I cannot find any other image files within the .exe. I only find PNG and thats it. also, where are they located ?

- Evolution

#214730

On a Mac, iTunes can be skinned by editing the resource file. Every aspect of it can be skinned. The resource file contains every image included it's mask which is the "BLACK" image that is used to alpha blit to the screen to create the nice smooth transparency effect you see.

I've gone through attempting to find info about the PICT header files and MaxOsx resources but I am coming up short on information for that. I can't find any Hex info for the headers of the PICT.

I found some info on changing the RGB highlights and what not of iTunes through a little hex editing and then ofcourse my program wich can edit the scrollbar buttons and what not but other than that I cannot find any other info on skinning iTunes.

if you come up with any info or can point me to some information on PICT header files then I'd much appreciate it.

- Evolution

#214770

OK, I GOT IT!!!! WOO HOO!! Ok, well, I finally figured out how to extract the .PCT files correctly.. DO YOU ALL HAVE ANY IDEA WHAT THIS MEANS!!! hehe.. I will start work on a program that will allow u to easily skin iTunes completely :)

- Evolution

#214852

Wow! This is amazing!! Congrats evolution- I look forward to where this is going!

-nightcrawler1089

P.S: About sidekick- I found a bug. Check the 1.3 release thread.

You're amazing!!!!!

#214887

sounds great! :D

will it allow files larger than the original??

#214891

Originally posted by localhost@Sep 18 2004, 09:10 PM

sounds great! :D

will it allow files larger than the original??

<{POST_SNAPBACK}>

Currently, I cannot see how it will allow files larger than the original. I am currently still attempting to have files of a smaller size to be exchanged. Changing files and as long as they are exactly the same size it is fine, iTunes will change them and display them.

Here are some screenshots of the background Gradient changed.

Background_Original.png

Background_Changed.png

As you can see all I did was simply set the background darker than the original. I haven't tried anything else but just doing that does not change the filesize of the original :)

- Evolution

#214893

ok... i want... THAT FILE!!! [zombie=MUST HAVE ITUNES WITH DARKER BG!!!]zombification=too much;file=must-have[/zombie]

#214897

ahh, i suceed doing that as well...if we'll succeed changing the base gradient we could skin everything perfectly!

is it possible to change the base gradient in a mac? i think the skinning methods in a Mac and in a PC are pretty similiar, so if it's possible on a Mac it may be possible in PC too.

#214900

Very true, check this out :)

Background_Changed_Again.png

hehe :)

I can now change every aspect of iTunes. I don't think it is possible to add files that are larger than the original but now smaller is no problem :) Every time I've resaved it's always been smaller, quite smaller in fact.. by 10 kb depending on the original size..

- Evolution

#214906