Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Functions | |
parse_box (buffer, offset) | |
parse_marker (buffer, offset) | |
rewrite_jp2c (buffer) | |
main (in_file, out_file) | |
Variables | |
int | BOX_HEADER_SIZE = 8 |
str | BOX_TAG_JP2C = b'jp2c' |
int | MARKER_SIZE = 2 |
int | MARKER_START = 0xff |
int | MARKER_TAG_IGNORE = 0x00 |
int | MARKER_TAG_COMMENT = 0x64 |
int | MARKER_TAG_FILL = 0xff |
Strips comments from a JP2 file. This is a simple filter script to strip comments from a JP2 file, in order to save a few bytes from the final file size.
testing.tools.strip_jp2_comments.main | ( | in_file, | |
out_file ) |
Definition at line 105 of file strip_jp2_comments.py.
References main(), testing.tools.strip_jp2_comments.parse_box(), and testing.tools.strip_jp2_comments.rewrite_jp2c().
testing.tools.strip_jp2_comments.parse_box | ( | buffer, | |
offset ) |
Parses the next box in a JP2 file. Args: buffer: A buffer containing the JP2 file contents. offset: The starting offset into the buffer. Returns: A tuple (next_offset, tag) where next_offset is the ending offset, and tag is the type tag. The box contents will be buffer[offset + 8:next_offset].
Definition at line 24 of file strip_jp2_comments.py.
Referenced by testing.tools.strip_jp2_comments.main().
testing.tools.strip_jp2_comments.parse_marker | ( | buffer, | |
offset ) |
Parses the next marker in a codestream. Args: buffer: A buffer containing the codestream. offset: The starting offset into the buffer. Returns: A tuple (next_offset, tag) where next_offset is the offset after the marker, and tag is the type tag. If no marker was found, next_offset will point to the end of the buffer, and tag will be None. A marker is always 2 bytes.
Definition at line 39 of file strip_jp2_comments.py.
Referenced by testing.tools.strip_jp2_comments.rewrite_jp2c().
testing.tools.strip_jp2_comments.rewrite_jp2c | ( | buffer | ) |
Definition at line 76 of file strip_jp2_comments.py.
References bytearray, and testing.tools.strip_jp2_comments.parse_marker().
Referenced by testing.tools.strip_jp2_comments.main().
int testing.tools.strip_jp2_comments.BOX_HEADER_SIZE = 8 |
Definition at line 14 of file strip_jp2_comments.py.
Definition at line 15 of file strip_jp2_comments.py.
int testing.tools.strip_jp2_comments.MARKER_SIZE = 2 |
Definition at line 17 of file strip_jp2_comments.py.
int testing.tools.strip_jp2_comments.MARKER_START = 0xff |
Definition at line 18 of file strip_jp2_comments.py.
int testing.tools.strip_jp2_comments.MARKER_TAG_COMMENT = 0x64 |
Definition at line 20 of file strip_jp2_comments.py.
int testing.tools.strip_jp2_comments.MARKER_TAG_FILL = 0xff |
Definition at line 21 of file strip_jp2_comments.py.
int testing.tools.strip_jp2_comments.MARKER_TAG_IGNORE = 0x00 |
Definition at line 19 of file strip_jp2_comments.py.