diff options
Diffstat (limited to 'modules/tinyexr/image_loader_tinyexr.cpp')
-rw-r--r-- | modules/tinyexr/image_loader_tinyexr.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/modules/tinyexr/image_loader_tinyexr.cpp b/modules/tinyexr/image_loader_tinyexr.cpp index 1c0f3cd03e..dc34fe3003 100644 --- a/modules/tinyexr/image_loader_tinyexr.cpp +++ b/modules/tinyexr/image_loader_tinyexr.cpp @@ -36,7 +36,6 @@ #include "thirdparty/tinyexr/tinyexr.h" Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) { - Vector<uint8_t> src_image; int src_image_len = f->get_len(); ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT); @@ -62,7 +61,6 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f int ret = ParseEXRVersionFromMemory(&exr_version, w, src_image_len); if (ret != TINYEXR_SUCCESS) { - return ERR_FILE_CORRUPT; } @@ -141,12 +139,10 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f int output_channels = 0; if (idxA != -1) { - imgdata.resize(exr_image.width * exr_image.height * 8); //RGBA16 format = Image::FORMAT_RGBAH; output_channels = 4; } else { - imgdata.resize(exr_image.width * exr_image.height * 6); //RGB16 format = Image::FORMAT_RGBH; output_channels = 3; @@ -185,7 +181,6 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f // Assume `out_rgba` have enough memory allocated. for (int tile_index = 0; tile_index < num_tiles; tile_index++) { - const EXRTile &tile = exr_tiles[tile_index]; int tw = tile.width; @@ -215,7 +210,6 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f uint16_t *row_w = first_row_w + (y * exr_image.width * output_channels); for (int x = 0; x < tw; x++) { - Color color(*r_channel++, *g_channel++, *b_channel++); if (p_force_linear) @@ -242,7 +236,6 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f } void ImageLoaderTinyEXR::get_recognized_extensions(List<String> *p_extensions) const { - p_extensions->push_back("exr"); } |