Sasha Szpakowski
29ae5e6273
Fix channel order when encoding EXR files.
...
Fixes #2070 .
2024-08-03 18:04:27 -03:00
Sasha Szpakowski
58f05eb000
fix incorrect errors when using an integer format ImageData
2024-04-18 20:32:21 -03:00
Sasha Szpakowski
1e97e09b28
Rework internal module registration to happen in constructors.
2024-02-24 15:21:38 -04:00
Sasha Szpakowski
ae6800e0e0
Add Data:performAtomic to lock a mutex while using a Data object.
2024-02-18 17:07:24 -04:00
Sasha Szpakowski
007090af14
ImageData: remove automatic mutex locks.
2024-02-18 17:06:40 -04:00
Sasha Szpakowski
64a30f177f
Merge branch 'main' into 12.0-development
2024-02-10 12:24:48 -04:00
Sasha Szpakowski
94d5864144
update year for copyright notice
2024-02-10 12:13:22 -04:00
Sasha Szpakowski
6aaf0b22bf
Address some compiler warnings
2023-10-21 13:55:43 -03:00
Sasha Szpakowski
8c13943f64
ImageData can track whether they're meant to be loaded into a Texture with a non-sRGB format when gamma correct rendering is enabled.
...
Fixes #1556 .
* Add ImageData/CompressedImageData:setLinear and ImageData/CompressedImageData:isLinear.
The flag is used as a hint when loading a texture from the data to determine if the format should not be treated as sRGB-encoded. The 'linear' flag in newImage overrides this.
* love.graphics.readbackTexture automatically sets the linear flag on ImageData it returns when the texture's format is linear.
This allows an ImageData generated via readback to be fed back into a new Texture and the format will match the original Canvas.
* Also clean up some image decoding code.
2023-10-14 20:48:21 -03:00
Sasha Szpakowski
343d192f10
Compressed texture formats have explicit sRGB variants
2023-10-14 15:01:01 -03:00
Sasha Szpakowski
95d44c2c2d
very minor compile speed improvements
2023-02-11 16:29:24 -04:00
Sasha Szpakowski
f6cdbdc868
Merge branch 'main' into 12.0-development
2022-12-31 22:46:34 -04:00
Sasha Szpakowski
0b75f6cfa5
Missed some files...
2022-12-31 22:36:48 -04:00
Sasha Szpakowski
c823dbca96
Update copyright year for 2023
2022-12-31 22:25:49 -04:00
slime
9c46b75138
ImageData:encode now supports saving exr image files.
...
Also add support for loading uint exr image files, and fix a memory leak in the exr loading code.
Resolves #1813 .
2022-09-10 23:17:42 -03:00
Alex Szpakowski
a9cca65a14
Clean up some compressed texture loading code.
2022-04-22 22:55:48 -03:00
Alex Szpakowski
e61a664a8b
ImageData: limited support for integer pixel formats.
...
For now this doesn't support conversions (get/set/mapPixel, etc). Just the ability for ImageData to contain integer pixel contents, for example via Canvas:newImageData.
2022-04-18 10:46:02 -03:00
Alex Szpakowski
7f3538d2ba
Merge branch 'main' into 12.0-development
2022-01-05 21:10:27 -04:00
Alex Szpakowski
8e7fd10b6f
Update copyright year for 2022
2021-12-31 18:33:40 -04:00
Alex Szpakowski
433190d1df
Merge branch 'master' into 12.0-development
2021-06-06 11:43:54 -03:00
Alex Szpakowski
d419795a28
Expand stb_image thread-local workaround to apply to iOS devices
2021-05-30 21:12:45 -03:00
Alex Szpakowski
042b0ffe31
Fix previous workaround commit...
2021-05-30 16:06:11 -03:00
Alex Szpakowski
f20c637dd6
iOS: Fix simulator build
2021-05-30 16:04:37 -03:00
Alex Szpakowski
9b4aea8f17
Missed some copyright date updates
2021-04-07 20:34:24 -03:00
Alex Szpakowski
21f5ba86d3
Merge branch 'master' into 12.0-development
2021-04-07 20:33:44 -03:00
Alex Szpakowski
f89aabb0bb
Update copyright year for 2021
2021-04-04 16:14:45 -03:00
Alex Szpakowski
5db1e835ce
Prevent stb_image from exporting public symbols in the love dll
2020-03-07 16:09:40 -04:00
Alex Szpakowski
12c90b3dca
Merge Image and Canvas GL backend classes into new common Texture class.
2020-02-07 20:29:21 -04:00
Alex Szpakowski
5f9b5a21d0
Merge default into minor
...
--HG--
branch : minor
2020-01-03 22:45:36 -04:00
Alex Szpakowski
fc4847c69d
Update copyright for the new year
2020-01-03 22:40:36 -04:00
Alex Szpakowski
f3b52f66fe
Update the internal naming convention for pixel formats.
...
--HG--
branch : minor
2019-12-23 23:38:04 -04:00
Alex Szpakowski
fe2c204a2c
Use Data:getFFIPointer instead of Data:getPointer for internal ImageData and SoundData FFI code.
2019-10-27 19:07:58 -03:00
Alex Szpakowski
4f093a0b6b
Support loading BGRA8 dds files into RGBA8 images.
2019-09-22 12:47:49 -03:00
Alex Szpakowski
a5ccfe4394
More clamping and rounding instead of truncating in ImageData:paste format conversion code, to match the behaviour of other color conversion code.
2019-09-21 22:20:16 -03:00
Alex Szpakowski
42a8107b07
Fix a compile error
2019-09-21 22:13:36 -03:00
Alex Szpakowski
2bf5a04937
Use a generic slow path for ImageData:paste between formats when we don't already have a faster path for it, instead of erroring.
2019-09-21 22:13:10 -03:00
Alex Szpakowski
e11d43507e
Reorganize ImageData:set/mapPixel code so less of it is in the Lua wrapper and more of it is in the ImageData class itself.
2019-09-21 21:48:03 -03:00
Alex Szpakowski
c4fac73dc4
ImageData and Images now support the rg11b10f format.
2019-09-21 14:46:45 -03:00
Alex Szpakowski
b5da34ffb1
very minor code style change for consistency
2019-09-21 11:08:55 -03:00
Alex Szpakowski
94c66918a8
Add support for rgba4, rgb5a1, rgb565, and rgb10a2 ImageData formats. Also fix normalized 8 and 16 bit per component ImageData to round instead of floor (post-converted fixed point) fractional values in setPixel and mapPixel.
2019-09-21 11:02:40 -03:00
Alex Szpakowski
0d2de019c3
Fix ImageData:getPixel and ImageData:mapPixel when 1- and 2-component formats are used and the JIT compiler isn't available.
2019-09-18 20:23:32 -03:00
Alex Szpakowski
d6e37ec4aa
Add support for loading DDS files that contain raw/uncompressed pixel data. Resolves issue #1097 .
2019-09-17 22:40:11 -03:00
Alex Szpakowski
a6f8e7dac6
Improve detection of sRGB texture formats in dds files (doesn't currently affect any exposed API).
2019-09-15 19:08:25 -03:00
Alex Szpakowski
9ab2a94037
Rename internal C++ Color struct to Color32 to help differentiate it from Colorf.
2019-09-14 23:13:40 -03:00
Alex Szpakowski
cb4b45dcf1
Add Data:getFFIPointer. Similar to Data:getPointer but returns a cdata pointer directly (or nil if the FFI isn't available).
...
It should be preferred instead of Data:getPointer because the latter uses lightuserdata which can't store more all possible memory addresses on some new arm64 architectures, when LuaJIT is used.
2019-07-20 10:47:58 -03:00
Alex Szpakowski
2a534893b1
Small ImageData code cleanup.
2019-06-04 20:33:44 -03:00
Alex Szpakowski
44fd8b4e19
Update TinyEXR
2019-06-02 11:35:52 -03:00
Alex Szpakowski
372a55c6ac
ImageData supports more formats: r8, rg8, r16, rg16, r16f, rg16f, r32f, rg32f. Format conversion via ImageData:paste is not supported for those (yet).
2019-04-28 12:09:16 -03:00
Alex Szpakowski
0752f27bdf
Update copyright year for 2019
2019-01-03 21:09:05 -04:00
Alex Szpakowski
39201af79f
Improve the error message when an invalid layer or face index is given in love.graphics.setMode.
2018-01-14 19:15:24 -04:00