| View previous topic :: View next topic |
| Author |
Message |
I_love_Boxxy Newbie cheater
Reputation: 0
Joined: 09 Sep 2009 Posts: 11
|
Posted: Thu Nov 05, 2009 3:38 pm Post subject: Editing jpeg image header =] |
|
|
Sup guys, for some weird reason I am trying to play with Jpeg's file headers.
Basically, the dimension of jpeg image is stored in the header part, I want to change that :/
Yea, so I can upload my 1940498034x1879873983 Jpeg image to a site that limits you to 100x100 dimensions.
I googled the format of the jpeg header. I quickly downloaded a hex editor to start messing with random jpegs.
I got a 2048x1536 jpeg. The problem is, I cant find the supposed Height value in the offset they mentioned (Or maybe I am doing something wrong).
I even searched for "2048" through the whole file and didn't find anything 0_o
I can see several stuff like "Canon PowerShot" or the date the pic was taken in the ascii dump. I just cant find dimension though...
So, anyway, l33t experts here, help? wth I am doing wrong ?
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Nov 05, 2009 4:20 pm Post subject: |
|
|
Check the identifier in the header, it should be 'JFIF' (5 bytes) or something else. I think the header may differ depending, though I've never looked at one before.
I can check later
|
|
| Back to top |
|
 |
Radiation Grandmaster Cheater
Reputation: 14
Joined: 17 Jun 2009 Posts: 842 Location: Chernobyl
|
Posted: Thu Nov 05, 2009 8:39 pm Post subject: |
|
|
in case you're wondering, Hex Workshop is a great tool to hex edit files. And it's fast too.
_________________
|
|
| Back to top |
|
 |
I_love_Boxxy Newbie cheater
Reputation: 0
Joined: 09 Sep 2009 Posts: 11
|
Posted: Thu Nov 05, 2009 10:09 pm Post subject: |
|
|
Too late itapa, I already got myself XVI32. I just downloaded the first thing that showed up on google but I will give your a try though.
So anyway, slovach's post was really helpful, my test pic turned out to be ExiF format, and I found a pretty good tutorial explaining contents of an ExiF jpeg.
However, I followed instruction carefully annnnndd the offset thats supposed to contain 'width' unsigned ration integer is empty 0_0
The jpeg format was just too complicated and bored the shit out of me, so I gave the GIF format a try. GIF header as explained on Wikipedia turned out to be MUCH MORE simple than jpeg's one.
I picked a random 69x69 GIF from google images. I went to the 8th offset to find ASCII letter "E" which translates to "45" in hex which translates to "69" in decimal
Hayyyllll yeaa, I will start working on my 'supa sekrit project' now!
Thanks Slovach and itap for replying, I will update if I face any troubles (Which I hope not) =]
|
|
| Back to top |
|
 |
|