Skip to content

Commit 974d5a2

Browse files
authored
Merge pull request #321 from drewnoakes/pentax-makernote
Basic Pentax Type 2 makernote support
2 parents b8b9ceb + 55fc56b commit 974d5a2

File tree

7 files changed

+984
-0
lines changed

7 files changed

+984
-0
lines changed

MetadataExtractor/Formats/Exif/ExifTiffHandler.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,11 @@ private bool ProcessMakernote(in TiffReaderContext context, int makernoteOffset)
707707
// Always in Motorola byte order
708708
TiffReader.ProcessIfd(this, context.WithByteOrder(isMotorolaByteOrder: true).WithShiftedBaseOffset(makernoteOffset), 8);
709709
}
710+
else if (firstTenChars.Equals("PENTAX \0II", StringComparison.Ordinal))
711+
{
712+
PushDirectory(new PentaxType2MakernoteDirectory());
713+
TiffReader.ProcessIfd(this, context.WithByteOrder(isMotorolaByteOrder: false).WithShiftedBaseOffset(makernoteOffset), 10);
714+
}
710715
}
711716
else if (string.Equals(firstTenChars, "Apple iOS\0", StringComparison.Ordinal))
712717
{
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) Drew Noakes and contributors. All Rights Reserved. Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
2+
3+
namespace MetadataExtractor.Formats.Exif.Makernotes
4+
{
5+
public sealed class PentaxType2MakernoteDescriptor : TagDescriptor<PentaxType2MakernoteDirectory>
6+
{
7+
public PentaxType2MakernoteDescriptor(PentaxType2MakernoteDirectory directory)
8+
: base(directory)
9+
{
10+
}
11+
}
12+
}

MetadataExtractor/Formats/Exif/makernotes/PentaxType2MakernoteDirectory.cs

Lines changed: 335 additions & 0 deletions
Large diffs are not rendered by default.

MetadataExtractor/PublicAPI/net35/PublicAPI.Unshipped.txt

Lines changed: 158 additions & 0 deletions
Large diffs are not rendered by default.

MetadataExtractor/PublicAPI/net45/PublicAPI.Unshipped.txt

Lines changed: 158 additions & 0 deletions
Large diffs are not rendered by default.

MetadataExtractor/PublicAPI/netstandard1.3/PublicAPI.Unshipped.txt

Lines changed: 158 additions & 0 deletions
Large diffs are not rendered by default.

MetadataExtractor/PublicAPI/netstandard2.0/PublicAPI.Unshipped.txt

Lines changed: 158 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)