Resource image Content-Type. (gripe)

Forum for alternative clients, mods & discussions on the same.
mvgulik
Posts: 4090
Joined: Fri May 21, 2010 2:29 am

Resource image Content-Type. (gripe)

Post by mvgulik »

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.) :(
User avatar
borka
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: Resource image Content-Type. (gripe)

Post by borka »

you didn't load a res file there ;)

amber-1.72.3\builtin-res.jar\res\gfx\
You do not have the required permissions to view the files attached to this post.
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
mvgulik
Posts: 4090
Joined: Fri May 21, 2010 2:29 am

Re: Resource image Content-Type. (gripe)

Post by mvgulik »

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"

Return to “The Wizards' Tower”