-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(heif): decoding issue when width is not aligned
- Loading branch information
Showing
7 changed files
with
113 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
imageio-heif/src/main/java21/com/github/gotson/nightmonkeys/heif/lib/enums/HeifChannel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.github.gotson.nightmonkeys.heif.lib.enums; | ||
|
||
import com.github.gotson.nightmonkeys.heif.lib.panama.heif_h; | ||
|
||
public enum HeifChannel { | ||
HEIF_CHANNEL_Y(heif_h.heif_channel_Y()), | ||
HEIF_CHANNEL_CB(heif_h.heif_channel_Cb()), | ||
HEIF_CHANNEL_CR(heif_h.heif_channel_Cr()), | ||
HEIF_CHANNEL_R(heif_h.heif_channel_R()), | ||
HEIF_CHANNEL_G(heif_h.heif_channel_G()), | ||
HEIF_CHANNEL_B(heif_h.heif_channel_B()), | ||
HEIF_CHANNEL_ALPHA(heif_h.heif_channel_Alpha()), | ||
HEIF_CHANNEL_INTERLEAVED(heif_h.heif_channel_interleaved()), | ||
; | ||
|
||
private final int val; | ||
|
||
HeifChannel(int val) { | ||
this.val = val; | ||
} | ||
|
||
public int intValue() { | ||
return val; | ||
} | ||
|
||
public static HeifChannel fromId(int id) { | ||
for (HeifChannel type : values()) { | ||
if (type.intValue() == id) { | ||
return type; | ||
} | ||
} | ||
return null; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
imageio-heif/src/main/java21/com/github/gotson/nightmonkeys/heif/lib/enums/HeifChroma.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.github.gotson.nightmonkeys.heif.lib.enums; | ||
|
||
import com.github.gotson.nightmonkeys.heif.lib.panama.heif_h; | ||
|
||
public enum HeifChroma { | ||
HEIF_CHROMA_UNDEFINED(heif_h.heif_chroma_undefined()), | ||
HEIF_CHROMA_MONOCHROME(heif_h.heif_chroma_monochrome()), | ||
HEIF_CHROMA_420(heif_h.heif_chroma_420()), | ||
HEIF_CHROMA_422(heif_h.heif_chroma_422()), | ||
HEIF_CHROMA_444(heif_h.heif_chroma_444()), | ||
HEIF_CHROMA_INTERLEAVED_RGB(heif_h.heif_chroma_interleaved_RGB()), | ||
HEIF_CHROMA_INTERLEAVED_RGBA(heif_h.heif_chroma_interleaved_RGBA()), | ||
HEIF_CHROMA_INTERLEAVED_RRGGBB_BE(heif_h.heif_chroma_interleaved_RRGGBB_BE()), | ||
HEIF_CHROMA_INTERLEAVED_RRGGBBAA_BE(heif_h.heif_chroma_interleaved_RRGGBBAA_BE()), | ||
HEIF_CHROMA_INTERLEAVED_RRGGBB_LE(heif_h.heif_chroma_interleaved_RRGGBB_LE()), | ||
HEIF_CHROMA_INTERLEAVED_RRGGBBAA_LE(heif_h.heif_chroma_interleaved_RRGGBBAA_LE()); | ||
|
||
private final int val; | ||
|
||
HeifChroma(int val) { | ||
this.val = val; | ||
} | ||
|
||
public int intValue() { | ||
return val; | ||
} | ||
|
||
public static HeifChroma fromId(int id) { | ||
for (HeifChroma type : values()) { | ||
if (type.intValue() == id) { | ||
return type; | ||
} | ||
} | ||
return null; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...io-heif/src/main/java21/com/github/gotson/nightmonkeys/heif/lib/enums/HeifColorSpace.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.github.gotson.nightmonkeys.heif.lib.enums; | ||
|
||
import com.github.gotson.nightmonkeys.heif.lib.panama.heif_h; | ||
|
||
public enum HeifColorSpace { | ||
HEIF_COLOR_SPACE_UNDEFINED(heif_h.heif_colorspace_undefined()), | ||
HEIF_COLOR_SPACE_YCBCR(heif_h.heif_colorspace_YCbCr()), | ||
HEIF_COLOR_SPACE_RGB(heif_h.heif_colorspace_RGB()), | ||
HEIF_COLOR_SPACE_MONOCHROME(heif_h.heif_colorspace_monochrome()); | ||
|
||
private final int val; | ||
|
||
HeifColorSpace(int val) { | ||
this.val = val; | ||
} | ||
|
||
public int intValue() { | ||
return val; | ||
} | ||
|
||
public static HeifColorSpace fromId(int id) { | ||
for (HeifColorSpace type : values()) { | ||
if (type.intValue() == id) { | ||
return type; | ||
} | ||
} | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.