Skip to content

Commit

Permalink
Added: ImageUtil library
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNicker committed Nov 16, 2023
1 parent a6fafe6 commit c93dc35
Show file tree
Hide file tree
Showing 12 changed files with 1,466 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
[submodule "External/TinyEXIF"]
path = External/TinyEXIF
url = https://github.com/OpenImageViewer/TinyEXIF.git
[submodule "External/ExoticNumbers"]
path = External/ExoticNumbers
url = https://github.com/OpenImageViewer/ExoticNumbers.git
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ include_directories(./External/LLUtils/Include)
option(IMCODEC_DISABLE_WARNINGS_EXTERNAL_LIBS "Disable warnings for external libraries" TRUE)


option(IMCODEC_BUILD_IMAGE_UTIL "Build Image util" TRUE)
option(IMCODEC_BUILD_CODEC_PSD "Build Codec PSD" TRUE)
option(IMCODEC_BUILD_CODEC_JPG "Build Codec JPG" TRUE)
option(IMCODEC_BUILD_CODEC_PNG "Build Codec PNG" TRUE)
Expand Down Expand Up @@ -73,6 +74,11 @@ add_subdirectory(./External/TinyEXIF)

add_subdirectory(ImageCodec)

if (IMCODEC_BUILD_IMAGE_UTIL)
add_subdirectory(ImageUtil)
endif()


if (IMCODEC_BUILD_EXAMPLES AND IMCODEC_BUILD_CODEC_JPG AND IMCODEC_BUILD_CODEC_PNG)
add_subdirectory(Example)
endif()
1 change: 1 addition & 0 deletions External/ExoticNumbers
Submodule ExoticNumbers added at 09af31
11 changes: 11 additions & 0 deletions ImageUtil/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
file(GLOB_RECURSE sourceFiles
"./Source/*.h"
"./Source/*.cpp"
)

set(TargetName ImageUtil)
add_library (${TargetName} STATIC ${sourceFiles})

target_include_directories(${TargetName} PRIVATE ./Include)
target_include_directories(${TargetName} PRIVATE ./Source)
target_include_directories(${TargetName} PRIVATE ../External/ExoticNumbers/Include)
29 changes: 29 additions & 0 deletions ImageUtil/Include/ImageUtil/AxisAlignedTransform.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once
#include <LLUtils/EnumClassBitwise.h>

namespace IMUtil
{
enum AxisAlignedRotation
{
None = 0
, Rotate90CW = 1
, Rotate180 = 2
, Rotate90CCW = 3
};

enum class AxisAlignedFlip
{
None = 0 << 0
, Horizontal = 1 << 0
, Vertical = 1 << 1
};


struct AxisAlignedTransform
{
AxisAlignedRotation rotation;
AxisAlignedFlip flip;
};
}

LLUTILS_DEFINE_ENUM_CLASS_FLAG_OPERATIONS(IMUtil::AxisAlignedFlip)
Loading

0 comments on commit c93dc35

Please sign in to comment.