mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 22:44:30 +02:00
Compare commits
3 Commits
chrome-m10
...
1.2.3
Author | SHA1 | Date | |
---|---|---|---|
e626925cef | |||
bfad7ab589 | |||
c2e3fd30c4 |
@ -509,18 +509,19 @@ endif()
|
||||
|
||||
if(WEBP_BUILD_LIBWEBPMUX)
|
||||
parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "")
|
||||
add_library(webpmux ${WEBP_MUX_SRCS})
|
||||
target_link_libraries(webpmux webp)
|
||||
target_include_directories(webpmux
|
||||
add_library(libwebpmux ${WEBP_MUX_SRCS})
|
||||
target_link_libraries(libwebpmux webp)
|
||||
target_include_directories(libwebpmux
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set_version(mux/Makefile.am webpmux webpmux)
|
||||
set_target_properties(webpmux
|
||||
set_version(mux/Makefile.am libwebpmux webpmux)
|
||||
set_target_properties(libwebpmux
|
||||
PROPERTIES PUBLIC_HEADER
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h;\
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h;")
|
||||
list(APPEND INSTALLED_LIBRARIES webpmux)
|
||||
set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux)
|
||||
list(APPEND INSTALLED_LIBRARIES libwebpmux)
|
||||
configure_pkg_config("src/mux/libwebpmux.pc")
|
||||
endif()
|
||||
|
||||
@ -534,7 +535,7 @@ if(WEBP_BUILD_GIF2WEBP)
|
||||
exampleutil
|
||||
imageioutil
|
||||
webp
|
||||
webpmux
|
||||
libwebpmux
|
||||
${WEBP_DEP_GIF_LIBRARIES})
|
||||
target_include_directories(gif2webp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
install(TARGETS gif2webp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
@ -551,7 +552,7 @@ if(WEBP_BUILD_IMG2WEBP)
|
||||
imagedec
|
||||
imageioutil
|
||||
webp
|
||||
webpmux)
|
||||
libwebpmux)
|
||||
target_include_directories(img2webp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
install(TARGETS img2webp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
@ -601,12 +602,10 @@ if(WEBP_BUILD_WEBPMUX)
|
||||
# webpmux
|
||||
parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "WEBPMUX_SRCS"
|
||||
"webpmux")
|
||||
add_executable(webpmux_app ${WEBPMUX_SRCS})
|
||||
set_target_properties(webpmux_app PROPERTIES OUTPUT_NAME webpmux)
|
||||
target_link_libraries(webpmux_app exampleutil imageioutil webpmux webp)
|
||||
target_include_directories(webpmux_app
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
install(TARGETS webpmux_app RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
add_executable(webpmux ${WEBPMUX_SRCS})
|
||||
target_link_libraries(webpmux exampleutil imageioutil libwebpmux webp)
|
||||
target_include_directories(webpmux PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
install(TARGETS webpmux RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
||||
if(WEBP_BUILD_EXTRAS)
|
||||
@ -738,6 +737,10 @@ write_basic_package_version_file(
|
||||
|
||||
# Create the Config file.
|
||||
include(CMakePackageConfigHelpers)
|
||||
# Fix libwebpmux reference. The target name libwebpmux is used for
|
||||
# compatibility purposes, but the library mentioned in WebPConfig.cmake should
|
||||
# be the unprefixed version.
|
||||
list(TRANSFORM INSTALLED_LIBRARIES REPLACE "libwebpmux" "webpmux")
|
||||
configure_package_config_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmake/WebPConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/WebPConfig.cmake
|
||||
|
@ -13,14 +13,15 @@
|
||||
|
||||
#include "src/webp/encode.h"
|
||||
|
||||
#if !defined(WEBP_REDUCE_SIZE)
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "src/enc/vp8i_enc.h"
|
||||
|
||||
#if !defined(WEBP_REDUCE_SIZE)
|
||||
#include "src/utils/rescaler_utils.h"
|
||||
#include "src/utils/utils.h"
|
||||
#endif // !defined(WEBP_REDUCE_SIZE)
|
||||
|
||||
#define HALVE(x) (((x) + 1) >> 1)
|
||||
|
||||
@ -56,6 +57,7 @@ static int AdjustAndCheckRectangle(const WebPPicture* const pic,
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if !defined(WEBP_REDUCE_SIZE)
|
||||
int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) {
|
||||
if (src == NULL || dst == NULL) return 0;
|
||||
if (src == dst) return 1;
|
||||
@ -81,6 +83,7 @@ int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif // !defined(WEBP_REDUCE_SIZE)
|
||||
|
||||
int WebPPictureIsView(const WebPPicture* picture) {
|
||||
if (picture == NULL) return 0;
|
||||
@ -120,6 +123,7 @@ int WebPPictureView(const WebPPicture* src,
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if !defined(WEBP_REDUCE_SIZE)
|
||||
//------------------------------------------------------------------------------
|
||||
// Picture cropping
|
||||
|
||||
@ -277,23 +281,6 @@ int WebPPictureCopy(const WebPPicture* src, WebPPicture* dst) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int WebPPictureIsView(const WebPPicture* picture) {
|
||||
(void)picture;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int WebPPictureView(const WebPPicture* src,
|
||||
int left, int top, int width, int height,
|
||||
WebPPicture* dst) {
|
||||
(void)src;
|
||||
(void)left;
|
||||
(void)top;
|
||||
(void)width;
|
||||
(void)height;
|
||||
(void)dst;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int WebPPictureCrop(WebPPicture* pic,
|
||||
int left, int top, int width, int height) {
|
||||
(void)pic;
|
||||
|
Reference in New Issue
Block a user