Skip to content

Commit 96b7aa9

Browse files
authored
Merge pull request #12 from umjammer/1.0.11
1.0.11
2 parents b8e22e2 + ace2f1c commit 96b7aa9

File tree

71 files changed

+3183
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3183
-190
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4646
# If this step fails, then you should remove it and run the build manually (see below)
47-
- name: build
47+
- name: Build
4848
run: |
4949
brew install ffmpeg
5050
mvn -B install --file pom.xml

.github/workflows/maven-publish.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,24 @@ jobs:
1010
runs-on: macos-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
14-
- name: Set up JDK 1.8
15-
uses: actions/setup-java@v3
16-
with:
17-
java-version: '8'
18-
distribution: 'temurin'
19-
cache: maven
20-
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
21-
settings-path: ${{ github.workspace }} # location for the settings.xml file
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
2215

23-
- name: Build with Maven
24-
run: |
25-
brew install ffmpeg
26-
mvn -B package --file pom.xml
16+
- name: Set up JDK 8
17+
uses: actions/setup-java@v3
18+
with:
19+
java-version: '8'
20+
distribution: 'temurin'
21+
cache: maven
22+
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
23+
settings-path: ${{ github.workspace }} # location for the settings.xml file
2724

28-
- name: Publish to GitHub Packages Apache Maven
29-
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml -Dmaven.test.skip=true
30-
env:
31-
GITHUB_TOKEN: ${{ github.token }}
25+
- name: Build with Maven
26+
run: |
27+
brew install ffmpeg
28+
mvn -B package --file pom.xml
29+
30+
- name: Publish to GitHub Packages Apache Maven
31+
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml -Dmaven.test.skip=true
32+
env:
33+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/maven.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,21 @@ jobs:
88
runs-on: macos-latest
99

