Edit an image BYTE-SIZE

Textures, recreate headers, conversions, algorithms and parsing of image files
wolftatoo
Posts: 49
Joined: Mon Nov 07, 2016 5:49 am

Edit an image BYTE-SIZE

Post by wolftatoo »

I want to make a modded image the exact bytes-size(not pixel size) of an original one!
How can i do that?
Please help!
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Edit an image BYTE-SIZE

Post by MerlinSVK »

Wow! So much information! Now we can start guessing the format.
First try: PNG?
wolftatoo
Posts: 49
Joined: Mon Nov 07, 2016 5:49 am

Re: Edit an image BYTE-SIZE

Post by wolftatoo »

Yes, i need help on PNG.
I already can increase JPG by editing its EXIF.
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Edit an image BYTE-SIZE

Post by MerlinSVK »

Why you need the exact same file size?
For reimporting back into archive?

    If yes, could you use smaller PNG and the rest simply fulfill with zeroes?
  • If yes, try FileOptimizer (it has some optimization utils also for PNGs) which could make smaller (byte-wise) PNGs than original
  • If no, than there is probably no way to make a new PNG with same size
wolftatoo
Posts: 49
Joined: Mon Nov 07, 2016 5:49 am

Re: Edit an image BYTE-SIZE

Post by wolftatoo »

Actually i found a way to do that by: opening the png in a hex editior and ad spaces to the end till i got the exact bytesize that i wanted(pics still get reconized/read by any programme but the game)
But, the game wont reconize the modded pngs ! Its probably Crc check.
Any ideas?
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: Edit an image BYTE-SIZE

Post by MerlinSVK »

I would firstly modify few bytes in the original image, to check if it really has a crc check.
If that's the case, you will have to find where are stored the checksums and modify the one you need.