Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (44 sloc) 1.82 KB
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# From: Johan van der Knijff <johan.vanderknijff@kb.nl>
#
# JPEG 2000 formats + codestreams
#
# 1. JPEG 2000 formats: JP2, JPX, JPM and MJ2
# modified from original entry by David Santinoli <david@santinoli.com>
#
# Modifications: added sub-entries for JP2, JPX, JPM and MJ2 formats; added mimetypes
#
# First look for generic JPEG 2000 signature (which identifies it as belonging to the JPEG 2000
# file format family); then establish the sub-format from value of 'Brand' field
0 string \x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A JPEG 2000
# Now read value of 'Brand' field, which yields a few possibilities:
>20 string \x6a\x70\x32\x20 Part 1 (JP2)
!:mime image/jp2
>20 string \x6a\x70\x78\x20 Part 2 (JPX)
!:mime image/jpx
>20 string \x6a\x70\x6d\x20 Part 6 (JPM)
!:mime image/jpm
>20 string \x6d\x6a\x70\x32 Part 3 (MJ2)
!:mime video/mj2
#
#
# 2. JPEG 2000 Codestream
# modified from original entry by Petr Splichal <psplicha@redhat.com>
#
# Modifications:
# 1. Removed last byte from Petr's entry (was x00), which is part of Lsiz field and may
# actually have non-zero value!
# 2. Renamed descriptor to JPEG 2000 Codestream (was JPEG-2000 Code Stream Bitmap data)
# There's no mimetype for codestreams
0 string \xff\x4f\xff\x51 JPEG 2000 Codestream