Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified LICENSE
100755 → 100644
Empty file.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
RIA (Reference Image Application) is a cross platform image organizer for both Windows and Linux designed to help artists organize their reference material through the use of tags and folders. RIA supports PNG, JPEG, and WebP images.

# Installation
Download the latest verion from release page for your operating system or compile it from source and run RIA. Note that RIA expects the icon image to be in the image folder in the directory you run it from.
Download the latest verion from release page for your OS or compile it from source and run RIA.
> **_Windows:_** You do not need to run the install script if RIA runs without issues.
>
> **_Linux:_** The install script moves RIA into /usr/local/bin and adds a desktop entry and icon. RIA can run without the script being used.

### Tested Distros:
- Arch
Expand Down Expand Up @@ -50,19 +53,19 @@ Download the latest verion from release page for your operating system or compil

**V** - Flip selected images vertically

> **_FOR MORE INFO:_** Open help.html or press the help button in RIA
> **_FOR MORE INFO:_** Press the help button in RIA


## Folder View (**TAB**)
Contains saved paths to folders that contain the images that you want to tag/use.

**DELETE** (While hovered over a main folder) - Remove the folder from the view.

**LMB Click** (Folder) - Expand a folder and display its contents. If a file is tagged, a white box will be displayed on the left side of the file.
**LMB Click** (Folder) - Expand a folder and display its contents.

**LMB Click** (File) - Load the image into the preview on the bottom right side of the screen. Files that already have been tagged are indicated with a white bar to the left of the file name.

**Ctrl + R** - Refresh locations
**Ctrl + R or Click the folder header** - Refresh locations

**The "+" Button** - Add a new location to the view.

Expand All @@ -86,13 +89,13 @@ Only contains images that have been tagged under said tags.
**The "edit" Button** (Tag header) - Edit an existing tag.

# Image Packs (**Image Pack Button**)
Image packs are an experimental idea that saves pre-tagged files so they can easily be shared between users. Follow the below instructions for how to create an image pack. Image packs use folders a categories instead of tags and relies on the images to be manually tagged by one users before being shared. While importing an image pack, it gives you the option to exclude folders in the image pack from being imported. EX) An image pack has 3 categories: Buildings, Landscapes, and Clothes. A user can choose to only import images from the Buildings and Landscapes folder and all the images in the Clothes folder will remain without being added to RIA.
Image packs are an experimental idea that saves pre-tagged files so they can easily be shared between users. Follow the below instructions for how to create an image pack. Image packs use folders a categories instead of tags and relies on the images to be manually tagged by one users before being shared. While importing an image pack, you will be given option to exclude folders in the image pack from being imported. EX) An image pack has 3 folders: Buildings, Landscapes, and Clothes. A user can choose to only import images from the Buildings and Landscapes folder and all the images in the Clothes folder will remain without being added to RIA.
> **_NOTE:_** When creating an image pack, it only checks the tags that are in your program. If you hit the create button on a previously imported image pack and removed some of the tags prior, it will overwrite the import file and remove the untagged images from the import file.

Importing Image Packs
---------
1) Select and image pack and press the import button. A dot will appear next to the selected image pack.
2) Select/deselect the folders from the image pack you want to import. A dot is again used to indicate if the folder is going to be imported.
1) Select an image pack and press the import button. A dot will appear next to the selected image pack.
2) Select/deselect the folders from the image pack you want to import. A dot is used to indicate if the folder is going to be imported.
3) Verify you want to import the tags. Pressing the sub tag button will enable/disable importing sub tags.
> **_NOTE:_** Imported tags do not overwrite existing tags with the same name

Expand Down Expand Up @@ -167,16 +170,19 @@ Linux:
```
g++ main.cpp src/dependencies/linux/glad/glad.c -o RIA -I/usr/include/freetype2 -lstdc++fs -lglfw -lGL -lXrandr -lX11 -lpthread -ldl -static-libgcc -lwebp -lfreetype
```
> **_NOTE:_** Be sure to set UBUNTU to 1 in "config.hpp" before compiling.
> **_NOTE:_** If you are having problems with the filesystem libraries, try setting UBUNTU to 1 in the include.hpp file before compiling

Windows:
```
g++ main.cpp src\dependencies\windows\glad\glad.c -o RIA "src\dependencies\windows\glfw\libglfw3.a" -lopengl32 -lgdi32 -lole32 -loleaut32 -luuid -Lwebp freetype.dll libwebp.dll -static -static-libgcc -static-libstdc++
g++ main.cpp src\dependencies\windows\glad\glad.c -o RIA "src\dependencies\windows\glfw\libglfw3.a" -Isrc/dependencies/libwebp/include -Isrc/dependencies/freetype -lopengl32 -lgdi32 -lole32 -loleaut32 -luuid -Lwebp freetype.dll libwebp.dll -static -static-libgcc -static-libstdc++
```

