Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metadream/photowise
https://github.com/metadream/photowise
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/metadream/photowise
- Owner: metadream
- Created: 2024-07-01T09:36:23.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-09-15T12:52:22.000Z (4 months ago)
- Last Synced: 2024-11-23T00:08:11.673Z (about 2 months ago)
- Language: Java
- Size: 45.6 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Photowise
## TODO
- 移动端适配
- 用户管理:guest/public/只读权限、菜单setting与权限
- 地图添加点:leaflet
- 国际化
- 时间轴
- 设置:语言、回收站清理周期(1天、1周、1月);public,protected,private
- 清空回收站:同时删除索引、trash文件、缩略图
- photowall独立成组件,可自由关联controlbar,type module和window.分开写
- 定时任务:获取OSM同时设置地点
- 扫描、目录监听测试```
@GetMapping("/test/video/stream")
public void streaming(HttpServletResponse response) throws IOException {
response.setHeader("Content-Type", "image/jpeg");
VideoCapture capture = new VideoCapture("./video.mp4");HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.IMAGE_JPEG);Mat mat = new Mat();
if (capture.read(mat)) {
MatOfByte buff = new MatOfByte();
Imgcodecs.imencode(".jpg", mat, buff);
byte[] bytes = buff.toArray();resourceHandler.copy(new ByteArrayInputStream(bytes), response.getOutputStream());
}
}
```## Dependencies
Build opencv and create opencv_java.jar and libopencv_java4100.so
```
sudo apt update && sudo apt install -y cmake g++ wget unzip
wget -O opencv-4.10.0.zip https://github.com/opencv/opencv/archive/4.10.0.zip
unzip opencv-4.10.0.zipmkdir -p build && cd build
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
cmake -DBUILD_SHARED_LIBS=OFF ../opencv-4.10.0
make -j8
```## Deployment
```
# vi /etc/systemd/system/photowise.service[Unit]
Description=Photowise Service
After=syslog.target[Service]
WorkingDirectory=/root/photowise
ExecStart=/usr/bin/java -jar /root/photowise/photowise-0.0.1-SNAPSHOT.jar
SuccessExitStatus=143
Restart=always
RestartSec=30[Install]
WantedBy=multi-user.target
```