SIZMarker.h
Go to the documentation of this file.
/*
* Copyright (C) 2016-2023 Grok Image Compression Inc.
*
* This source code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This source code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* This source code incorporates work covered by the BSD 2-clause license.
* Please see the LICENSE file in the root directory for details.
*
*/
#pragma once
namespace grk
{
class CodeStreamDecompress;
class CodeStreamCompress;
class SIZMarker
{
public:
bool read(CodeStreamDecompress* codeStream, uint8_t* headerData, uint16_t header_size);
bool write(CodeStreamCompress* codeStream, BufferedStream* stream);
private:
void subsampleAndReduceHeaderImageComponents(GrkImage* headerImage, const CodingParams* p_cp);
};
} // namespace grk
grk::CodeStreamCompress
Definition CodeStreamCompress.h:29
grk::CodeStreamDecompress
Definition CodeStreamDecompress.h:38
grk::GrkImage
Definition GrkImage.h:25
grk::SIZMarker
Definition SIZMarker.h:30
grk::SIZMarker::write
bool write(CodeStreamCompress *codeStream, BufferedStream *stream)
Write the SIZ marker (image and tile size)
Definition SIZMarker.cpp:268
grk::SIZMarker::read
bool read(CodeStreamDecompress *codeStream, uint8_t *headerData, uint16_t header_size)
Decompress a SIZ marker (image and tile size)
Definition SIZMarker.cpp:61
grk::SIZMarker::subsampleAndReduceHeaderImageComponents
void subsampleAndReduceHeaderImageComponents(GrkImage *headerImage, const CodingParams *p_cp)
Apply resolution reduction to header image components.
Definition SIZMarker.cpp:31
grk
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk::grk_read
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
grk::BufferedStream
Definition BufferedStream.h:35
grk::CodingParams
Coding parameters.
Definition CodingParams.h:245