Skip to content

Commit

Permalink
Merge pull request #14 from umjammer/1.0.12
Browse files Browse the repository at this point in the history
1.0.12
  • Loading branch information
umjammer authored Feb 20, 2024
2 parents 96b7aa9 + 398138b commit 39f9c7d
Show file tree
Hide file tree
Showing 21 changed files with 323 additions and 183 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
analyze:
name: Analyze
runs-on: macos-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
Expand All @@ -30,24 +34,30 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Build
run: |
brew install ffmpeg
mvn -B install --file pom.xml
mvn -B install --file pom.xml -Dmaven.test.skip=true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
20 changes: 11 additions & 9 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: GitHub Packages (only ffmpeg)
name: GitHub Release Assets

on:
release:
Expand All @@ -7,16 +7,16 @@ on:
jobs:
build:

runs-on: macos-latest
runs-on: macos-14

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
Expand All @@ -25,9 +25,11 @@ jobs:
- name: Build with Maven
run: |
brew install ffmpeg
mvn -B package --file pom.xml
mvn -B package --file pom.xml -Dmaven.test.skip=true
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml -Dmaven.test.skip=true
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
files: target/classes/natives/osx_arm64/libFfmpegResampleOpWrapper.dylib
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push]
jobs:
build:

runs-on: macos-latest
runs-on: macos-14

steps:
- name: Checkout repository
Expand All @@ -15,10 +15,10 @@ jobs:
if: ${{ contains(github.event.head_commit.message, 'bump version') }}
run: grep "<version>" pom.xml | head -1 | grep -v SNAPSHOT

- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: maven

Expand Down
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[![Release](https://jitpack.io/v/umjammer/vavi-image.svg)](https://jitpack.io/#umjammer/vavi-image)
[![Java CI](https://github.com/umjammer/vavi-image/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/vavi-image/actions/workflows/maven.yml)
[![CodeQL](https://github.com/umjammer/vavi-image/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/umjammer/vavi-image/actions/workflows/codeql-analysis.yml)
[![GitHub Packages (only ffmpeg)](https://github.com/umjammer/vavi-image/actions/workflows/maven-publish.yml/badge.svg)](https://github.com/umjammer/vavi-image/actions/workflows/maven-publish.yml)
![Java](https://img.shields.io/badge/Java-8-b07219)
![Java](https://img.shields.io/badge/Java-17-b07219)

# vavi-image

Expand Down Expand Up @@ -33,18 +32,17 @@

## Quantization

| type |quality|comment|
|----------------------------------------------------------------------------------|---|---|
| [`ImageMagick`](src/main/java/vavi/awt/image/quantization/ImageMagikQuantizeOp.java) |||
| `NeuralNet` |👑|https://github.com/umjammer/vavi-image-sandbox/wiki/OctTree_vs_NeuralNet|
| `OctTree` |||
| type |quality| comment |
|----------------------------------------------------------------------------------|---|----------------------------------------------------------------------------------------|
| [`ImageMagick`](src/main/java/vavi/awt/image/quantization/ImageMagikQuantizeOp.java) || |
| `NeuralNet` |👑| [comparison](https://github.com/umjammer/vavi-image-sandbox/wiki/OctTree-vs-NeuralNet) |
| `OctTree` || |

## Installation

* maven: https://jitpack.io/#umjammer/vavi-image
* if you want to use ffmpeg resizing
* [pom.xml](https://github.com/umjammer/vavi-image/wiki/Install-ffmpeg-native-library)
* exec jvm w/ `java.library.path` system property e.g `-Djava.library.path=/target/test-classes`
* exec jvm w/ `java.library.path` system property e.g `-Djava.library.path=/opt/homebrew/lib`

## TODO

Expand All @@ -54,13 +52,13 @@
* `BufferedImageOp` ???
* https://github.com/iariro/N88BasicImage
* ~~ffmpeg resize 4byte 32bit operation is wrong~~
* DaVinchi (wip)
* n88basic image format (wip)
* yet another pic image format (wip)
* DaVinchi (wip, branch:davinch)
* n88basic image format (wip, branch:n88basic)
* yet another pic image format (wip, branch:pic)

## Tech Know

* Mac Open JDK's JNI library extension is `.dylib`
* ~~Mac Open JDK's JNI library extension is `.dylib`~~ already common
* ~~`libsescale` has MMX bug, this causes segmentation fault when resizing image.~~

## References
Expand All @@ -71,7 +69,7 @@

### Image I/O PPM Reader

Public Domain
🅮 Public Domain

### ImageMagik

Expand Down
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jdk:
- openjdk17
1 change: 1 addition & 0 deletions local.properties.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
brew.prefix=/user/local
Loading

0 comments on commit 39f9c7d

Please sign in to comment.