1010
steps:
11-
- uses: actions/checkout@v3
12-
- name: Set up JDK 1.8
13-
uses: actions/setup-java@v3
14-
with:
15-
java-version: '8'
16-
distribution: 'temurin'
17-
cache: maven
18-
- name: Build with Maven
19-
run: |
20-
brew install ffmpeg
21-
mvn -B package --file pom.xml
11+
- name: Checkout repository
12+
uses: actions/checkout@v3
13+
14+
- name: Check w/o SNAPSHOT when "bump version"
15+
if: ${{ contains(github.event.head_commit.message, 'bump version') }}
16+
run: grep "<version>" pom.xml | head -1 | grep -v SNAPSHOT
17+
18+
- name: Set up JDK 8
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: '8'
22+
distribution: 'temurin'
23+
cache: maven
24+
25+
- name: Build with Maven
26+
run: |
27+
brew install ffmpeg
28+
mvn -B package --file pom.xml

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* [artmaster 88](http://fileformats.archiveteam.org/wiki/ArtMaster88) (old school japanese pc-8801,9801 image format)
1414
* [mag](https://ja.wikipedia.org/wiki/MAG%E3%83%95%E3%82%A9%E3%83%BC%E3%83%9E%E3%83%83%E3%83%88) (maki-chan graphic loader: old school japanese pc-8801,9801 image format)
1515
* [zim](https://ja.wikipedia.org/wiki/%E3%83%84%E3%82%A1%E3%82%A4%E3%83%88#Z's_STAFF) (z's staff kid: old school japanese 9801 image format)
16+
* [maki](https://mooncore.eu/bunny/txt/makichan.htm) (old school japanese pc-8801,9801,x68000 image format)
17+
* [pic](https://ja.wikipedia.org/wiki/PIC_(%E7%94%BB%E5%83%8F%E5%9C%A7%E7%B8%AE)) (old school japanese x68000 image format)
18+
* [pi](http://justsolve.archiveteam.org/wiki/Pi_(image_format)) (old school japanese pc-9801 image format)
1619
* [windows bitmap](https://www.google.co.jp/books/edition/Windows3_1%E3%82%B0%E3%83%A9%E3%83%95%E3%82%A3%E3%83%83%E3%82%AF%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9/YEYsAgAACAAJ?hl=ja)
1720
* gif ([non lzw](https://web.archive.org/web/20161106215528/http://homepage1.nifty.com/uchi/software.htm))
1821
* windows icon
@@ -50,12 +53,15 @@
5053
* Lanczos3 filter using AWT API
5154
* `BufferedImageOp` ???
5255
* https://github.com/iariro/N88BasicImage
53-
* ffmpeg resize 4byte 32bit operation is wrong
56+
* ~~ffmpeg resize 4byte 32bit operation is wrong~~
57+
* DaVinchi (wip)
58+
* n88basic image format (wip)
59+
* yet another pic image format (wip)
5460

5561
## Tech Know
5662

5763
* Mac Open JDK's JNI library extension is `.dylib`
58-
* `libsescale` has MMX bug, this causes segmentation fault when resizing image.
64+
* ~~`libsescale` has MMX bug, this causes segmentation fault when resizing image.~~
5965

6066
## References
6167

pom.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>vavi</groupId>
88
<artifactId>vavi-image</artifactId>
9-
<version>1.0.10-SNAPSHOT</version>
9+
<version>1.0.11</version>
1010

1111
<name>Vavi Imaging API</name>
1212
<organization>
@@ -113,11 +113,10 @@
113113
</executions>
114114
</plugin>
115115

116-
117116
<plugin>
118117
<groupId>org.apache.maven.plugins</groupId>
119118
<artifactId>maven-install-plugin</artifactId>
120-
<version>3.0.0-M1</version>
119+
<version>3.0.1</version>
121120
<executions>
122121
<execution>
123122
<id>install-library</id>
@@ -153,7 +152,7 @@
153152
-->
154153
<groupId>org.codehaus.mojo</groupId>
155154
<artifactId>exec-maven-plugin</artifactId>
156-
<version>1.6.0</version>
155+
<version>3.1.0</version>
157156
<executions>
158157
<execution>
159158
<id>deploy-library</id>
@@ -180,6 +179,12 @@
180179
</configuration>
181180
</plugin>
182181

182+
<plugin>
183+
<!-- ⚠⚠⚠ AD-HOC after 2.5 causes #13 ⚠⚠⚠ -->
184+
<artifactId>maven-jar-plugin</artifactId>
185+
<version>2.5</version>
186+
</plugin>
187+
183188
<plugin>
184189
<groupId>org.apache.maven.plugins</groupId>
185190
<artifactId>maven-surefire-plugin</artifactId>
@@ -224,7 +229,7 @@
224229
<dependency>
225230
<groupId>org.junit</groupId>
226231
<artifactId>junit-bom</artifactId>
227-
<version>5.9.0</version>
232+
<version>5.9.2</version>
228233
<type>pom</type>
229234
<scope>import</scope>
230235
</dependency>
@@ -235,7 +240,7 @@
235240
<dependency>
236241
<groupId>com.github.umjammer</groupId>
237242
<artifactId>vavi-commons</artifactId>
238-
<version>1.1.8</version>
243+
<version>1.1.9</version>
239244
</dependency>
240245
<dependency>
241246
<groupId>com.github.umjammer</groupId>

src/main/java/vavi/awt/image/am88/ArtMasterImage.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
/**
2121
* ArtMasterImage.
22+
* <p>
23+
* magic SS_SIF
24+
* separated RGB RLE
2225
*
2326
* @author <a href="mailto:umjammer@gmail.com">Naohide Sano</a> (umjammer)
2427
* @version 0.00 2019/04/10 umjammer initial version <br>
@@ -96,7 +99,7 @@ public ArtMasterImage(InputStream in) throws IOException {
9699

97100
for (int i = 0; i < 3; i++) {
98101

99-
byte[] g = null;
102+
byte[] g;
100103
int count = 0;
101104

102105
switch (buf[19 + i]) {

src/main/java/vavi/awt/image/bmp/WindowsBitmap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public void setUsedColor(int colors) {
181181
system16IndexColorModel = new IndexColorModel(4, 16, reds, greens, blues);
182182

183183
// 256
184-
String colorTablePath = null;
184+
String colorTablePath;
185185
// if ("".equals(System.getProperty("os.type"))) {
186186
colorTablePath = "/vavi/awt/image/resources/WindowsSystem.ACT";
187187
// }

src/main/java/vavi/awt/image/gif/NonLzwGifDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public byte[] decode(byte[] data,
8181

8282
byte[] vram = new byte[height * bytesPerLine];
8383
int[] lzw = new int[8192]; // 圧縮データ格納用配列(辞書テーブルではない!)
84-
int code = 0; // 符号化コード初期化
84+
int code; // 符号化コード初期化
8585

8686
// DIB データ書き込み用構造体初期化
8787
RgbContext rgb = new RgbContext();

src/main/java/vavi/awt/image/ico/WindowsIcon.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class WindowsIcon {
5656
private BufferedImage image;
5757

5858
/** マスク */
59-
private byte mask[];
59+
private byte[] mask;
6060

6161
/** アイコンを作成します. */
6262
public WindowsIcon(WindowsIconDevice device, WindowsBitmap bitmap) {

src/main/java/vavi/awt/image/ico/WindowsIconImageSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public synchronized void addConsumer(ImageConsumer ic) {
6262
ic.setColorModel(cm);
6363
//Debug.println(image.getType() + ", " + cm);
6464
ic.setHints(ImageConsumer.TOPDOWNLEFTRIGHT | ImageConsumer.COMPLETESCANLINES | ImageConsumer.SINGLEPASS | ImageConsumer.SINGLEFRAME);
65-
int[] buf = image.getRGB(0, 0, width, height, (int[]) null, 0, width);
65+
int[] buf = image.getRGB(0, 0, width, height, null, 0, width);
6666
//Debug.println(buf.length + ", " + width * height);
6767
ic.setPixels(0, 0, width, height, ColorModel.getRGBdefault(), buf, 0, width); // colorModel ???
6868
ic.imageComplete(ImageConsumer.STATICIMAGEDONE);

0 commit comments

Comments
 (0)