Corrupt .bmp fix?

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Corrupt .bmp fix?

Post by LuX » June 4th, 2012, 10:35 pm

Not sure if others are gonna get this one, but my shitty vista paint cant make proper bitmaps even at 24 bit. Anyways... I tried to upload custom images with the stuff I learned in lesson 20, but I cept getting errors so I downloaded hex editor to see how it looks like, and sure enough it was a bit different that the ones given by chili. Here's how I fixed it:

Hex Editor

This seems to work for some images, but some keep on giving errors...
Attachments
fix.png
fix.png (12.96 KiB) Viewed 4031 times
ʕ •ᴥ•ʔ

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Corrupt .bmp fix?

Post by Asimov » June 5th, 2012, 12:38 am

Hi Lux,

I think it is quite normal for different paint packages to save some kind of id into the file. It doesn't always mean it is corrupt. You will probably find that the image offset has been changed to accomodate it, if I knew where to look for that LOL.

Have you tried photoshop? I can't use anything else heh heh.

Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Corrupt .bmp fix?

Post by chili » June 5th, 2012, 2:44 am

Zip and post one of the .bmp files that is giving you trouble. Post it as it is, without any hex editing. I will take a look at it and see if there is something wrong with the bitmap loading function.
Chili

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Corrupt .bmp fix?

Post by LuX » June 5th, 2012, 9:31 am

Here, I put my mad paint skills into good use.

If it works with you I'll upload my bmp load project, maybe there's some coloring error or something... I suspect it might have some error with colorful pictures, but I'll wait for your report first.
Last edited by LuX on June 5th, 2012, 11:51 am, edited 1 time in total.
ʕ •ᴥ•ʔ

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Corrupt .bmp fix?

Post by LuX » June 5th, 2012, 9:32 am

Reckless annoyance with huge file names? Score!
ʕ •ᴥ•ʔ

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Corrupt .bmp fix?

Post by Asimov » June 5th, 2012, 10:30 am

Hi Lux,

I remember on the Amiga 1200 you couldn't have over 256 characters in a filename, and that was a good thing LOL.

Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Corrupt .bmp fix?

Post by LuX » June 5th, 2012, 11:51 am

Yeah, I think the problem might be somewhere in the project itself, rather than the images... I'll try to find where the problem is.
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Corrupt .bmp fix?

Post by chili » June 5th, 2012, 11:53 am

I found it bro. You haven't done Lesson 21 yet have you? ;)
There is a bug in the BMP loader that is only apparent when the width is a multiple of 4. I explain the bug and the fix in the video.
Chili

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Corrupt .bmp fix?

Post by LuX » June 5th, 2012, 11:57 am

Ah, well I'v just gone through lesson 20 half way, wasn't that interested about the animation part, and haven't had the will to watch tutorial 21 yet, I'll have to now... : -P

Btw. I don't know who designed this forum, but it would be a nice feature, if people could add to the side bar at which lesson they are going, so you could see roughly how much they have seen or know about.
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Corrupt .bmp fix?

Post by chili » June 5th, 2012, 12:07 pm

That is a good idea. I'll look into it.
Chili

Post Reply