It is currently April 27th, 2024, 10:46 pm

"Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Get help with installing and using Rainmeter.
User avatar
Jonah Ling
Posts: 5
Joined: October 22nd, 2023, 6:45 pm
Location: United Kingdom

"Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Post by Jonah Ling »

I've started using the .rmskin packager for the first time with a new suite I'm working on. Everything has been working fine except the 'Header Image' option under the Advanced Tab in the .rmskin packager window. Upon selecting a .bmp file from my file explorer I get an error message pop up saying:

Error: Invalid .bmp file
C:\Users\...\Header Image.bmp

I have checked the Rainmeter Docs and ensured my .bmp image is the correct size. I have tried moving the .bmp file to within the skin folder which I'm packaging, and also putting it in other locations to no success. I have also tried changing the .bmp file's settings when exporting from GIMP, which includes changing the number of bits for each colour channel and excluding colour space information. Again, no success.

The Header Image obviously isn't a critical part of an .rmskin, and so if it doesn't work it isn't the end of the world, but I'd quite like to know now after spending a fair bit of time trying to get it to work whether I was just missing something obvious, or whether there is a bug or the feature is depreciated, etc. Thanks in advance for everyone's help!
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: "Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Post by Yincognito »

Jonah Ling wrote: October 22nd, 2023, 7:11 pm I've started using the .rmskin packager for the first time with a new suite I'm working on. Everything has been working fine except the 'Header Image' option under the Advanced Tab in the .rmskin packager window. Upon selecting a .bmp file from my file explorer I get an error message pop up saying:

Error: Invalid .bmp file
C:\Users\...\Header Image.bmp

I have checked the Rainmeter Docs and ensured my .bmp image is the correct size. I have tried moving the .bmp file to within the skin folder which I'm packaging, and also putting it in other locations to no success. I have also tried changing the .bmp file's settings when exporting from GIMP, which includes changing the number of bits for each colour channel and excluding colour space information. Again, no success.

The Header Image obviously isn't a critical part of an .rmskin, and so if it doesn't work it isn't the end of the world, but I'd quite like to know now after spending a fair bit of time trying to get it to work whether I was just missing something obvious, or whether there is a bug or the feature is depreciated, etc. Thanks in advance for everyone's help!
I never used the header image thing and probably I should have, so I'm not the most indicated person to advice on this, but one thing you can do is to post either the said image or a close equivalent exhibiting the same issue here, for testing by other folks willing to help.

Other than that, making sure the image is indeed a .bmp would be the 1st thing I would check, but I suppose you're sure by the look of your saving process. I prefer checking the file header via a text viewing program for that, though I guess other methods are just as good.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16182
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: "Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Post by balala »

Jonah Ling wrote: October 22nd, 2023, 7:11 pm I've started using the .rmskin packager for the first time with a new suite I'm working on. Everything has been working fine except the 'Header Image' option under the Advanced Tab in the .rmskin packager window. Upon selecting a .bmp file from my file explorer I get an error message pop up saying:

Error: Invalid .bmp file
C:\Users\...\Header Image.bmp
Could you please upload the image you have trouble with here? Just to check...
User avatar
Jonah Ling
Posts: 5
Joined: October 22nd, 2023, 6:45 pm
Location: United Kingdom

Re: "Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Post by Jonah Ling »

balala wrote: October 22nd, 2023, 7:48 pm
Could you please upload the image you have trouble with here? Just to check...
Thanks for getting back so quickly, here's the exact file I've been hoping to get to work (although I have also tried other images that have resulted in the same error). It's a OneDrive link since I don't know what stuff the Forums will do to the image if I upload it normally and having the exact file is obviously of importance here. I promise there's no viruses :D (although if you can think of a more secure way of me posting it that you'd prefer please let me know).

https://1drv.ms/i/s!Ag04EG19IFtDgsVSurdvXNpDYS_WrA?e=6iH33S
User avatar
Jonah Ling
Posts: 5
Joined: October 22nd, 2023, 6:45 pm
Location: United Kingdom

Re: "Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Post by Jonah Ling »

Jonah Ling wrote: October 22nd, 2023, 8:21 pm Thanks for getting back so quickly, here's the exact file I've been hoping to get to work (although I have also tried other images that have resulted in the same error). It's a OneDrive link since I don't know what stuff the Forums will do to the image if I upload it normally and having the exact file is obviously of importance here. I promise there's no viruses :D (although if you can think of a more secure way of me posting it that you'd prefer please let me know).

https://1drv.ms/i/s!Ag04EG19IFtDgsVSurdvXNpDYS_WrA?e=6iH33S
sorry, that link won't work, I accidentally just deleted the file :? Please use this instead:

https://1drv.ms/i/s!Ag04EG19IFtDgsVTx43XbOU74a3kkQ?e=6tum6E
User avatar
balala
Rainmeter Sage
Posts: 16182
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: "Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Post by balala »

Jonah Ling wrote: October 22nd, 2023, 8:25 pm sorry, that link won't work, I accidentally just deleted the file :? Please use this instead:

https://1drv.ms/i/s!Ag04EG19IFtDgsVTx43XbOU74a3kkQ?e=6tum6E
The attached image is not a .bmp. Its extension is .dib. I don't know this format, seems to be an image indeed, but is definitely not a .bmp. I converted this to a real .bmp file (I used ACDSee for conversion). I'm attaching the packed image (unfortunately can't attach a .bmp file), please download and try using it for creating the skin installer. I tried, your image was indeed not accepted, but this one is. Please let me know if you succeeded in using it.
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: "Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Post by Yincognito »

balala wrote: October 22nd, 2023, 8:40 pm The attached image is not a .bmp.
Not sure if the OP changed anything in the upload in the meantime, but when downloading it using the page's download button, it came up as a .bmp for me. When downloading via right click and save as, it also came up as a .bmp but internally it was a .png file. None of them worked when trying them with the skin packager, because their relevant properties were not the needed ones (even though one of the files was indeed a bitmap file). Yours did work, of course, but it was because of the appropriate bitmap's properties, and not necessarily because of the extension alone (I don't use ACDSee anymore, I'm on XnView MP nowadays, but it converted the uploaded file successfully as well).

By the way, DIBs are bitmaps too, since DIB stands for "device independent bitmap".
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Jonah Ling
Posts: 5
Joined: October 22nd, 2023, 6:45 pm
Location: United Kingdom

Re: "Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Post by Jonah Ling »

Oh wow, how interesting. Guess I'll have to do some extra steps each time I want to use a bitmap from GIMP, but glad to have gotten to the bottom of things. I'll download and try the file you sent balala later today when I get time, but it seems highly likely that it will work if it also worked for Yincognito. Nice to know it's not Rainmeter's fault anyhow!
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: "Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Post by Yincognito »

Jonah Ling wrote: October 23rd, 2023, 7:22 am Oh wow, how interesting. Guess I'll have to do some extra steps each time I want to use a bitmap from GIMP, but glad to have gotten to the bottom of things. I'll download and try the file you sent balala later today when I get time, but it seems highly likely that it will work if it also worked for Yincognito. Nice to know it's not Rainmeter's fault anyhow!
For the future header image cases, simply check the image properties of the file balala posted in an image viewer / editor (could be GIMP as well) and try to replicate them when saving the image in GIMP. There were several differences in that regard between what you both posted, and apparently this was the reason Rainmeter didn't accept your file.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16182
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: "Invalid .bmp file" Error When Selecting a Header Image in the .rmskin Packager

Post by balala »

Yincognito wrote: October 22nd, 2023, 10:02 pm but when downloading it using the page's download button, it came up as a .bmp for me.
Right, for me too. However I didn't realized this when yesterday got the image, I simple saved it with a right-click.
But even if I downloaded the image using the Download button, the image still couldn't be used, even if it's a .bmp, as you said as well.
Yincognito wrote: October 22nd, 2023, 10:02 pm When downloading via right click and save as, it also came up as a .bmp but internally it was a .png file.
When saved with a right-click, it came up as a .dib file, as I said previously as well. This might be caused by the fact that most probably we're using different browsers (I'm using Edge). However none of these files (neither the downloaded .bmp, nor the saved .dib) can be used as header image.
Yincognito wrote: October 23rd, 2023, 10:26 am For the future header image cases, simply check the image properties of the file balala posted in an image viewer / editor (could be GIMP as well) and try to replicate them when saving the image in GIMP.
Jonah Ling wrote: October 23rd, 2023, 7:22 am Guess I'll have to do some extra steps each time I want to use a bitmap from GIMP, but glad to have gotten to the bottom of things.
Note that the image used as header in skin installer has to be a .bmp and has to have fixed size 400 x 60 pixels. Neither larger, nor smaller images are accepted. This makes extremely easy to identify if a file is valid for this purpose: its size has to be exactly 72,054 bytes = 70.3 KB. Not less, not more. Extremely simple to check. Maybe there might be some cases in which a file would have the needed size but couldn't be used (in case when the user changed its extension, from let's say .png to .bmp, without changing its content as well), but even if such a case exists, it's extremely few probable, because any other image format than .bmp have smaller size in bytes for the needed width and height.
Jonah Ling wrote: October 23rd, 2023, 7:22 am I'll download and try the file you sent balala later today when I get time, but it seems highly likely that it will work if it also worked for Yincognito.
Alright. Please let me know if you succeeded.