Reading quantization tables of JPEG file on Android
BioGeek opened this issue · 1 comments
BioGeek commented
I'm trying to read the quantization tables of a JPEG file on Android.
It seems that JPEGDecoder reads the quantization tables.
But I'm still a beginner with Kotlin so I haven't yet figured out how I go from a string with the path to the JPEG file to printing out the quantization tables.
(Also asked on Stackoverflow)
Thanks in advance!
soywiz commented
Replied here: https://soywiz.slack.com/archives/C03B2H44G/p1592924847022800
class JPEGDecoder {
public var loadedQuantizationTables: Array<IntArray>? = null // Add this line to store quantizationTables
In line 753:
https://github.com/korlibs/korim/blob/aa77f4b7fc48ff9f9c746ba4e3610e775af3e03a/old/korim-jpeg/src/commonMain/kotlin/com/soywiz/korim/format/jpg/JPEGDecoder.kt#L752
After the while loop, you can add:
loadedQuantizationTables = quantizationTables