summaryrefslogtreecommitdiffstats
path: root/core/image.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement Lanczos image filterDaw112019-05-051-0/+151
|
* Added ability for multiple images to be imported as an atlasJuan Linietsky2019-04-191-7/+5
| | | | | This adds support for groups in the import system, which point to a single file. Add property hint for saving files in file field
* Style: Apply new changes from clang-format 8.0Rémi Verschelde2019-04-091-5/+10
| | | | | | It seems to stay compatible with formatting done by clang-format 6.0 and 7.0, so contributors can keep using those versions for now (they will not undo those changes).
* Ensure ETC2 textures are ALSO compressed to Po2 when have mipmaps. Fixes #26733Juan Linietsky2019-03-071-0/+4
|
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-5/+5
| | | | Fixes #25316.
* Image: Fix decompressing ETC2Rémi Verschelde2019-02-081-1/+1
| | | | | | Thanks to @Rriik for finding the bug and its cause. Fixes #25595.
* Prevent upscaled SVG from exceeding Image boundsRémi Verschelde2019-01-281-0/+3
| | | | | | Also expose Image MAX_WIDTH and MAX_HEIGHT. Fixes #24455.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix blitting from negative positionPedro J. Estébanez2018-11-301-4/+8
|
* Fix Squish decompression, closes #18109Juan Linietsky2018-11-161-0/+9
|
* Merge pull request #22722 from akien-mga/fix-warningsRémi Verschelde2018-10-071-3/+4
|\ | | | | Fix more "may be used initialized" warnings from GCC 7
| * Fix more "may be used initialized" warnings from GCC 7Rémi Verschelde2018-10-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following GCC 7 warnings: ``` core/cowdata.h:269:47: warning: 'alloc_size' may be used uninitialized in this function [-Wmaybe-uninitialized] core/error_macros.h:163:26: warning: 'nearest_point' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:1579:5: warning: 'colormap_size' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:1582:12: warning: 'size_height' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:1590:23: warning: 'size_width' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:1599:29: warning: 'pixel_size' may be used uninitialized in this function [-Wmaybe-uninitialized] core/math/face3.cpp:207:15: warning: 'tri_max' may be used uninitialized in this function [-Wmaybe-uninitialized] core/math/face3.cpp:209:15: warning: 'tri_min' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/rasterizer_scene_gles3.cpp:665:22: warning: 'best_used_frame' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/rasterizer_storage_gles3.cpp:865:27: warning: 'blit_target' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/rasterizer_storage_gles3.cpp:980:29: warning: 'blit_target' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/shader_gles3.h:122:9: warning: '<anonymous>.ShaderGLES3::Version::frag_id' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/shader_gles3.h:122:9: warning: '<anonymous>.ShaderGLES3::Version::id' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/shader_gles3.h:122:9: warning: '<anonymous>.ShaderGLES3::Version::vert_id' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/plugins/script_editor_plugin.cpp:1980:31: warning: 'se' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/scene_tree_dock.cpp:840:30: warning: 'new_node' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4259:9: warning: 'a1' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4259:9: warning: 'lll' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4259:9: warning: 'lul' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4260:9: warning: 'a2' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4261:9: warning: 'a3' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4265:3: warning: 'enable_lin' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4294:3: warning: 'enable_ang' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4311:34: warning: 'll' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4311:34: warning: 'ul' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/3d/voxel_light_baker.cpp:1655:47: warning: 'cone_dirs' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/3d/voxel_light_baker.cpp:1656:73: warning: 'cone_weights' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/gui/texture_progress.cpp:181:6: warning: 'cp' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/gui/texture_progress.cpp:181:6: warning: 'cq' may be used uninitialized in this function [-Wmaybe-uninitialized] servers/physics/shape_sw.cpp:1056:19: warning: 'support_max' may be used uninitialized in this function [-Wmaybe-uninitialized] ```
* | Readd mipmaps 'bug' in Image::expand_x2_hq2x, fixing it caused a regressionRémi Verschelde2018-10-061-1/+3
|/ | | | Fixes #22747.
* Fix GCC 8 warnings about potentially unitialized variablesRémi Verschelde2018-10-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fixes the following GCC 8 warnings: ``` core/image.cpp:730:44: warning: 'mip1_weight' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:293:20: warning: 'mip2' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:293:20: warning: 'mip1' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/audio_stream_preview.cpp:58:19: warning: 'vmax' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/audio_stream_preview.cpp:85:19: warning: 'vmin' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/editor_themes.cpp:306:53: warning: 'preset_contrast' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/plugins/animation_blend_space_2d_editor.cpp:459:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/plugins/animation_blend_space_2d_editor.cpp:443:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized] main/tests/test_oa_hash_map.cpp:57:29: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized] modules/csg/csg.cpp:764:40: warning: 'max_angle' may be used uninitialized in this function [-Wmaybe-uninitialized] modules/csg/csg_shape.cpp:1945:3: warning: 'face_count' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/3d/voxel_light_baker.cpp:1593:8: warning: 'cone_aperture' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/3d/voxel_light_baker.cpp:1592:6: warning: 'cone_dir_count' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/animation/animation_blend_space_2d.cpp:471:8: warning: 'mind' may be used uninitialized in this function [-Wmaybe-uninitialized] core/os/memory.cpp:94: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] core/os/memory.cpp:95: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] core/os/memory.cpp:98: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] ```
* Fix some warnings raised by MSVC 2017Rémi Verschelde2018-10-031-14/+19
| | | | | | | | | | | | | | | | | Disabled signed/unsigned warnings like for GCC/Clang (warning C4018: '>=': signed/unsigned mismatch). Fixes the following MSVC 2017 warnings: ``` core\image.cpp(999): warning C4804: '>': unsafe use of type 'bool' in operation core\io\compression.cpp(178): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) editor\doc\doc_dump.cpp(226): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) scene/resources/material.h(289): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) scene/resources/material.h(298): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) editor\editor_themes.cpp(379): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation ```
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-5/+5
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Fix mipmap levels not being initializedelasota2018-08-251-8/+11
|
* Merge pull request #21167 from elasota/squish-quality-configRémi Verschelde2018-08-231-3/+3
|\ | | | | Support higher-quality S3TC compression modes
| * Use cluster fit at higher quality levelselasota2018-08-221-3/+3
| |
* | get rid of default template function arguments, works on cxx03Juan Linietsky2018-08-221-15/+15
| |
* | Make sure resizing of float and half float images works, fixes #21157Juan Linietsky2018-08-221-36/+134
|/
* BPTC supportelasota2018-08-211-46/+144
|
* Deprecate incorrect Color::gray()Rémi Verschelde2018-08-211-2/+2
| | | | | | | | | | | This average is not a proper approximation of a grayscale value, get_v() is better suited for that. If we want a real to_grayscale() conversion, it's somewhat more involved: https://en.wikipedia.org/wiki/Grayscale Remove the deprecated Gray() from C# bindings as it conflicts with new named color constants.
* -Deprecate ImageTexture::loadJuan Linietsky2018-08-141-2/+6
| | | | | -Add warning to Image::load when loading resources -Add script binding for get_configuration_warning
* Added proper import support for 3D and Array texturesJuan Linietsky2018-08-061-5/+18
|
* Merge pull request #19313 from RandomShaper/improve-imageJuan Linietsky2018-07-231-12/+100
|\ | | | | Image trilinear scaling + Optimization
| * Optimize image scaling routinesPedro J. Estébanez2018-07-231-6/+6
| |
| * Add trilinear filtering to image scalingPedro J. Estébanez2018-07-231-7/+95
| |
* | Add webp buffer loader for Imagegeequlim2018-07-171-18/+14
| | | | | | | | | | Cleanup the code memory load related code for Image Fix jpeg buff load function always returns OK event failed
* | Ensure, if a texture meant for a normal map is imported and size limit ↵Juan Linietsky2018-07-031-0/+30
|/ | | | exists, that it's renormalized after resize.
* added rgbe_to_srgb method to Imagekarroffel2018-05-301-0/+32
|
* Merge pull request #18219 from AlexHolly/fix-image-blit-blendJuan Linietsky2018-05-071-0/+24
|\ | | | | blit and blend fix when dst<Vector2
| * blit and blend fix when dst<Vector2Alexander Holland2018-04-151-0/+24
| |
* | Merge pull request #18505 from AlexHolly/image-point2-helperJuan Linietsky2018-05-071-1/+11
|\ \ | | | | | | add Point2 helper for Image.get_pixel and Image.set_pixel
| * | add Point2 helper for Image.get_pixel and Image.set_pixelAlexander Holland2018-04-291-1/+11
| |/ | | | | image-point2-helper
* | add condition check in Imgae::create(...)RaphaelHunter2018-05-051-0/+3
| |
* | Merge pull request #18321 from Crazy-P/Fixes-logically-dead-codeRémi Verschelde2018-05-011-1/+4
|\ \ | | | | | | Fixes logically dead code (Coverity)
| * | Fixes logically dead code (Coverity)Crazy-P2018-04-211-1/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes reported logically dead codes by Coverity * image.cpp: Doesn't really need any modification. But to remove the bug report then we have to move the MAX call away from the for loop statement. * rasterizer_gles3.cpp: Removes unnecessary elif condition since it is checked earlier in the function * collada.cpp: If stamement never reached due to macro ERR_CONTINUE does the same. * navigation_mesh.cpp: Variables should always be null - however, also checked for the very same condition in their function call. Leaving this for review (whether the function call is necessary or not) * path_editor_plugin.cpp: If cancel is true, then it should restore the edited value to the original provided. http://docs.godotengine.org/en/3.0/classes/class_editorspatialgizmo.html#class-editorspatialgizmo-commit-handle * spatial_editor_gizmos.cpp: the very condition of i >= 3 is predetermined in the if case right before it. Thus case 1 is always '1' and case 2 is always '-1' * grid_map_editor.cpp: Same as above in spatial_editor_gizmos.cpp * voxel_light_baker.cpp: Same as above in spatial_editor_gizmos.cpp * visual_server.cpp: Same as above in spatial_editor_gizmos.cpp * visual_script_expression.cpp: char '-' is already true in the switch case mechanism. Thus it can never reach to default case. * particles.cpp: Case 'PARAM_MAX' is unreachable due to index checking right before the switch execution. * shader_language.cpp: Invalid index is handled in switch default case. `type < TYPE_FLOAT && type > TYPE_VEC4` -> `(type < TYPE_FLOAT || type > TYPE_VEC4`) Fixes the "always false problem" in TODO comment.
* / Add option to renormalize mipmaps when generating them for normalmaps.Juan Linietsky2018-04-291-12/+36
|/ | | | Reduces some aliasing.
* Merge pull request #16898 from Lerc/masterJuan Linietsky2018-04-081-0/+42
|\ | | | | add Image::bumpmap_to_normalmap conversion function
| * change bumpmap_to_normalmap range from [1...255] to [0...255]Neil Graham2018-03-161-3/+3
| |
| * change to clang formatNeil Graham2018-02-241-19/+19
| |
| * add Image::bumpmap_to_normalmap conversion functionNeil Graham2018-02-211-0/+42
| |
* | enhance mipmapsMavropoulos Ioannis2018-03-031-49/+17
|/
* Fix typos in code and docs with codespellRémi Verschelde2018-01-181-1/+1
| | | | Using v1.11.0 from https://github.com/lucasdemarchi/codespell
* Fix crash when using Image.resize() without calling Image.create() firstJerome670002018-01-061-2/+5
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Revert "Add missing image format RGB10A2. Fixes #14964"Juan Linietsky2018-01-031-24/+0
|
* Merge pull request #15051 from binbitten/bug-fixesRémi Verschelde2018-01-031-0/+24
|\ | | | | Add missing image format RGB10A2. Fixes #14964
| * Add missing image format RGB10A2. Fixes #14964binbitten2017-12-251-0/+24
| |