-Replaced tinyjpg for jpgd (public domain), fixes progressive encoded jpgs and speeds up. Closes #2040

-Removed support of loading BitMap as image, now it must be load as a pnm, also closes #2040
This commit is contained in:
Juan Linietsky
2016-01-03 17:14:28 -03:00
parent b988f016fd
commit e8fbf39f88
24 changed files with 3985 additions and 3236 deletions

View File

@@ -204,57 +204,3 @@ BitMap::BitMap() {
//////////////////////////////////////
RES ResourceFormatLoaderBitMap::load(const String &p_path, const String& p_original_path, Error *r_error) {
if (r_error)
*r_error=ERR_FILE_CANT_OPEN;
BitMap* ptr = memnew(BitMap);
Ref<BitMap> bitmap( ptr );
Image image;
Error err = ImageLoader::load_image(p_path,&image);
ERR_EXPLAIN("Failed loading image for BitMap: "+p_path);
ERR_FAIL_COND_V(err, RES());
bitmap->create_from_image_alpha(image);
if (r_error)
*r_error=OK;
return bitmap;
}
bool ResourceFormatLoaderBitMap::handles_type(const String& p_type) const {
return (p_type=="BitMap");
}
void ResourceFormatLoaderBitMap::get_recognized_extensions(List<String> *p_extensions) const {
ImageLoader::get_recognized_extensions(p_extensions);
}
String ResourceFormatLoaderBitMap::get_resource_type(const String &p_path) const {
List<String> extensions;
ImageLoader::get_recognized_extensions(&extensions);
String ext=p_path.extension().to_lower();
for(List<String>::Element *E=extensions.front();E;E=E->next()) {
if (E->get()==ext)
return "BitMap";
}
return "";
}
ResourceFormatLoaderBitMap::ResourceFormatLoaderBitMap() {
}