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
f6cdbdc868
Merge branch 'main' into 12.0-development
2022-12-31 22:46:34 -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
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
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
4f093a0b6b
Support loading BGRA8 dds files into RGBA8 images.
2019-09-22 12:47:49 -03:00
Alex Szpakowski
c4fac73dc4
ImageData and Images now support the rg11b10f format.
2019-09-21 14:46:45 -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
44fd8b4e19
Update TinyEXR
2019-06-02 11:35:52 -03:00
Alex Szpakowski
0752f27bdf
Update copyright year for 2019
2019-01-03 21:09:05 -04:00
Bart van Strien
e80247c191
Happy new year! ✨
2018-01-03 19:47:35 +01:00
Alex Szpakowski
f69affebc9
Update tinyexr.
2017-12-17 21:42:04 -04:00
Alex Szpakowski
a41f78dfe4
Simplified some compressed image parsing code.
...
--HG--
branch : minor
2017-08-30 22:25:26 -03:00
Alex Szpakowski
2dd6408d00
Images/[Compressed]ImageData can be created using any Data, instead of just files or FileData.
...
--HG--
branch : minor
2017-08-05 23:55:20 -03:00
Alex Szpakowski
b129d49a6c
Move Color.h from modules/graphics/ to common/
...
--HG--
branch : minor
2017-08-01 23:53:44 -03:00
Alex Szpakowski
84d5d8b636
Move decoder-agnostic love.image code out of the magpie backend folder.
...
--HG--
branch : minor
2017-08-01 23:22:24 -03:00
Alex Szpakowski
5ef6730497
Added a variant of love.graphics.captureScreenshot which takes a single filename parameter. Resolves issue #1293 .
...
--HG--
branch : minor
2017-07-29 12:54:53 -03:00
Alex Szpakowski
b568e267eb
Reorganized the ImageData decoding/encoding implementation slightly.
...
--HG--
branch : minor
2017-07-21 21:37:48 -03:00
Alex Szpakowski
60f898af67
Fix a crash when loading .pvr compressed texture.
...
--HG--
branch : minor
2017-04-01 21:20:08 -03:00
Alex Szpakowski
73fd45558b
Implement Array, Cubemap, and Volume texture types (issue #1111 ).
...
- Add love.graphics.newArrayImage, newCubeImage, and newVolumeImage.
- Add love.graphics.newCanvas(w, h, layers) and newCanvas(w, h, layers, settings). Add ‘type’ field to the settings table of newCanvas.
- Add new love.graphics.setCanvas variants: setCanvas(canvas, slice), and setCanvas(canvastable) where canvastable is in the format: {{canvas1, layer=2}, {canvas2, face=5}}
- Add Texture:getTextureType, getDepth, getLayerCount, getMipmapCount, and getFormat.
- Remove Image:getData and Image:refresh.
- Add Image:replacePixels(imagedata [, slice] [, mipmap]).
- Update Canvas:newImageData to accept a slice argument.
- Add love.image.newCubeFaces(imagedata).
--HG--
branch : minor
2017-02-20 14:58:13 -04:00
Raidho
8572a33880
Prettifyed the code exploiting inheritance rules
...
added missing comma, added missing `override`
--HG--
branch : minor
2017-02-10 18:36:47 +03:00
Raidho
6ea1ebde9c
Data:clone ported to minor
...
minor tweaks
--HG--
branch : minor
2017-02-10 06:19:53 +03:00
Alex Szpakowski
abb72cb813
Happy new year! 🥂
...
--HG--
branch : minor
2017-01-02 01:28:29 -04:00
Alex Szpakowski
0a3adc0839
Unify pixel format enums for ImageData, CompressedImageData, and Canvas into a single PixelFormat enum.
...
Replace love.graphics.getRawImageFormats and love.graphics.getCompressedImageFormats with love.graphics.getImageFormats.
--HG--
branch : minor
2016-11-27 22:53:23 -04:00
Alex Szpakowski
60d90ca4a8
Merge default into minor
...
--HG--
branch : minor
2016-10-30 01:07:39 -03:00
Alex Szpakowski
5ba449d1ff
Add support for BC4-7 compressed texture formats in KTX files. Updated the changelog.
2016-10-29 23:42:40 -03:00
Alex Szpakowski
c6f8a1535d
Fixed loading and saving 16 bit per component PNGs.
...
--HG--
branch : minor
2016-10-28 00:13:36 -03:00
Alex Szpakowski
3de1aa863a
Fix encoding ImageData to 16 bit per color channel PNG.
...
--HG--
branch : minor
2016-10-27 22:23:24 -03:00
Alex Szpakowski
27044e6eb8
Update tinyexr.
...
--HG--
branch : minor
2016-10-18 23:30:52 -03:00
Alex Szpakowski
e71f95595c
ImageData (and Images loaded from them) now support different data formats. Resolves issue #1048 .
...
Currently exposed formats are rgba8 and rgba16 (normalized), and rgba16f and rgba32f (floating-point). Some systems, especially mobile ones, won't support every format when creating a love.graphics Image. Use love.graphics.getRawImageFormats to check for support.
love.image.newImageData now takes an optional format parameter as its third argument when creating an empty sized ImageData. It defaults to rgba8.
16-bit PNGs, .hdr images, and floating-point OpenEXR images can now be loaded via love.image.newImageData and love.graphics.newImage.
--HG--
branch : minor
2016-05-22 15:28:20 -03:00
Alex Szpakowski
8d7481c3b2
Improved the error message given when jpeg, TGA, and BMP images fail to decode.
2016-02-28 12:41:27 -04:00