소스 검색

Changing JPG compression (#1463)

Since I don't think the purpose of raylib is to save space compressing image, I think it could be a good idea to keep quality from 90 to 100.
pull/1464/head
Andrea Fontana 4 년 전
committed by GitHub
부모
커밋
ef0dcaabf9
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      src/textures.c

+ 1
- 1
src/textures.c 파일 보기

@ -428,7 +428,7 @@ bool ExportImage(Image image, const char *fileName)
else if (IsFileExtension(fileName, ".tga")) success = stbi_write_tga(fileName, image.width, image.height, channels, imgData); else if (IsFileExtension(fileName, ".tga")) success = stbi_write_tga(fileName, image.width, image.height, channels, imgData);
#endif #endif
#if defined(SUPPORT_FILEFORMAT_JPG) #if defined(SUPPORT_FILEFORMAT_JPG)
else if (IsFileExtension(fileName, ".jpg")) success = stbi_write_jpg(fileName, image.width, image.height, channels, imgData, 80); // JPG quality: between 1 and 100
else if (IsFileExtension(fileName, ".jpg")) success = stbi_write_jpg(fileName, image.width, image.height, channels, imgData, 90); // JPG quality: between 1 and 100
#endif #endif
#if defined(SUPPORT_FILEFORMAT_KTX) #if defined(SUPPORT_FILEFORMAT_KTX)
else if (IsFileExtension(fileName, ".ktx")) success = SaveKTX(image, fileName); else if (IsFileExtension(fileName, ".ktx")) success = SaveKTX(image, fileName);

불러오는 중...
취소
저장