> **_NOTE:_** The command may vary between distros/OS.

# Troubleshooting
### UI buttons are saved in board screenshots on Wayland desktops
Wayland is weird and only gives corrupt data when trying to take a screenshot without the UI buttons. It works on X11 and Windows. For the time being, the UI will be still be captured on Wayland desktops until a work around is found.

### Error while loading shared libraries: libglfw3.so
Install libglfw3-dev, glfw, or glfw-devel depending on your operating system

Expand Down
Empty file modified icon.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 69 additions & 24 deletions include.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,61 @@

#define FONTTYPE 1
#define PDC_DEBUG 1
#define PDC_VSYNC 0
#define UBUNTU 0 // Set to 1 to use older filesystem libraries
#define DEBUG 0 // Set to 1 to print debug information to a terminal
#define DEBUG 1 // Set to 1 to print debug information to a terminal

#include "src/pdc/pdc.hpp"
#if UBUNTU
#include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#else
#include <filesystem>
namespace fs = std::filesystem;
#endif

#include "src/pdc/PDC.hpp"
#include "src/pdc/classes/basic/variable.hpp"
using namespace pdc;

#include "src/pdc/src/fps.cpp" // Wayland vsync freezing work around


#include <webp/decode.h>
#include <thread> // Multi threading is used for saving
#include <thread> // Multi threading is used for saving and loading
#include <sys/stat.h>
#include <map>

// Common Classes
#include "src/functions/shaders.hpp"
#include "src/classes/object.hpp"
//#include "src/functions/shaders.hpp"

bool showTutorial = false;


// Functions and variables
#include "src/colors.hpp"
#include "src/functions.hpp"
#include "src/variables.hpp"

#include "src/classes/board.hpp"
#include "src/classes/tag.hpp"
#include "src/classes/table.hpp"
#include "src/classes/image_container.hpp"

// Functions are declared here because they rely on classes
void DrawFolders(float, float*, Vector2, Table*);
bool Duplicate(string img, vector<File>* list);
Tag FilterTag(Tag, vector<File>);
void ImportTag(Tag, Tag*);
vector<Tag> LoadTags(ifstream*, bool, bool);
void SaveTags(ofstream*, vector<Tag>, bool);
bool SortTag(Tag, Tag);

ImageContainer previewImg;


#include "src/classes/file.hpp"
#include "src/functions/sort.cpp"

enum Warnings{
WARNING_LOCATION,
WARNING_TAG,
WARNING_SUBTAG,
WARNING_BOARD
};

#include "src/classes/tag.hpp"
#include "src/classes/location.hpp"


#ifdef _WIN32
#include "src/functions/os_win.cpp"
const char *usrHome = "";
Expand All @@ -47,26 +69,49 @@ bool SortTag(Tag, Tag);
struct passwd *pw = getpwuid(getuid());
const char *usrHome = pw->pw_dir;
#endif
#include "src/classes/mouseMenu.hpp"

#include "src/functions/handler.cpp"
#include "src/functions/clipboard.cpp"
#include "src/windows/main/main_window.hpp"
#include "src/classes/board.hpp"

#include "src/classes/mouse_menu.hpp"


#include "src/functions/window_events.cpp"
#include "src/windows/warning.hpp"
#include "src/windows/board_window.hpp"


// Functions are declared here because they rely on classes
void DrawFolders(float, float*, Vector2, Location*);
bool Duplicate(string img, vector<File>* list);
Tag FilterTag(Tag, vector<File>);
void ImportTag(Tag, Tag*);
vector<Tag> LoadTags(ifstream*, bool, bool);
void SaveTags(ofstream*, vector<Tag>, bool);
bool SortTag(Tag t1, Tag t2){return SortString(t1.name, t2.name);}


#include "src/windows/tag.cpp"
#include "src/functions/clipboard.cpp"
#include "src/windows/main/boards.cpp"
#include "src/windows/main/main_render.cpp"
#include "src/windows/main/right_menu_input.cpp"
#include "src/windows/main/left_menu_input.cpp"
#include "src/windows/main/main_input.cpp"
#include "src/windows/main/left_menu_input.cpp"
#include "src/windows/main/right_menu_input.cpp"

#include "src/windows/import/import_render.cpp"
#include "src/windows/import/import_input.cpp"

#include "src/windows/main/tutorial_render.cpp"
#include "src/windows/main/tutorial_input.cpp"

#include "src/functions/tag.cpp"

#include "src/functions/save.cpp"
#include "src/functions/load.cpp"

#include "src/windows/import/import_render.cpp"
#include "src/windows/import/import_input.cpp"
#include "src/windows/downloader/downloader_render.cpp"
#include "src/windows/downloader/downloader_input.cpp"



#endif
Binary file added main
Binary file not shown.
Loading