Commit Graph

4 Commits

Author SHA1 Message Date
Ozkan Sezer b08e7b1168 Some more image.c / lodepng / stb_image_write clean-ups:
image.c: define LODEPNG_NO_COMPILE_CPP for lodepng.c.
image.c: define STB_IMAGE_WRITE_STATIC for stb_image_write.h
image.c: minor whitespace tidy-up.
stb_image_write.h: remove extern declaration for now non-existing
 stbi_write_tga_with_rle (missed in commit r1468).
stb_image_write.h: comment out stbi_write_jpg_to_func() which quakespasm
 doesn't use.
lodepng.c (lodepng_save_file): remove unneeded (char*) cast from buffer.
lodepng.c (lodepng_read32bitInt): make it static.
lodepng.c (lodepng_get_raw_size_lct): make it static, and move below to
 the place it is actually used.
lodepng.c (lodepng_info_swap): remove (unused function).
lodepng.c (readChunk_zTXt,readChunk_iTXt,addChunk_zTXt, addChunk_iTXt):
 add missing const to casts on const pointers in zlib_compress() calls.
 (see: https://github.com/lvandeve/lodepng/pull/34).
lodepng.c (inflateHuffmanBlock): wrong error code if huffmanDecodeSymbol
 fail. (see: https://github.com/lvandeve/lodepng/pull/52).

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1471 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-09 20:00:08 +00:00
Ozkan Sezer 1e728fa2ad - stb_image_write.h: keep only the jpg writer, the only thing we use
in quakespasm, and remove all others.
- image.c: disable decoder, ancillary chunks and error text support
  by defining the relevant LODEPNG_NO_??? macros.
  (Image_WritePNG): make use of upsidedown parameter for symmetry
  with Image_WriteJPG(). print an error message in case of encoding
  failure if error text support is enabled.
  (Image_WriteSTB): rename to Image_WriteJPG, adjust for jpg writing
  only. remove the old Image_WriteJPG wrapper.
  (enum imageformat_t): remove.
  (CopyFlipped): constify the data parameter.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1468 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-09 11:33:44 +00:00
Ozkan Sezer 1eb57d8cbe stb_image_write.h: fix build with watcom
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1466 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-08 09:37:06 +00:00
Eric Wasylishen 4a02827fe6 SCR_ScreenShot_f: change default format to png, using stb_image_write
Add optional format and quality args to "screenshot" command,
can specify tga, png, jpg

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1465 af15c1b1-3010-417e-b628-4374ebc0bcbd
2017-08-08 05:07:56 +00:00