Skip to content

Detecting Quantization Table By JpegSegmentReader #684

@borkluce

Description

@borkluce

I want to detect Quantization Table of a compressed image.

{
byte[] jpegData = File.ReadAllBytes(path);
IEnumerable<JpegSegment> jpegSegments = JpegSegmentReader.ReadSegments(path);
foreach (var segment in jpegSegments)
{

    if (segment.Type.ToString() == "Dqt")
    {
        (DqtValuesForLuminance, DqtValuesForChrominance) = Print8x8Matrix(segment.Bytes);

    }
}
}

This is how the codes I am working on, calculate it. And you know, there are 2 QTables: Chrominance Table and Luminance Table.

But I can't find how to detect luminance or chrominance values. I want to learn it by searching the documentations but I can't find decumentation for JpegSegment or JpegSegmentReader classes. Can you help me a bit?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions