Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Date: Mon, 10 Apr 2006 08:29:17 -0400
From: Stea Greene Subject: [SDL] Patch for JPEG Loading in SDL_image This fixes the JPEG detection routine in SDL_image such that it should be able to detect any JPEG file, JFIF or not. It does this by parsing the headers and tags, rather than expecting specific ones in order with no gaps. This also enables it to load raw 32-bit JPEG files, with an alpha channel. While not defined specifically in the JPEG spec (as far as I know), this is the format used internally by the .blp files in some of Blizzard's recent titles. It detects this from the JPEG itself, and should not cause any problems with any normal JPEGs that were loadable previously (in fact, it should make more of them loadable). I've tested it on both little and big endian and on just about every kind of file I can find. So far, it has worked perfectly in every case. I've also tested it with a number of .blp files and it works great. Note that .blp is NOT really an image format, so this won't load them straight up. You have to process them a bit before you can load them as JPEGs. Once you do that (and it's trivial), this patch makes SDL_image load them fine.
- Loading branch information
Showing
1 changed file
with
79 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters