Alex Szpakowski
5fabd64aea
Improved the error message when an unsupported file format is used with love.image.newImageData or love.graphics.newImage.
2015-10-19 15:54:53 -03:00
Alex Szpakowski
99acec83c9
Renamed some internal functions to avoid name conflicts when some third-party code is #included.
2015-08-03 20:27:46 -03:00
Alex Szpakowski
2168d509b3
Reworked ImageData:encode:
...
- It now returns a FileData containing the encoded ImageData.
- The first argument is now the format to encode to.
- The second argument is now the filename to write to, and is optional. No file will be written if a filename is not given.
2015-07-04 22:30:09 -03:00
Bart van Strien
e3ff0a0d63
Fix possible segfault when a DecodeHandler fails to decode an image properly
2015-06-23 13:35:32 +02:00
Alex Szpakowski
aac595525a
Cleaned up some ImageData code.
2015-06-14 01:01:44 -03:00
Alex Szpakowski
c3fd7a25a3
Fixed some misc. compiler warnings.
2015-05-23 12:45:58 -03:00
Alex Szpakowski
60e8cc24bf
Removed iOS-specific code to decode and encode images using the ImageIO framework (it's now redundant.)
2015-05-03 20:49:06 -03:00
Alex Szpakowski
5dbf589d47
Removed libjpeg-turbo as a dependency (closes issue #1031.) Removed jpeg support for ImageData:encode. stb_image now handles jpeg image loading.
2015-05-03 17:52:20 -03:00
Alex Szpakowski
a29b349014
Added love.math.compress(data, format [, level]) and love.math.decompress(compresseddata) / love.math.decompress(compressedstring, format).
...
Renamed the love.image CompressedData type to CompressedImageData.
love.math.compress returns a love.math CompressedData object which holds the newly compressed data. Currently supported formats are "lz4" and "zlib". Note that the formats are not file formats and don't compress filesystem hierarchies.
2015-03-23 11:28:14 -03:00
Alex Szpakowski
d31168c0e0
Cleaned up some graphics code.
2015-03-20 00:16:36 -03:00
Alex Szpakowski
7741adc7b4
Switched back to zlib decompression for PNG images and fixed a memory leak issue when decompressing.
2015-03-19 17:08:44 -03:00
Alex Szpakowski
5138acaee5
Temporarily disabled zlib decompression for PNG images, in favour of LodePNG's built-in decompression code.
2015-03-19 14:41:15 -03:00
Alex Szpakowski
bf5f0b4175
bmp isn't a supported format for ImageData:encode.
...
--HG--
branch : minor
2015-03-01 23:38:34 -04:00
Alex Szpakowski
b9c90e8a6f
Fixed the background color for the error screen, and updated LodePNG to the latest version.
...
--HG--
branch : minor
2015-02-27 21:20:31 -04:00
Alex Szpakowski
ebc68023a7
Fix many warnings about implicit integer conversions when compiling for 64 bits.
...
--HG--
branch : minor
2015-02-20 01:20:08 -04:00
Alex Szpakowski
24c7539182
Updated some Xcode project settings
...
--HG--
branch : minor
2015-02-18 23:04:01 -04:00
Alex Szpakowski
28f4f42454
Cleaned up the code for determining whether an image can be decoded using stb_image.
...
--HG--
branch : minor
2015-02-18 00:43:09 -04:00
Alex Szpakowski
d0300a4fa7
Made the TurboJPEG code for decoding and encoding images disable-able.
...
--HG--
branch : minor
2015-02-18 00:18:47 -04:00
Alex Szpakowski
482b61187f
Added a new backend for loading and saving images using Apple's ImageIO framework. It's not enabled on any platform yet.
...
--HG--
branch : minor
2015-02-17 17:56:40 -04:00
Alex Szpakowski
18ab3973e8
Added support for ETC2/EAC compressed textures. Changed the CompressedFormat enum names to capitalize the format names (e.g. "PVR1rgba4" instead of "pvr1rgba4".) Improved sRGB support for compressed textures.
...
--HG--
branch : minor
2015-01-20 07:53:44 -04:00
Alex Szpakowski
c1d4613ff7
Updated stb_image to 2.0.2.
...
--HG--
branch : minor
2015-01-20 03:40:08 -04:00
Alex Szpakowski
dfdd52e499
Added support for ETC1 and PVR1 compressed textures contained in KTX, PKM, and PVR files.
...
Most desktop graphics drivers don't support those formats.
--HG--
branch : minor
2015-01-20 03:18:28 -04:00
Alex Szpakowski
a7e4148869
Merged default into minor
...
--HG--
branch : minor
2015-01-16 15:47:26 -04:00
Alex Szpakowski
c7b45b3505
Updated copyright for the new year
2014-12-31 19:32:43 -04:00
Alex Szpakowski
8dba668ce9
Merged default into minor
...
--HG--
branch : minor
2014-11-15 20:17:18 -04:00
Alex Szpakowski
22bbe74ed9
Allow BC6 and BC7 compressed DDS files to be loaded into Images.
2014-11-05 21:11:22 -04:00
Alex Szpakowski
8d0654a6a7
Added runtime drag-and-drop file and folder support via new love.filedropped and love.directorydropped event callback functions. filedropped has a single File object argument, and directorydropped has a single string argument containing the full path of the directory, which can be used with love.filesystem.mount.
...
--HG--
branch : minor
2014-10-18 20:30:36 -03:00
Alex Szpakowski
cf7342f8b7
Use C++11's in-line member initializers instead of default constructors with initializer lists, for some structs.
...
--HG--
branch : minor
2014-09-18 02:39:18 -03:00
Alex Szpakowski
6f6bf6a2bb
Merged default into minor
...
--HG--
branch : minor
2014-08-30 22:08:10 -03:00
Alex Szpakowski
40c6821048
Removed some dead code and fixed luax_pushtype when the object argument is null.
2014-08-28 00:48:32 -03:00
Alex Szpakowski
52b62e8620
Fixed a case of using new[]/delete[] when malloc/free should have been used.
...
--HG--
branch : minor
2014-08-27 21:53:33 -03:00
Alex Szpakowski
df5e48a082
Merged default into minor
...
--HG--
branch : minor
2014-08-13 01:50:52 -03:00
Alex Szpakowski
9e93d854b8
love.image.isCompressed should return true if the file contains a compressed texture, even if the file's extension isn't 'dds'.
2014-08-12 18:09:07 -03:00
Alex Szpakowski
fcf8329369
Fixed detection of TGA and BMP images and updated stb_image to the latest version.
...
--HG--
branch : minor
2014-08-11 03:11:51 -03:00
Alex Szpakowski
43a148ce3e
Fixed detection of PNG images.
...
--HG--
branch : minor
2014-08-11 02:42:12 -03:00
Alex Szpakowski
a757315006
Removed runtime support for Mac OS 10.6 and switched from libstdc++ to libc++ in OS X. Now we can use C++11's standard library!
...
--HG--
branch : minor
2014-08-08 18:54:12 -03:00
Alex Szpakowski
51d1f2a7a9
Added support for loading TGA and BMP images (via stb_image.) Added support for encoding ImageData to TGA.
...
--HG--
branch : minor
2014-05-29 13:20:10 -03:00
Alex Szpakowski
f3701dc0e1
Fixed ImageData:encode
...
--HG--
branch : minor
2014-05-29 00:27:40 -03:00
rude
6da3105fe2
Fix some pointer type conversion errors in MSVC.
...
--HG--
branch : minor
2014-04-23 22:31:56 +02:00
Alex Szpakowski
eca8c17a69
Removed the DevIL backend from love.image. Replaced it with PNG and JPEG encoders/decoders via LodePNG, zlib, and libjpeg-turbo.
...
PNG and JPEG are now the only two supported image formats, aside from compressed DDS (DXT, etc.)
--HG--
branch : minor
2014-04-22 17:11:59 -03:00
Alex Szpakowski
a3afb1a9ca
Refactored the ImageData decoding/encoding backends a bit
2014-03-02 03:17:47 -04:00
Alex Szpakowski
3120a0e650
Goodbye 2013, hello 2014!
2014-01-03 17:28:58 -04:00
Alex Szpakowski
2ee869b0e8
Fixed some compiler warnings
2013-12-07 05:07:54 -04:00
Alex Szpakowski
4c4a385ce6
Updated CompressedData to store its data in a single block of memory, like other Data objects
2013-08-29 16:24:13 -03:00
Alex Szpakowski
96a668ecf3
Renamed CompressedData:getType to CompressedData:getFormat
2013-08-17 14:30:23 -03:00
Alex Szpakowski
e19ade38ab
Added support for BC4 (aka 3Dc+) compressed textures
2013-07-28 17:20:24 -03:00
Alex Szpakowski
01666f6c29
love.image.isCompressed now compares file extensions in a case-insensitive manner
2013-06-30 15:48:47 -03:00
Alex Szpakowski
b04a2fee87
Improved performance when using ImageData methods in multiple threads when ImageData:encode is called
2013-06-26 03:42:42 -03:00
Alex Szpakowski
f25efcc8af
Improved performance and reduced temporary memory usage of love.graphics.newScreenshot and Canvas:getImageData
2013-06-15 22:07:16 -03:00
Alex Szpakowski
03f5bd9a5a
Improved the performance of dds data loading (love.image.newCompressedData / love.graphics.newImage("myfile.dds"))
2013-06-14 08:43:07 -03:00