summaryrefslogtreecommitdiffstats
path: root/core/io/image.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0eSpartan3222024-11-121-136/+115
|\
| * Clean up ImageBlueCube33102024-11-011-136/+115
| |
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Betsy: Add caching and BC1 compression supportBlueCube33102024-09-111-0/+1
|
* Image: Add a method for detecting signed valuesBlueCube33102024-08-271-0/+2
|
* Merge pull request #91535 from BlueCube3310/betsy-bc6hRémi Verschelde2024-08-211-0/+2
|\ | | | | Add Betsy to speed up BC6 compression
| * Add Betsy to speed up BC6 compressionBlueCube33102024-08-181-0/+2
| |
* | Merge pull request #92496 from clayjohn/HDR-2D-sRGBRémi Verschelde2024-08-191-0/+1
|\ \ | |/ |/| | | Ensure MovieWriter output is in gamma space when using HDR 2D
| * Ensure MovieWriter output is in gamma space when using HDR 2Dclayjohn2024-05-281-0/+1
| |
* | Support 64-bit image sizes for VRAM compressionBlueCube33102024-07-211-1/+1
| |
* | Fix Image CowData crash when baking large lightmapsHugo Locurcio2024-07-191-9/+11
| | | | | | | | | | | | | | | | | | | | | | This switches to 64-bit integers in select locations of the Image class, so that image resolutions of 16384×16384 (used by lightmap texture arrays) can be used properly. Values that are larger should also work. VRAM compression is also supported, although most VRAM-compressed formats are limited to individual slices of 16384×16384. WebP is limited to 16383×16383 due to format limitations.
* | [TextServer, GDExtension] Fix building text servers as GDExtension, expose ↵bruvzg2024-06-121-1/+1
|/ | | | new/changed low-level methods to GDExtension API.
* Image: Add static `is_format_compressed` function.BlueCube33102024-02-281-0/+1
|
* Merge pull request #87971 from bruvzg/font_no_image_dupRémi Verschelde2024-02-151-0/+4
|\ | | | | | | [TextServer / Font] Do not duplicate images to prevent unnecessary embedding.
| * [TextServer / Font] Do not duplicate images to prevent unnecessary embedding.bruvzg2024-02-051-0/+4
| |
* | Improve error reporting in the asset library and in related typesYuri Sizov2024-01-261-1/+1
|/ | | | | | | | This also makes errors related to asset image loading verbose-only, because, frankly, users can't do much about those errors. Spamming them with error messages about some assets on the frontend being broken is pointless.
* Give EXR saving methods a default value of false like the bindingsAaron Franke2024-01-101-2/+2
|
* Fix lossless formats in PortableCompressedTexture2Dnklbdev2024-01-051-0/+1
| | | | | | Update scene/resources/portable_compressed_texture.cpp Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Revert "Implement loading DDS textures at run-time"clayjohn2023-08-291-2/+0
| | | | This reverts commit 34ab1c8a36e61b386c210fb908b9ebfa86513149.
* Add support for KTX & KTX2 image formatacazuc2023-08-191-0/+2
| | | | Add support glTF KHR_texture_basisu extension
* Implement loading DDS textures at run-timeMarcin Nowak2023-07-311-0/+2
|
* Added Image's `load_svg_from_(buffer|string)`Felipe Augusto Marques2023-06-231-0/+5
| | | | No core dependency to the svg module.
* Refactor high quality texture importJuan Linietsky2023-01-301-9/+9
| | | | | | | | | | | | | | | * Only two texture import modes for low/high quality now: * S3TC/BPTC * ETC2/ASTC * Makes sense given this is the general preferred and most compatible combination in most platforms. * Removed lossy_quality from VRAM texture compression options. It was unused everywhere. * Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA). * Changed MacOS export settings so required texture formats depend on the architecture selected. This solves the following problems: * Makes it simpler to import textures as high quality, without having to worry about the specific format used. * As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Merge pull request #65376 from reduz/astc-supportRémi Verschelde2022-12-201-2/+15
|\ | | | | | | Implement basic ASTC support
| * Implement basic ASTC supportJuan Linietsky2022-12-201-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements basic ASTC support: * Only 4x4 and 8x8 block sizes. * Other block sizes are too complex to handle for Godot image compression handling. May be implemented sometime in the future. The need for ASTC is mostly for the following use cases: * Implement a high quality compression option for textures on mobile and M1 Apple hardware. * For this, the 4x4 is sufficient, since it uses the same size as BPTC. ASTC supports a lot of block sizes, but the benefit of supporting most of them is slim, while the implementation complexity in Godot is very high. Supporting only 4x4 (and 8x8) solves the real problem, which is lack of a BPTC alternative on hardware where it's missing. Note: This does not yet support encoding on import, an ASTC encoder will need to be added.
* | ETCPAK expects BGRA data for ETCBastiaan Olij2022-12-021-0/+1
| |
* | Rename Image's `get_rect` to `get_region`Micky2022-11-011-1/+1
| | | | | | | | Also renames its parameter to from "rect" to "region".
* | Make some Image methods statickobewi2022-10-141-11/+7
|/
* Replace Vector2(i) with Size2(i) for methods returning a sizeJohan Aires Rastén2022-09-011-1/+1
|
* Merge pull request #62861 from samdze/image-size-vector2iRémi Verschelde2022-08-081-1/+1
|\ | | | | Make Image.get_size() return a Vector2i instead of a Vector2
| * Make Image.get_size() return a Vector2i instead of a Vector2Samuele Zolfanelli2022-07-091-1/+1
| |
* | Merge pull request #63005 from Chaosus/image_rotateRémi Verschelde2022-07-191-0/+3
|\ \ | | | | | | Implement `rotate_90/rotate_180` functions to `Image`
| * | Implement `rotate_90/rotate_180` functions to `Image`Yuri Rubinsky2022-07-151-0/+3
| |/
* / Use integer types in Image and ImageTexture methodsFireForge2022-07-181-7/+7
|/ | | | | | | | | | | - Image.blit_rect() - Image.blit_rect_mask() - Image.blend_rect() - Image.blend_rect_mask() - Image.fill_rect() - Image.get_used_rect() - Image.get_rect() - ImageTexture.set_size_override()
* Add static methods for creating Image and ImageTexturekobewi2022-07-081-0/+1
|
* Restore the openexr grayscale property.K. S. Ernest (iFire) Lee2022-06-231-1/+1
|
* For in-engine processing allow saving openexr to a buffer.K. S. Ernest (iFire) Lee2022-06-231-0/+3
|
* Add support for saving WebP imagesAaron Franke2022-06-211-0/+6
|
* Implement Running Godot as Movie Writerreduz2022-06-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | * Allows running the game in "movie writer" mode. * It ensures entirely stable framerate, so your run can be saved stable and with proper sound (which is impossible if your CPU/GPU can't sustain doing this in real-time). * If disabling vsync, it can save movies faster than the game is run, but if you want to control the interaction it can get difficult. * Implements a simple, default MJPEG writer. This new features has two main use cases, which have high demand: * Saving game videos in high quality and ensuring the frame rate is *completely* stable, always. * Using Godot as a tool to make movies and animations (which is ideal if you want interaction, or creating them procedurally. No other software is as good for this). **Note**: This feature **IS NOT** for capturing real-time footage. Use something like OBS, SimpleScreenRecorder or FRAPS to achieve that, as they do a much better job at intercepting the compositor than Godot can probably do using Vulkan or OpenGL natively. If your game runs near real-time when capturing, you can still use this feature but it will play no sound (sound will be saved directly). Usage: $ godot --write-movie movie.avi [scene_file.tscn] Missing: * Options for configuring video writing via GLOBAL_DEF * UI Menu for launching with this mode from the editor. * Add to list of command line options. * Add a feature tag to override configurations when movie writing (fantastic for saving videos with highest quality settings).
* Merge pull request #50175 from kleonc/image-blit-blend-fix-rectsHugo Locurcio2022-04-191-0/+2
|\ | | | | `Image.blit_rect/blend_rect` Fix rects calculations for negative arguments
| * Fix `Image.blit_rect/blend_rect()` for negative `p_dest` pointkleonc2021-11-261-0/+2
| |
* | Add PortableCompressedTexturereduz2022-03-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * Resource that allows saving textures embedded in scenes or standalone. * Supports only formats that are portable: Lossy, Lossles or BasisUniversal This is something I wanted to add for a long time. I made it now because @fire requires it for importing GLTF2 files with embedded textures, but also this will allow saving Godot scenes as standalone binary files that will run in all platforms (because textures will load everywhere). This is ideal when you want to distribute individual standalone assets online in games that can be built from Godot scenes.
* | Unify TextServer built-in module and GDExtension code.bruvzg2022-03-171-8/+8
| |
* | Faster CVTT by reducing quality.K. S. Ernest (iFire) Lee2022-02-041-0/+2
| | | | | | Make BC6 and BC7 CVTT faster while still having better quality than DXT5.
* | Remove support for PVRTC texture encoding and decodingHugo Locurcio2022-01-141-7/+0
| | | | | | | | | | | | | | On the only platform where PVRTC is supported (iOS), ETC2 generally supersedes PVRTC in every possible way. The increased memory usage is not really a problem thanks to modern iOS' devices processing power being higher than its Android counterparts.
* | Style: Remove inconsistently used `@author` docstringsRémi Verschelde2022-01-041-2/+0
| | | | | | | | | | | | | | | | | | | | Each file in Godot has had multiple contributors who co-authored it over the years, and the information of who was the original person to create that file is not very relevant, especially when used so inconsistently. `git blame` is a much better way to know who initially authored or later modified a given chunk of code, and most IDEs now have good integration to show this information.
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Image Use memcpy() in fill(), fill_rect(), _put_pixelb(), _get_pixelb()kleonc2021-11-231-2/+4
| | | | Co-authored-by: Lightning_A <aaronjrecord@gmail.com>