Resource image Content-Type. (gripe)

Forum for alternative clients, mods & discussions on the same.

Resource image Content-Type. (gripe)

Postby mvgulik » Sun Oct 27, 2019 8:42 am

Image

O well. Guess I just need to add a file-header scan to check for the real image type. (like all internet browsers do ...)

(although double checking stuff is always a good thing. ... Its also a bit tiring at times when it seems to be relate to some kind of laziness on the other size.) :(
mvgulik
 
Posts: 3742
Joined: Fri May 21, 2010 2:29 am

Re: Resource image Content-Type. (gripe)

Postby borka » Sun Oct 27, 2019 4:16 pm

you didn't load a res file there ;)

amber-1.72.3\builtin-res.jar\res\gfx\
Attachments
0ccsrc.jpg
0ccsrc.jpg (63.39 KiB) Viewed 781 times
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: Resource image Content-Type. (gripe)

Postby mvgulik » Sun Oct 27, 2019 5:26 pm

borka wrote:you didn't load a res file there ;)
Correct.
Hafen also has a dedicated images-only resource set. (for easy coding and/or speed purposes I imagine)

borka wrote:JFIF
I know.
This will do for now ... as I'm to lazy to (make my code) look past the first 4 image-bytes. ;)
Code: Select all
   types['png'] = '89 50 4E 47'
   types['jpg'] = 'FF D8' ## FF E0 00 10 (4A 46 49 46)JFIF
   types['gif'] = '47 49 46 38' ## "GIF8"
   types['bmp'] = '4D 42' ## B6..B9 "00 00 00 00"
mvgulik
 
Posts: 3742
Joined: Fri May 21, 2010 2:29 am


Return to The Wizards' Tower

Who is online

Users browsing this forum: Yandex [Bot] and 11 guests