├── .editorconfig ├── .gitattributes ├── .github └── workflows │ ├── codeql.yml │ ├── mac.yml │ ├── ubuntu.yml │ └── windows.yml ├── .gitignore ├── .gitmodules ├── AUTHORS ├── COPYING ├── ChangeLog ├── Directory.Build.props ├── Directory.Build.targets ├── Directory.Packages.props ├── NEWS ├── README.md ├── TaglibSharp.slnx ├── examples ├── BatchSet │ ├── BatchSet.csproj │ └── Program.cs ├── GenerateTestFixture │ ├── GenerateTestFixture.csproj │ └── Program.cs ├── ListSupportedMimeTypes │ ├── ListSupportedMimeTypes.csproj │ └── Program.cs ├── ParsePhoto │ ├── ParsePhoto.csproj │ └── Program.cs ├── ReadFromUri │ ├── Program.cs │ └── ReadFromUri.csproj ├── SetPictures │ ├── Program.cs │ └── SetPictures.csproj ├── StripImageData │ ├── Program.cs │ └── StripImageData.csproj ├── covers │ ├── sample_a.jpg │ ├── sample_a.png │ ├── sample_b.jpg │ ├── sample_b.png │ ├── sample_c.jpg │ └── sample_c.png ├── extractKey.cpp └── listData.cpp ├── global.json ├── src ├── Debug │ ├── Debug.csproj │ └── Program.cs └── TaglibSharp │ ├── Aac │ ├── AudioHeader.cs │ ├── BitStream.cs │ └── File.cs │ ├── Aiff │ ├── File.cs │ └── StreamHeader.cs │ ├── Ape │ ├── File.cs │ ├── Footer.cs │ ├── Item.cs │ ├── StreamHeader.cs │ └── Tag.cs │ ├── Asf │ ├── ContentDescriptionObject.cs │ ├── ContentDescriptor.cs │ ├── DescriptionRecord.cs │ ├── ExtendedContentDescriptionObject.cs │ ├── File.cs │ ├── FilePropertiesObject.cs │ ├── Guid.cs │ ├── HeaderExtensionObject.cs │ ├── HeaderObject.cs │ ├── MetadataLibraryObject.cs │ ├── Object.cs │ ├── PaddingObject.cs │ ├── StreamPropertiesObject.cs │ ├── Tag.cs │ └── UnknownObject.cs │ ├── Audible │ ├── File.cs │ └── Tag.cs │ ├── ByteVector.cs │ ├── ByteVectorList.cs │ ├── CombinedTag.cs │ ├── CorruptFileException.cs │ ├── Debugger.cs │ ├── Dsf │ ├── File.cs │ └── StreamHeader.cs │ ├── File.cs │ ├── FileTypes.cs │ ├── Flac │ ├── Block.cs │ ├── BlockHeader.cs │ ├── File.cs │ ├── Picture.cs │ └── StreamHeader.cs │ ├── Genres.cs │ ├── Gif │ ├── Codec.cs │ ├── File.cs │ └── GifCommentTag.cs │ ├── ICodec.cs │ ├── IFD │ ├── Entries │ │ ├── ByteIFDEntry.cs │ │ ├── ByteVectorIFDEntry.cs │ │ ├── LongArrayIFDEntry.cs │ │ ├── LongIFDEntry.cs │ │ ├── MakernoteIFDEntry.cs │ │ ├── Rational.cs │ │ ├── RationalArrayIFDEntry.cs │ │ ├── RationalIFDEntry.cs │ │ ├── SByteIFDEntry.cs │ │ ├── SLongArrayIFDEntry.cs │ │ ├── SLongIFDEntry.cs │ │ ├── SRational.cs │ │ ├── SRationalArrayIFDEntry.cs │ │ ├── SRationalIFDEntry.cs │ │ ├── SShortArrayIFDEntry.cs │ │ ├── SShortIFDEntry.cs │ │ ├── ShortArrayIFDEntry.cs │ │ ├── ShortIFDEntry.cs │ │ ├── StringIFDEntry.cs │ │ ├── StripOffsetsIFDEntry.cs │ │ ├── SubIFDArrayEntry.cs │ │ ├── SubIFDEntry.cs │ │ ├── ThumbnailDataIFDEntry.cs │ │ ├── UndefinedIFDEntry.cs │ │ └── UserCommentIFDEntry.cs │ ├── IFDDirectory.cs │ ├── IFDEntry.cs │ ├── IFDEntryType.cs │ ├── IFDReader.cs │ ├── IFDRenderer.cs │ ├── IFDStructure.cs │ ├── IFDTag.cs │ ├── Makernotes │ │ └── Nikon3MakernoteReader.cs │ └── Tags │ │ ├── CanonFileInfoEntryTag.cs │ │ ├── CanonMakerNoteEntryTag.cs │ │ ├── CanonPictureInfoEntryTag.cs │ │ ├── ExifEntryTag.cs │ │ ├── GPSEntryTag.cs │ │ ├── IFDEntryTag.cs │ │ ├── IOPEntryTag.cs │ │ ├── Nikon3MakerNoteEntryTag.cs │ │ ├── NikonIsoInfoEntryTag.cs │ │ ├── NikonLensData3EntryTag.cs │ │ ├── NikonPictureControlEntryTag.cs │ │ ├── NikonPreviewMakerNoteEntryTag.cs │ │ ├── NikonShotInfoEntryTag.cs │ │ ├── NikonVibrationReductionEntryTag.cs │ │ ├── NikonWorldTimeEntryTag.cs │ │ ├── OlympusMakerNoteEntryTag.cs │ │ ├── PanasonicMakerNoteEntryTag.cs │ │ ├── PentaxMakerNoteEntryTag.cs │ │ └── SonyMakerNoteEntryTag.cs │ ├── IIM │ ├── IIMReader.cs │ └── IIMTag.cs │ ├── ILazy.cs │ ├── Id3v1 │ ├── StringHandler.cs │ └── Tag.cs │ ├── Id3v2 │ ├── EventTimeCode.cs │ ├── EventType.cs │ ├── ExtendedHeader.cs │ ├── Footer.cs │ ├── Frame.cs │ ├── FrameFactory.cs │ ├── FrameHeader.cs │ ├── FrameTypes.cs │ ├── Frames │ │ ├── AttachmentFrame.cs │ │ ├── ChapterFrame.cs │ │ ├── CommentsFrame.cs │ │ ├── EventTimeCodeFrame.cs │ │ ├── MusicCdIdentifierFrame.cs │ │ ├── PlayCountFrame.cs │ │ ├── PopularimeterFrame.cs │ │ ├── PrivateFrame.cs │ │ ├── RelativeVolumeFrame.cs │ │ ├── SynchronizedLyricsFrame.cs │ │ ├── TableOfContentsFrame.cs │ │ ├── TermsOfUseFrame.cs │ │ ├── TextIdentificationFrame.cs │ │ ├── UniqueFileIdentifierFrame.cs │ │ ├── UnknownFrame.cs │ │ ├── UnsynchronisedLyricsFrame.cs │ │ └── UrlLinkFrame.cs │ ├── Header.cs │ ├── SynchData.cs │ ├── SynchedTextType.cs │ ├── Tag.cs │ └── TimestampFormat.cs │ ├── Image │ ├── Codec.cs │ ├── CombinedImageTag.cs │ ├── File.cs │ ├── ImageBlockFile.cs │ ├── ImageOrientation.cs │ ├── ImageTag.cs │ └── NoMetadata │ │ └── File.cs │ ├── Jpeg │ ├── Codec.cs │ ├── File.cs │ ├── JpegCommentTag.cs │ ├── Marker.cs │ └── Table.cs │ ├── ListBase.cs │ ├── Matroska │ ├── Attachment.cs │ ├── AudioTrack.cs │ ├── EBMLElement.cs │ ├── EBMLIDs.cs │ ├── EBMLreader.cs │ ├── File.cs │ ├── IUIDElement.cs │ ├── MatroskaIDs.cs │ ├── SimpleTag.cs │ ├── SubtitleTrack.cs │ ├── Tag.cs │ ├── Tags.cs │ ├── TargetType.cs │ ├── Track.cs │ └── VideoTrack.cs │ ├── Mpc │ ├── File.cs │ └── StreamHeader.cs │ ├── Mpeg │ ├── AudioFile.cs │ ├── AudioHeader.cs │ ├── File.cs │ ├── VBRIHeader.cs │ ├── VideoHeader.cs │ └── XingHeader.cs │ ├── Mpeg4 │ ├── AppleTag.cs │ ├── Box.cs │ ├── BoxFactory.cs │ ├── BoxHeader.cs │ ├── BoxTypes.cs │ ├── Boxes │ │ ├── AppleAdditionalInfoBox.cs │ │ ├── AppleAnnotationBox.cs │ │ ├── AppleDataBox.cs │ │ ├── AppleElementaryStreamDescriptor.cs │ │ ├── AppleItemListBox.cs │ │ ├── FullBox.cs │ │ ├── IsoAudioSampleEntry.cs │ │ ├── IsoChunkLargeOffsetBox.cs │ │ ├── IsoChunkOffsetBox.cs │ │ ├── IsoFreeSpaceBox.cs │ │ ├── IsoHandlerBox.cs │ │ ├── IsoMetaBox.cs │ │ ├── IsoMovieHeaderBox.cs │ │ ├── IsoSampleDescriptionBox.cs │ │ ├── IsoSampleEntry.cs │ │ ├── IsoSampleTableBox.cs │ │ ├── IsoUserDataBox.cs │ │ ├── IsoVisualSampleEntry.cs │ │ ├── TextBox.cs │ │ ├── UnknownBox.cs │ │ └── UrlBox.cs │ ├── File.cs │ └── FileParser.cs │ ├── NonContainer │ ├── EndTag.cs │ ├── File.cs │ ├── StartTag.cs │ └── Tag.cs │ ├── Ogg │ ├── Bitstream.cs │ ├── Codec.cs │ ├── Codecs │ │ ├── Opus.cs │ │ ├── Theora.cs │ │ └── Vorbis.cs │ ├── File.cs │ ├── GroupedComment.cs │ ├── Page.cs │ ├── PageHeader.cs │ ├── Paginator.cs │ └── XiphComment.cs │ ├── Picture.cs │ ├── PictureLazy.cs │ ├── Png │ ├── Codec.cs │ ├── File.cs │ └── PngTag.cs │ ├── Properties.cs │ ├── ReadOnlyByteVector.cs │ ├── Riff │ ├── AviHeaderList.cs │ ├── AviStream.cs │ ├── BitmapInfoHeader.cs │ ├── DivXTag.cs │ ├── File.cs │ ├── InfoTag.cs │ ├── List.cs │ ├── ListTag.cs │ ├── MovieIdTag.cs │ └── WaveFormatEx.cs │ ├── StringList.cs │ ├── SupportedMimeType.cs │ ├── Tag.cs │ ├── TaglibSharp.csproj │ ├── Tiff │ ├── Arw │ │ └── File.cs │ ├── BaseTiffFile.cs │ ├── Codec.cs │ ├── Cr2 │ │ └── File.cs │ ├── Dng │ │ └── File.cs │ ├── File.cs │ ├── Nef │ │ └── File.cs │ ├── Pef │ │ └── File.cs │ └── Rw2 │ │ ├── File.cs │ │ ├── IFDReader.cs │ │ └── IFDTag.cs │ ├── UnsupportedFormatException.cs │ ├── WavPack │ ├── File.cs │ └── StreamHeader.cs │ └── Xmp │ ├── XmlNodeExtensions.cs │ ├── XmpNode.cs │ ├── XmpNodeType.cs │ ├── XmpNodeVisitor.cs │ └── XmpTag.cs ├── taglib-sharp.pc.in ├── taglib-sharp.snk └── tests └── TaglibSharp.Tests ├── Collections ├── ByteVectorCollectionTest.cs ├── ByteVectorTest.cs ├── FileTest.cs ├── ImageBlockFileTest.cs └── StringCollectionTest.cs ├── FileFormats ├── AacFormatTest.cs ├── AiffFormatTest.cs ├── AsfFormatTest.cs ├── AudibleFormat.cs ├── AviFormatTest.cs ├── DsfFormatTest.cs ├── ExtendedTests.cs ├── FlacFormatTest.cs ├── IFormatTest.cs ├── Id3BothFormatTest.cs ├── Id3V1FormatTest.cs ├── Id3V24FormatTest.cs ├── Id3V2FormatTest.cs ├── JpegFormatTest.cs ├── M4aFormatTest.cs ├── M4vFormatTest.cs ├── MkvFormatTest.cs ├── MpcFormatTest.cs ├── Mpcv8FormatTest.cs ├── MpgFormatTest.cs ├── OggFormatTest.cs ├── OpusFormatTest.cs ├── StandardTests.cs └── WavFormatTest.cs ├── Helpers.cs ├── Images ├── AddImageMetadataTests.cs ├── ArwSonyA700Test.cs ├── BGO493530Test.cs ├── BGO625367Test.cs ├── BGO631333Test.cs ├── BGO633972Test.cs ├── BadCommentMarkerTest.cs ├── CopyFromTest.cs ├── Cr2Canon400d1Test.cs ├── DngLeicaM8Test.cs ├── EmptyCommentTest.cs ├── GifExiftoolLongCommentTest.cs ├── GifExiftoolTangled1Test.cs ├── GifExiftoolTangled2Test.cs ├── GifExiftoolTangled3Test.cs ├── GifExiftoolTest.cs ├── GifGimpTest.cs ├── ImageTagTests.cs ├── InvalidIFDEntryTypeTest.cs ├── InvalidIFDOffsetTest.cs ├── IptcTest.cs ├── JpegBGO624097Test.cs ├── JpegCanonBibble5Test.cs ├── JpegCanonZoombrowserTest.cs ├── JpegNikon1Bibble5Test.cs ├── JpegNikon1Test.cs ├── JpegNikon2Bibble5Test.cs ├── JpegNikon2Test.cs ├── JpegNikon3Test.cs ├── JpegNikon4Test.cs ├── JpegNoMetadataTest.cs ├── JpegOlympus1Test.cs ├── JpegOlympus2Test.cs ├── JpegOlympus3Test.cs ├── JpegOlympusCorruptMNTest.cs ├── JpegPanasonicTest.cs ├── JpegPropertyTest.cs ├── JpegSegmentSizeTest.cs ├── JpegSony1Test.cs ├── JpegSony2Test.cs ├── JpegTangledTest.cs ├── NefNikonD90Test.cs ├── NullOrientationTest.cs ├── PefPentaxKd10Test.cs ├── PngGimpPngcrushTest.cs ├── PngGimpTest.cs ├── RationalTest.cs ├── RawLeicaDigilux2Test.cs ├── RecursiveIFDTest.cs ├── Rw2PanasonicG1Test.cs ├── TiffCanonBibble516BitTest.cs ├── TiffCanonBibble58BitTest.cs ├── TiffCanonDpp16BitTest.cs ├── TiffCanonDpp8BitTest.cs ├── TiffGimp1Test.cs ├── TiffGimp2Test.cs ├── TiffNikon1Bibble516BitTest.cs ├── TiffNikon1Bibble58BitTest.cs ├── TiffNikon1ViewNX16BitTest.cs ├── TiffNikon1ViewNX8BitTest.cs ├── TiffNikon2Bibble516BitTest.cs ├── TiffNikon2Bibble58BitTest.cs ├── TiffNikon2ViewNX16BitTest.cs ├── TiffNikon2ViewNX8BitTest.cs ├── Utils.cs ├── Validators │ ├── CommentModificationValidator.cs │ ├── IMetadataInvariantValidator.cs │ ├── IMetadataModificationValidator.cs │ ├── ImageTest.cs │ ├── KeywordsModificationValidator.cs │ ├── NoModificationValidator.cs │ ├── PropertyModificationValidator.cs │ ├── RemoveMetadataValidator.cs │ ├── TagCommentModificationValidator.cs │ ├── TagKeywordsModificationValidator.cs │ └── TagPropertyModificationValidator.cs ├── XapTest.cs ├── XmlNullEndedTest.cs ├── XmpCrashTest.cs ├── XmpSpecTest.cs └── jpegSonyDscRX100M4.cs ├── MSTestSettings.cs ├── Performance └── PerformanceTest.cs ├── TaggingFormats ├── ApeTest.cs ├── AsfTest.cs ├── DivXTest.cs ├── Id3V1Test.cs ├── Id3V2Test.cs ├── InfoTagTest.cs ├── MovieIdTagTest.cs ├── Mpeg4Test.cs └── XiphTest.cs ├── TaglibSharp.Tests.csproj ├── TestPath.cs ├── raw-samples ├── ARW │ └── RAW_SONY_A700.ARW ├── CR2 │ ├── sample_canon_350d_broken.cr2 │ └── sample_canon_400d1.cr2 ├── DNG │ └── RAW_LEICA_M8.DNG ├── NEF │ └── RAW_NIKON_D90.NEF ├── PEF │ └── RAW_PENTAX_KD10.PEF ├── RAW │ └── RAW_LEICA_DIGILUX2_SRGB.RAW ├── README.md └── RW2 │ └── RAW_PANASONIC_G1.RW2 └── samples ├── LICENSE ├── Turning Lime.mkv ├── Turning Lime.mpg ├── apple_tags.m4a ├── audible ├── first.aa ├── fourth.aa ├── second.aax └── third.aa ├── bgo_658920.m4a ├── bgo_676934.m4a ├── bgo_701689.m4a ├── corrupt ├── a.aac ├── a.aif ├── a.ape ├── a.dsf ├── a.flac ├── a.m4a ├── a.mkv ├── a.mp3 ├── a.mpc ├── a.mpg ├── a.ogg ├── a.wav ├── a.wma ├── missing_flag.ogg └── null_title_v2.mp3 ├── remove_tags.mp3 ├── sample.aac ├── sample.aif ├── sample.ape ├── sample.avi ├── sample.dsf ├── sample.flac ├── sample.jpg ├── sample.m4a ├── sample.m4v ├── sample.mp3 ├── sample.mpc ├── sample.ogg ├── sample.opus ├── sample.wav ├── sample.wma ├── sample_badifdentrytype.jpg ├── sample_bgo493530.jpg ├── sample_bgo624097.jpg ├── sample_bgo625367.jpg ├── sample_bgo631333.jpg ├── sample_both.mp3 ├── sample_canon_bibble5.jpg ├── sample_canon_bibble5_16bit.tiff ├── sample_canon_bibble5_8bit.tiff ├── sample_canon_dpp_16bit.tiff ├── sample_canon_dpp_8bit.tiff ├── sample_canon_zoombrowser.jpg ├── sample_emptycomment.jpg ├── sample_exiftool.gif ├── sample_exiftool_long_comment.gif ├── sample_exiftool_tangled1.gif ├── sample_exiftool_tangled2.gif ├── sample_exiftool_tangled3.gif ├── sample_gimp.gif ├── sample_gimp.png ├── sample_gimp.tiff ├── sample_gimp_exiftool.jpg ├── sample_gimp_lzw.tiff ├── sample_gimp_pngcrush.png ├── sample_invalidifdoffset.jpg ├── sample_iptc1.jpg ├── sample_iptc2.jpg ├── sample_iptc3.jpg ├── sample_nikon1.jpg ├── sample_nikon1_bibble5.jpg ├── sample_nikon1_bibble5_16bit.tiff ├── sample_nikon1_bibble5_8bit.tiff ├── sample_nikon1_viewnx_16bit.tiff ├── sample_nikon1_viewnx_8bit.tiff ├── sample_nikon2.jpg ├── sample_nikon2_bibble5.jpg ├── sample_nikon2_bibble5_16bit.tiff ├── sample_nikon2_bibble5_8bit.tiff ├── sample_nikon2_viewnx_16bit.tiff ├── sample_nikon2_viewnx_8bit.tiff ├── sample_nikon3.jpg ├── sample_nikon4.jpg ├── sample_no_metadata.jpg ├── sample_null_orientation.jpg ├── sample_olympus1.jpg ├── sample_olympus2.jpg ├── sample_olympus3.jpg ├── sample_olympus_corrupt_mn.jpg ├── sample_panasonic.jpg ├── sample_recursive_ifd.jpg ├── sample_replaygain.flac ├── sample_replaygain.m4a ├── sample_replaygain.mp3 ├── sample_sony1.jpg ├── sample_sony2.jpg ├── sample_sony_DSC-RX100M4.jpg ├── sample_tangled1.jpg ├── sample_tangled2.jpg ├── sample_tangled3.jpg ├── sample_tangled4.jpg ├── sample_tangled5.jpg ├── sample_tangled6.jpg ├── sample_unicode5.jpg ├── sample_v1_only.mp3 ├── sample_v2_3_ext_header.mp3 ├── sample_v2_4_unsynch.mp3 ├── sample_v2_only.mp3 ├── sample_v8.mpc ├── sample_xap.jpg ├── sample_xmpcrash.jpg ├── sample_xmpnullended.jpg ├── unsupported ├── sample.it ├── sample.mod ├── sample.s3m └── sample.xm └── vector.bin /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.github/workflows/mac.yml: -------------------------------------------------------------------------------- 1 | name: macOS 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | build: 13 | runs-on: macOS-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | 18 | - name: Setup .NET 19 | uses: actions/setup-dotnet@v4 20 | with: 21 | dotnet-version: '9.0.x' 22 | 23 | - name: Build 24 | run: dotnet build --configuration Release 25 | 26 | - name: Test 27 | run: dotnet test --configuration Release --no-build --verbosity normal --logger trx --results-directory TestResults 28 | 29 | - name: Upload test results 30 | uses: actions/upload-artifact@v4 31 | if: always() 32 | with: 33 | name: test-results-macos 34 | path: TestResults/*.trx 35 | -------------------------------------------------------------------------------- /.github/workflows/ubuntu.yml: -------------------------------------------------------------------------------- 1 | name: Ubuntu 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | 18 | - name: Setup .NET 19 | uses: actions/setup-dotnet@v4 20 | with: 21 | dotnet-version: '9.0.x' 22 | 23 | - name: Build 24 | run: dotnet build --configuration Release 25 | 26 | - name: Test 27 | run: dotnet test --configuration Release --no-build --verbosity normal 28 | 29 | - name: Upload test results 30 | uses: actions/upload-artifact@v4 31 | if: always() 32 | with: 33 | name: test-results-ubuntu 34 | path: TestResults/*.trx 35 | -------------------------------------------------------------------------------- /.github/workflows/windows.yml: -------------------------------------------------------------------------------- 1 | name: Windows 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | build: 13 | runs-on: windows-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | 18 | - name: Setup .NET 19 | uses: actions/setup-dotnet@v4 20 | with: 21 | dotnet-version: '9.0.x' 22 | 23 | - name: Build 24 | run: dotnet build --configuration Release 25 | 26 | - name: Test 27 | run: dotnet test --configuration Release --no-build --verbosity normal 28 | 29 | - name: Upload test results 30 | uses: actions/upload-artifact@v4 31 | if: always() 32 | with: 33 | name: test-results-windows 34 | path: TestResults/*.trx 35 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/TaglibSharp.Tests/raw-samples"] 2 | path = src/TaglibSharp.Tests/raw-samples 3 | url = https://github.com/f-spot/raw-samples.git -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Maintainer: 2 | Stephen Shaw 3 | 4 | Contributors: 5 | Aaron Bockover 6 | Alan McGovern 7 | Alexander Kojevnikov 8 | Andrés G. Aragoneses 9 | Andy Beal 10 | Anton Drachev 11 | Bernd Niedergesaess 12 | Bertrand Lorentz 13 | Colin Turner 14 | Eamon Nerbonne 15 | Eberhard Beilharz 16 | Félix Velasco 17 | Gregory S. Chudov 18 | Guy Taylor 19 | Helmut Wahrmann 20 | Jakub 'Fiołek' Fijałkowski 21 | Jeffrey Stedfast 22 | Jeroen Asselman 23 | John Millikin 24 | Julien Moutte 25 | Les De Ridder 26 | Marek Habersack 27 | Mike Gemünde 28 | Patrick Dehne 29 | Paul Lange 30 | Ruben Vermeersch 31 | Samuel D. Jack 32 | Sebastien Mouy 33 | Stephane Delcroix 34 | Stephen Shaw 35 | Tim Howard 36 | 37 | Creator, past maintainer: 38 | Brian Nickel 39 | 40 | Past maintainers: 41 | Gabriel Burt 42 | -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $([MSBuild]::IsOSPlatform('OSX')) 5 | $([MSBuild]::IsOSPlatform('Windows')) 6 | $([MSBuild]::IsOSPlatform('Linux')) 7 | 8 | 9 | 10 | 2.5.0.0 11 | https://github.com/mono/taglib-sharp 12 | git 13 | 14 | net472;net8.0;net9.0 15 | netstandard2.0;net8.0;net9.0 16 | true 17 | true 18 | true 19 | latest 20 | true 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /Directory.Packages.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /TaglibSharp.slnx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /examples/BatchSet/BatchSet.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(ExeTargetFrameworks) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/GenerateTestFixture/GenerateTestFixture.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(ExeTargetFrameworks) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/ListSupportedMimeTypes/ListSupportedMimeTypes.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(ExeTargetFrameworks) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/ListSupportedMimeTypes/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using TagLib; 3 | 4 | namespace ListSupportedMimeTypes; 5 | 6 | public class Program 7 | { 8 | public static void Main() 9 | { 10 | foreach(string type in SupportedMimeType.AllMimeTypes) { 11 | Console.WriteLine(type); 12 | } 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /examples/ParsePhoto/ParsePhoto.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(ExeTargetFrameworks) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/ParsePhoto/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace ParsePhoto; 4 | 5 | public class Program 6 | { 7 | public static void Main (string [] args) 8 | { 9 | if(args.Length == 0) { 10 | Console.Error.WriteLine("USAGE: mono ParsePhoto.exe PATH [...]"); 11 | return; 12 | } 13 | 14 | foreach (string path in args) 15 | ParsePhoto (path); 16 | } 17 | 18 | static void ParsePhoto (string path) 19 | { 20 | TagLib.File file; 21 | try { 22 | file = TagLib.File.Create(path); 23 | } catch (TagLib.UnsupportedFormatException) { 24 | Console.WriteLine ("UNSUPPORTED FILE: " + path); 25 | Console.WriteLine (); 26 | Console.WriteLine ("---------------------------------------"); 27 | Console.WriteLine (); 28 | return; 29 | } 30 | 31 | var image = file as TagLib.Image.File; 32 | if (file == null) { 33 | Console.WriteLine ($"NOT AN IMAGE FILE: {path}"); 34 | Console.WriteLine (); 35 | Console.WriteLine ("---------------------------------------"); 36 | Console.WriteLine (); 37 | return; 38 | } 39 | 40 | Console.WriteLine (); 41 | Console.WriteLine (path); 42 | Console.WriteLine (); 43 | 44 | Console.WriteLine($"Tags in object : {image.TagTypes}"); 45 | Console.WriteLine (); 46 | 47 | Console.WriteLine($"Comment : {image.ImageTag.Comment}"); 48 | Console.Write("Keywords : "); 49 | foreach (var keyword in image.ImageTag.Keywords) { 50 | Console.Write ($"{keyword} "); 51 | } 52 | 53 | Console.WriteLine (); 54 | Console.WriteLine($"Rating : {image.ImageTag.Rating}"); 55 | Console.WriteLine($"DateTime : {image.ImageTag.DateTime}"); 56 | Console.WriteLine($"Orientation : {image.ImageTag.Orientation}"); 57 | Console.WriteLine($"Software : {image.ImageTag.Software}"); 58 | Console.WriteLine($"ExposureTime : {image.ImageTag.ExposureTime}"); 59 | Console.WriteLine($"FNumber : {image.ImageTag.FNumber}"); 60 | Console.WriteLine($"ISOSpeedRatings : {image.ImageTag.ISOSpeedRatings}"); 61 | Console.WriteLine($"FocalLength : {image.ImageTag.FocalLength}"); 62 | Console.WriteLine($"FocalLength35mm : {image.ImageTag.FocalLengthIn35mmFilm}"); 63 | Console.WriteLine($"Make : {image.ImageTag.Make}"); 64 | Console.WriteLine($"Model : {image.ImageTag.Model}"); 65 | 66 | if (image.Properties != null) { 67 | Console.WriteLine($"Width : {image.Properties.PhotoWidth}"); 68 | Console.WriteLine($"Height : {image.Properties.PhotoHeight}"); 69 | Console.WriteLine($"Type : {image.Properties.Description}"); 70 | } 71 | 72 | Console.WriteLine (); 73 | Console.WriteLine($"Writable? : {image.Writeable}"); 74 | Console.WriteLine($"Corrupt? : {image.PossiblyCorrupt}"); 75 | 76 | if (image.PossiblyCorrupt) { 77 | foreach (string reason in image.CorruptionReasons) { 78 | Console.WriteLine ($" * {reason}"); 79 | } 80 | } 81 | 82 | Console.WriteLine ("---------------------------------------"); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /examples/ReadFromUri/ReadFromUri.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(ExeTargetFrameworks) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/SetPictures/Program.cs: -------------------------------------------------------------------------------- 1 | using TagLib; 2 | 3 | using File = TagLib.File; 4 | 5 | namespace SetPictures; 6 | 7 | public class Program 8 | { 9 | public static void Main (string[] args) 10 | { 11 | if (args.Length < 2) { 12 | Console.Error.WriteLine ("USAGE: mono SetPictures.exe AUDIO_PATH IMAGE_PATH_1[...IMAGE_PATH_N]"); 13 | return; 14 | } 15 | 16 | var file = File.Create (args[0]); 17 | Console.WriteLine ($"Current picture count: {file.Tag.Pictures.Length}"); 18 | 19 | var pictures = new Picture[args.Length - 1]; 20 | 21 | for (int i = 1; i < args.Length; i++) { 22 | var picture = new Picture (args[i]); 23 | pictures[i - 1] = picture; 24 | } 25 | 26 | file.Tag.Pictures = pictures; 27 | file.Save (); 28 | 29 | Console.WriteLine ($"New picture count: {file.Tag.Pictures.Length}"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /examples/SetPictures/SetPictures.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(ExeTargetFrameworks) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/StripImageData/StripImageData.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | $(ExeTargetFrameworks) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/covers/sample_a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/examples/covers/sample_a.jpg -------------------------------------------------------------------------------- /examples/covers/sample_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/examples/covers/sample_a.png -------------------------------------------------------------------------------- /examples/covers/sample_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/examples/covers/sample_b.jpg -------------------------------------------------------------------------------- /examples/covers/sample_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/examples/covers/sample_b.png -------------------------------------------------------------------------------- /examples/covers/sample_c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/examples/covers/sample_c.jpg -------------------------------------------------------------------------------- /examples/covers/sample_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/examples/covers/sample_c.png -------------------------------------------------------------------------------- /examples/extractKey.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int main(int argc, char* const argv[]) 8 | 9 | try { 10 | if (argc != 3) { 11 | std::cout << "Usage: " << argv[0] << " file key\n"; 12 | return 1; 13 | } 14 | 15 | Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(argv[1]); 16 | assert(image.get() != 0); 17 | image->readMetadata(); 18 | 19 | try { 20 | Exiv2::ExifData &exifData = image->exifData(); 21 | const Exiv2::Value &value = exifData[argv[2]].value(); 22 | std::cout << value; 23 | } catch (Exiv2::AnyError &e) {} 24 | 25 | try { 26 | Exiv2::IptcData &iptcData = image->iptcData(); 27 | const Exiv2::Value &value = iptcData[argv[2]].value(); 28 | std::cout << value; 29 | } catch (Exiv2::AnyError &e) {} 30 | 31 | try { 32 | Exiv2::XmpData &xmpData = image->xmpData(); 33 | const Exiv2::Value &value = xmpData[argv[2]].value(); 34 | std::cout << value; 35 | } catch (Exiv2::AnyError &e) {} 36 | 37 | return 0; 38 | } catch (Exiv2::AnyError& e) { 39 | std::cout << "Caught Exiv2 exception '" << e << "'\n"; 40 | return -1; 41 | } 42 | -------------------------------------------------------------------------------- /examples/listData.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int main(int argc, char* const argv[]) 8 | 9 | try { 10 | if (argc != 3) { 11 | std::cout << "Usage: " << argv[0] << " mode file\n"; 12 | return 1; 13 | } 14 | 15 | Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(argv[2]); 16 | assert(image.get() != 0); 17 | image->readMetadata(); 18 | 19 | if (argv[1][0] == 'e') { 20 | Exiv2::ExifData &exifData = image->exifData(); 21 | if (!exifData.empty()) { 22 | Exiv2::ExifData::const_iterator exifEnd = exifData.end(); 23 | for (Exiv2::ExifData::const_iterator i = exifData.begin(); i != exifEnd; ++i) { 24 | std::cout << i->tagName() << "\t" 25 | << "0x" << std::setw(4) << std::setfill('0') << std::right 26 | << std::hex << i->tag() << std::dec << "\t" 27 | << i->groupName() << "\t" 28 | << i->typeName() << "\t" 29 | << i->count() << "\t" 30 | << "\n"; 31 | } 32 | } 33 | } 34 | 35 | if (argv[1][0] == 'i') { 36 | Exiv2::IptcData &iptcData = image->iptcData(); 37 | if (!iptcData.empty()) { 38 | Exiv2::IptcData::const_iterator iptcEnd = iptcData.end(); 39 | for (Exiv2::IptcData::const_iterator i = iptcData.begin(); i != iptcEnd; ++i) { 40 | std::cout << i->key() << "\n"; 41 | } 42 | } 43 | } 44 | 45 | if (argv[1][0] == 'x') { 46 | Exiv2::XmpData &xmpData = image->xmpData(); 47 | if (!xmpData.empty()) { 48 | Exiv2::XmpData::const_iterator xmpEnd = xmpData.end(); 49 | for (Exiv2::XmpData::const_iterator i = xmpData.begin(); i != xmpEnd; ++i) { 50 | std::cout << i->key() << "\t" 51 | << i->typeName() << "\t" 52 | << i->count() << "\t" 53 | << "\n"; 54 | } 55 | } 56 | } 57 | 58 | return 0; 59 | } catch (Exiv2::AnyError& e) { 60 | std::cout << "Caught Exiv2 exception '" << e << "'\n"; 61 | return -1; 62 | } 63 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "9.0.300", 4 | "rollForward": "latestMajor" 5 | } 6 | } -------------------------------------------------------------------------------- /src/Debug/Debug.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(ExeTargetFrameworks) 5 | Exe 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/TaglibSharp/Gif/Codec.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Codec.cs: 3 | // 4 | // Author: 5 | // Mike Gemuende (mike@gemuende.be) 6 | // 7 | // Copyright (C) 2010 Mike Gemuende 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.Gif 25 | { 26 | 27 | /// 28 | /// A Gif photo codec. Contains basic photo details. 29 | /// 30 | public class Codec : Image.Codec 31 | { 32 | 33 | /// 34 | /// Gets a text description of the media represented by the 35 | /// current instance. 36 | /// 37 | /// 38 | /// A object containing a description 39 | /// of the media represented by the current instance. 40 | /// 41 | public override string Description { get { return "GIF File"; } } 42 | 43 | 44 | /// 45 | /// Constructs a new with the given width 46 | /// and height. 47 | /// 48 | /// 49 | /// The width of the photo. 50 | /// 51 | /// 52 | /// The height of the photo. 53 | /// 54 | /// 55 | /// A new instance. 56 | /// 57 | public Codec (int width, int height) 58 | : base (width, height) { } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/TaglibSharp/Gif/GifCommentTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // GifCommentTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // Mike Gemuende (mike@gemuende.de) 7 | // 8 | // Copyright (C) 2009 Ruben Vermeersch 9 | // Copyright (C) 2010 Mike Gemuende 10 | // 11 | // This library is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU Lesser General Public License version 13 | // 2.1 as published by the Free Software Foundation. 14 | // 15 | // This library is distributed in the hope that it will be useful, but 16 | // WITHOUT ANY WARRANTY; without even the implied warranty of 17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | // Lesser General Public License for more details. 19 | // 20 | // You should have received a copy of the GNU Lesser General Public 21 | // License along with this library; if not, write to the Free Software 22 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 23 | // USA 24 | // 25 | 26 | using TagLib.Image; 27 | 28 | namespace TagLib.Gif 29 | { 30 | /// 31 | /// Contains the Gif comment. 32 | /// 33 | public class GifCommentTag : ImageTag 34 | { 35 | #region Constructors 36 | 37 | /// 38 | /// Constructor. 39 | /// 40 | /// 41 | /// The value of the comment. 42 | /// 43 | public GifCommentTag (string value) 44 | { 45 | Value = value; 46 | } 47 | 48 | /// 49 | /// Constructor. Creates a new empty comment. 50 | /// 51 | public GifCommentTag () 52 | { 53 | Value = null; 54 | } 55 | 56 | #endregion 57 | 58 | #region Public Properties 59 | 60 | /// 61 | /// The value of the comment represented by the current instance. 62 | /// 63 | public string Value { get; set; } 64 | 65 | /// 66 | /// Gets or sets the comment for the image described 67 | /// by the current instance. 68 | /// 69 | /// 70 | /// A containing the comment of the 71 | /// current instace. 72 | /// 73 | public override string Comment { 74 | get { return Value; } 75 | set { Value = value; } 76 | } 77 | 78 | #endregion 79 | 80 | #region Public Methods 81 | 82 | /// 83 | /// Gets the tag types contained in the current instance. 84 | /// 85 | /// 86 | /// Always . 87 | /// 88 | public override TagTypes TagTypes { 89 | get { return TagTypes.GifComment; } 90 | } 91 | 92 | /// 93 | /// Clears the values stored in the current instance. 94 | /// 95 | public override void Clear () 96 | { 97 | Value = null; 98 | } 99 | 100 | #endregion 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Entries/LongArrayIFDEntry.cs: -------------------------------------------------------------------------------- 1 | // 2 | // LongArrayIFDEntry.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // Mike Gemuende (mike@gemuende.de) 7 | // 8 | // Copyright (C) 2009 Ruben Vermeersch 9 | // Copyright (C) 2009 Mike Gemuende 10 | // 11 | // This library is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU Lesser General Public License version 13 | // 2.1 as published by the Free Software Foundation. 14 | // 15 | // This library is distributed in the hope that it will be useful, but 16 | // WITHOUT ANY WARRANTY; without even the implied warranty of 17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | // Lesser General Public License for more details. 19 | // 20 | // You should have received a copy of the GNU Lesser General Public 21 | // License along with this library; if not, write to the Free Software 22 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 23 | // USA 24 | // 25 | 26 | namespace TagLib.IFD.Entries 27 | { 28 | /// 29 | /// Contains a LONG value with a count > 1 30 | /// 31 | public class LongArrayIFDEntry : ArrayIFDEntry 32 | { 33 | 34 | #region Constructors 35 | 36 | /// 37 | /// Construcor. 38 | /// 39 | /// 40 | /// A with the tag ID of the entry this instance 41 | /// represents 42 | /// 43 | /// 44 | /// A to be stored 45 | /// 46 | public LongArrayIFDEntry (ushort tag, uint[] values) : base (tag) 47 | { 48 | Values = values; 49 | } 50 | 51 | #endregion 52 | 53 | #region Public Methods 54 | 55 | /// 56 | /// Renders the current instance to a 57 | /// 58 | /// 59 | /// A indicating the endianess for rendering. 60 | /// 61 | /// 62 | /// A with the offset, the data is stored. 63 | /// 64 | /// 65 | /// A the ID of the type, which is rendered 66 | /// 67 | /// 68 | /// A with the count of the values which are 69 | /// rendered. 70 | /// 71 | /// 72 | /// A with the rendered data. 73 | /// 74 | public override ByteVector Render (bool is_bigendian, uint offset, out ushort type, out uint count) 75 | { 76 | type = (ushort)IFDEntryType.Long; 77 | count = (uint)Values.Length; 78 | 79 | ByteVector data = new ByteVector (); 80 | foreach (uint value in Values) 81 | data.Add (ByteVector.FromUInt (value, is_bigendian)); 82 | 83 | return data; 84 | } 85 | 86 | #endregion 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Entries/SLongArrayIFDEntry.cs: -------------------------------------------------------------------------------- 1 | // 2 | // SLongArrayIFDEntry.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // Mike Gemuende (mike@gemuende.de) 7 | // 8 | // Copyright (C) 2009 Ruben Vermeersch 9 | // Copyright (C) 2009 Mike Gemuende 10 | // 11 | // This library is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU Lesser General Public License version 13 | // 2.1 as published by the Free Software Foundation. 14 | // 15 | // This library is distributed in the hope that it will be useful, but 16 | // WITHOUT ANY WARRANTY; without even the implied warranty of 17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | // Lesser General Public License for more details. 19 | // 20 | // You should have received a copy of the GNU Lesser General Public 21 | // License along with this library; if not, write to the Free Software 22 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 23 | // USA 24 | // 25 | 26 | namespace TagLib.IFD.Entries 27 | { 28 | /// 29 | /// Contains a SLONG value with a count > 1 30 | /// 31 | public class SLongArrayIFDEntry : ArrayIFDEntry 32 | { 33 | 34 | #region Constructors 35 | 36 | /// 37 | /// Construcor. 38 | /// 39 | /// 40 | /// A with the tag ID of the entry this instance 41 | /// represents 42 | /// 43 | /// 44 | /// A to be stored 45 | /// 46 | public SLongArrayIFDEntry (ushort tag, int[] values) : base (tag) 47 | { 48 | Values = values; 49 | } 50 | 51 | #endregion 52 | 53 | #region Public Methods 54 | 55 | /// 56 | /// Renders the current instance to a 57 | /// 58 | /// 59 | /// A indicating the endianess for rendering. 60 | /// 61 | /// 62 | /// A with the offset, the data is stored. 63 | /// 64 | /// 65 | /// A the ID of the type, which is rendered 66 | /// 67 | /// 68 | /// A with the count of the values which are 69 | /// rendered. 70 | /// 71 | /// 72 | /// A with the rendered data. 73 | /// 74 | public override ByteVector Render (bool is_bigendian, uint offset, out ushort type, out uint count) 75 | { 76 | type = (ushort)IFDEntryType.Long; 77 | count = (uint)Values.Length; 78 | 79 | ByteVector data = new ByteVector (); 80 | foreach (int value in Values) 81 | data.Add (ByteVector.FromInt (value, is_bigendian)); 82 | 83 | return data; 84 | } 85 | 86 | #endregion 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Entries/SShortArrayIFDEntry.cs: -------------------------------------------------------------------------------- 1 | // 2 | // SShortArrayIFDEntry.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // Mike Gemuende (mike@gemuende.de) 7 | // 8 | // Copyright (C) 2009 Ruben Vermeersch 9 | // Copyright (C) 2009 Mike Gemuende 10 | // 11 | // This library is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU Lesser General Public License version 13 | // 2.1 as published by the Free Software Foundation. 14 | // 15 | // This library is distributed in the hope that it will be useful, but 16 | // WITHOUT ANY WARRANTY; without even the implied warranty of 17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | // Lesser General Public License for more details. 19 | // 20 | // You should have received a copy of the GNU Lesser General Public 21 | // License along with this library; if not, write to the Free Software 22 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 23 | // USA 24 | // 25 | 26 | namespace TagLib.IFD.Entries 27 | { 28 | /// 29 | /// Contains a SSHORT value with a count > 1 30 | /// 31 | public class SShortArrayIFDEntry : ArrayIFDEntry 32 | { 33 | 34 | #region Constructors 35 | 36 | /// 37 | /// Construcor. 38 | /// 39 | /// 40 | /// A with the tag ID of the entry this instance 41 | /// represents 42 | /// 43 | /// 44 | /// A to be stored 45 | /// 46 | public SShortArrayIFDEntry (ushort tag, short[] values) : base (tag) 47 | { 48 | Values = values; 49 | } 50 | 51 | #endregion 52 | 53 | #region Public Methods 54 | 55 | /// 56 | /// Renders the current instance to a 57 | /// 58 | /// 59 | /// A indicating the endianess for rendering. 60 | /// 61 | /// 62 | /// A with the offset, the data is stored. 63 | /// 64 | /// 65 | /// A the ID of the type, which is rendered 66 | /// 67 | /// 68 | /// A with the count of the values which are 69 | /// rendered. 70 | /// 71 | /// 72 | /// A with the rendered data. 73 | /// 74 | public override ByteVector Render (bool is_bigendian, uint offset, out ushort type, out uint count) 75 | { 76 | type = (ushort)IFDEntryType.SShort; 77 | count = (uint)Values.Length; 78 | 79 | ByteVector data = new ByteVector (); 80 | foreach (var value in Values) 81 | data.Add (ByteVector.FromShort (value, is_bigendian)); 82 | 83 | return data; 84 | } 85 | 86 | #endregion 87 | 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Entries/ShortArrayIFDEntry.cs: -------------------------------------------------------------------------------- 1 | // 2 | // ShortArrayIFDEntry.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // Mike Gemuende (mike@gemuende.de) 7 | // 8 | // Copyright (C) 2009 Ruben Vermeersch 9 | // Copyright (C) 2009 Mike Gemuende 10 | // 11 | // This library is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU Lesser General Public License version 13 | // 2.1 as published by the Free Software Foundation. 14 | // 15 | // This library is distributed in the hope that it will be useful, but 16 | // WITHOUT ANY WARRANTY; without even the implied warranty of 17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | // Lesser General Public License for more details. 19 | // 20 | // You should have received a copy of the GNU Lesser General Public 21 | // License along with this library; if not, write to the Free Software 22 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 23 | // USA 24 | // 25 | 26 | namespace TagLib.IFD.Entries 27 | { 28 | /// 29 | /// Contains a SHORT value with a count > 1 30 | /// 31 | public class ShortArrayIFDEntry : ArrayIFDEntry 32 | { 33 | 34 | #region Constructors 35 | 36 | /// 37 | /// Construcor. 38 | /// 39 | /// 40 | /// A with the tag ID of the entry this instance 41 | /// represents 42 | /// 43 | /// 44 | /// A to be stored 45 | /// 46 | public ShortArrayIFDEntry (ushort tag, ushort[] values) : base (tag) 47 | { 48 | Values = values; 49 | } 50 | 51 | #endregion 52 | 53 | #region Public Methods 54 | 55 | /// 56 | /// Renders the current instance to a 57 | /// 58 | /// 59 | /// A indicating the endianess for rendering. 60 | /// 61 | /// 62 | /// A with the offset, the data is stored. 63 | /// 64 | /// 65 | /// A the ID of the type, which is rendered 66 | /// 67 | /// 68 | /// A with the count of the values which are 69 | /// rendered. 70 | /// 71 | /// 72 | /// A with the rendered data. 73 | /// 74 | public override ByteVector Render (bool is_bigendian, uint offset, out ushort type, out uint count) 75 | { 76 | type = (ushort)IFDEntryType.Short; 77 | count = (uint)Values.Length; 78 | 79 | ByteVector data = new ByteVector (); 80 | foreach (ushort value in Values) 81 | data.Add (ByteVector.FromUShort (value, is_bigendian)); 82 | 83 | return data; 84 | } 85 | 86 | #endregion 87 | 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/IFDDirectory.cs: -------------------------------------------------------------------------------- 1 | // 2 | // IFDDirectory.cs: A dictionary grouping IFDEntries. 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2009 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | using System.Collections.Generic; 25 | 26 | namespace TagLib.IFD 27 | { 28 | /// 29 | /// Contains the entries in this IFD. 30 | /// 31 | public class IFDDirectory : Dictionary 32 | { 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Tags/CanonFileInfoEntryTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // CanonFileInfoEntryTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2010 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.IFD.Tags 25 | { 26 | /// 27 | /// Label tags for Canon File Info. 28 | /// Based on http://www.exiv2.org/tags-canon.html 29 | /// 30 | public enum CanonFileInfoEntryTag : ushort 31 | { 32 | /// 33 | /// File Number. (Hex: 0X0001) 34 | /// 35 | FileNumber = 1, 36 | 37 | /// 38 | /// Bracket Mode. (Hex: 0X0003) 39 | /// 40 | BracketMode = 3, 41 | 42 | /// 43 | /// Bracket Value. (Hex: 0X0004) 44 | /// 45 | BracketValue = 4, 46 | 47 | /// 48 | /// Bracket Shot Number. (Hex: 0X0005) 49 | /// 50 | BracketShotNumber = 5, 51 | 52 | /// 53 | /// Raw Jpg Quality. (Hex: 0X0006) 54 | /// 55 | RawJpgQuality = 6, 56 | 57 | /// 58 | /// Raw Jpg Size. (Hex: 0X0007) 59 | /// 60 | RawJpgSize = 7, 61 | 62 | /// 63 | /// Noise Reduction. (Hex: 0X0008) 64 | /// 65 | NoiseReduction = 8, 66 | 67 | /// 68 | /// WB Bracket Mode. (Hex: 0X0009) 69 | /// 70 | WBBracketMode = 9, 71 | 72 | /// 73 | /// WB Bracket Value AB. (Hex: 0X000C) 74 | /// 75 | WBBracketValueAB = 12, 76 | 77 | /// 78 | /// WB Bracket Value GM. (Hex: 0X000D) 79 | /// 80 | WBBracketValueGM = 13, 81 | 82 | /// 83 | /// Filter Effect. (Hex: 0X000E) 84 | /// 85 | FilterEffect = 14, 86 | 87 | /// 88 | /// Toning Effect. (Hex: 0X000F) 89 | /// 90 | ToningEffect = 15, 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Tags/CanonPictureInfoEntryTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // CanonPictureInfoEntryTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2010 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.IFD.Tags 25 | { 26 | /// 27 | /// Label tags for Canon Picture Info. 28 | /// Based on http://www.exiv2.org/tags-canon.html 29 | /// 30 | public enum CanonPictureInfoEntryTag : ushort 31 | { 32 | /// 33 | /// Image width. (Hex: 0X0002) 34 | /// 35 | ImageWidth = 2, 36 | 37 | /// 38 | /// Image height. (Hex: 0X0003) 39 | /// 40 | ImageHeight = 3, 41 | 42 | /// 43 | /// Image width (as shot). (Hex: 0X0004) 44 | /// 45 | ImageWidthAsShot = 4, 46 | 47 | /// 48 | /// Image height (as shot). (Hex: 0X0005) 49 | /// 50 | ImageHeightAsShot = 5, 51 | 52 | /// 53 | /// AF points used. (Hex: 0X0016) 54 | /// 55 | AFPointsUsed = 22, 56 | 57 | /// 58 | /// AF points used (20D). (Hex: 0X001A) 59 | /// 60 | AFPointsUsed20D = 26, 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Tags/IOPEntryTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // IOPEntryTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // Mike Gemuende (mike@gemuende.de) 7 | // 8 | // Copyright (C) 2009-2010 Ruben Vermeersch 9 | // Copyright (C) 2009 Mike Gemuende 10 | // 11 | // This library is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU Lesser General Public License version 13 | // 2.1 as published by the Free Software Foundation. 14 | // 15 | // This library is distributed in the hope that it will be useful, but 16 | // WITHOUT ANY WARRANTY; without even the implied warranty of 17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | // Lesser General Public License for more details. 19 | // 20 | // You should have received a copy of the GNU Lesser General Public 21 | // License along with this library; if not, write to the Free Software 22 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 23 | // USA 24 | // 25 | 26 | namespace TagLib.IFD.Tags 27 | { 28 | /// 29 | /// Entry tags occuring in the Interoperability IFD 30 | /// The complete overview can be obtained at: 31 | /// http://www.awaresystems.be/imaging/tiff.html 32 | /// 33 | public enum IOPEntryTag : ushort 34 | { 35 | /// 36 | /// Indicates the identification of the Interoperability rule. (Hex: 0x0001) 37 | /// http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/interoperability/interoperabilityindex.html 38 | /// 39 | InteroperabilityIndex = 1, 40 | 41 | /// 42 | /// Interoperability version. (Hex: 0x0002) 43 | /// 44 | InteroperabilityVersion = 2, 45 | 46 | /// 47 | /// File format of image file. (Hex: 0x1000) 48 | /// 49 | RelatedImageFileFormat = 4096, 50 | 51 | /// 52 | /// Image Width. (Hex: 0x1001) 53 | /// 54 | RelatedImageWidth = 4097, 55 | 56 | /// 57 | /// Image Height. (Hex: 0x1002) 58 | /// 59 | RelatedImageLength = 4098, 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Tags/NikonIsoInfoEntryTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // NikonIsoInfoEntryTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2010 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.IFD.Tags 25 | { 26 | /// 27 | /// Nikon Iso Info entry tags. 28 | /// Based on: 29 | /// http://exiv2.org/tags-nikon.html 30 | /// 31 | public enum NikonIsoInfoEntryTag : ushort 32 | { 33 | 34 | /// 35 | /// ISO. (Hex: 0X0000) 36 | /// 37 | ISO = 0, 38 | 39 | /// 40 | /// ISO expansion. (Hex: 0X0004) 41 | /// 42 | ISOExpansion = 4, 43 | 44 | /// 45 | /// ISO 2. (Hex: 0X0006) 46 | /// 47 | ISO2 = 6, 48 | 49 | /// 50 | /// ISO expansion 2. (Hex: 0X000A) 51 | /// 52 | ISOExpansion2 = 10, 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Tags/NikonLensData3EntryTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // NikonLensData3EntryTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2010 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.IFD.Tags 25 | { 26 | /// 27 | /// Nikon lens data entry tags. 28 | /// Based on: 29 | /// http://exiv2.org/tags-nikon.html 30 | /// 31 | public enum NikonLensData3EntryTag : ushort 32 | { 33 | 34 | /// 35 | /// Version. (Hex: 0X0000) 36 | /// 37 | Version = 0, 38 | 39 | /// 40 | /// Exit pupil position. (Hex: 0X0004) 41 | /// 42 | ExitPupilPosition = 4, 43 | 44 | /// 45 | /// AF aperture. (Hex: 0X0005) 46 | /// 47 | AFAperture = 5, 48 | 49 | /// 50 | /// Focus position. (Hex: 0X0008) 51 | /// 52 | FocusPosition = 8, 53 | 54 | /// 55 | /// Focus distance. (Hex: 0X000A) 56 | /// 57 | FocusDistance = 10, 58 | 59 | /// 60 | /// Focal length. (Hex: 0X000B) 61 | /// 62 | FocalLength = 11, 63 | 64 | /// 65 | /// Lens ID number. (Hex: 0X000C) 66 | /// 67 | LensIDNumber = 12, 68 | 69 | /// 70 | /// Lens F-stops. (Hex: 0X000D) 71 | /// 72 | LensFStops = 13, 73 | 74 | /// 75 | /// Min focal length. (Hex: 0X000E) 76 | /// 77 | MinFocalLength = 14, 78 | 79 | /// 80 | /// Max focal length. (Hex: 0X000F) 81 | /// 82 | MaxFocalLength = 15, 83 | 84 | /// 85 | /// Max aperture at min focal length. (Hex: 0X0010) 86 | /// 87 | MaxApertureAtMinFocal = 16, 88 | 89 | /// 90 | /// Max aperture at max focal length. (Hex: 0X0011) 91 | /// 92 | MaxApertureAtMaxFocal = 17, 93 | 94 | /// 95 | /// MCU version. (Hex: 0X0012) 96 | /// 97 | MCUVersion = 18, 98 | 99 | /// 100 | /// Effective max aperture. (Hex: 0X0013) 101 | /// 102 | EffectiveMaxAperture = 19, 103 | 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Tags/NikonPictureControlEntryTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // NikonPictureControlEntryTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2010 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.IFD.Tags 25 | { 26 | /// 27 | /// Nikon picture control entry tags. 28 | /// Based on: 29 | /// http://exiv2.org/tags-nikon.html 30 | /// 31 | public enum NikonPictureControlEntryTag : ushort 32 | { 33 | 34 | /// 35 | /// Version. (Hex: 0X0000) 36 | /// 37 | Version = 0, 38 | 39 | /// 40 | /// Name. (Hex: 0X0004) 41 | /// 42 | Name = 4, 43 | 44 | /// 45 | /// Base. (Hex: 0X0018) 46 | /// 47 | Base = 24, 48 | 49 | /// 50 | /// Adjust. (Hex: 0X0030) 51 | /// 52 | Adjust = 48, 53 | 54 | /// 55 | /// Quick adjust. (Hex: 0X0031) 56 | /// 57 | QuickAdjust = 49, 58 | 59 | /// 60 | /// Sharpness. (Hex: 0X0032) 61 | /// 62 | Sharpness = 50, 63 | 64 | /// 65 | /// Contrast. (Hex: 0X0033) 66 | /// 67 | Contrast = 51, 68 | 69 | /// 70 | /// Brightness. (Hex: 0X0034) 71 | /// 72 | Brightness = 52, 73 | 74 | /// 75 | /// Saturation. (Hex: 0X0035) 76 | /// 77 | Saturation = 53, 78 | 79 | /// 80 | /// Hue adjustment. (Hex: 0X0036) 81 | /// 82 | HueAdjustment = 54, 83 | 84 | /// 85 | /// Filter effect. (Hex: 0X0037) 86 | /// 87 | FilterEffect = 55, 88 | 89 | /// 90 | /// Toning effect. (Hex: 0X0038) 91 | /// 92 | ToningEffect = 56, 93 | 94 | /// 95 | /// Toning saturation. (Hex: 0X0039) 96 | /// 97 | ToningSaturation = 57, 98 | 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Tags/NikonShotInfoEntryTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // NikonShotInfoEntryTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2010 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.IFD.Tags 25 | { 26 | /// 27 | /// Nikon shot info entry tags. 28 | /// Based on: 29 | /// http://exiv2.org/tags-nikon.html 30 | /// 31 | public enum NikonShotInfoEntryTag : ushort 32 | { 33 | 34 | /// 35 | /// Version. (Hex: 0X0000) 36 | /// 37 | Version = 0, 38 | 39 | /// 40 | /// Shutter count 1. (Hex: 0X006A) 41 | /// 42 | ShutterCount1 = 106, 43 | 44 | /// 45 | /// Deleted image count. (Hex: 0X006E) 46 | /// 47 | DeletedImageCount = 110, 48 | 49 | /// 50 | /// Vibration reduction. (Hex: 0X0075) 51 | /// 52 | VibrationReduction = 117, 53 | 54 | /// 55 | /// . (Hex: 0X0082) 56 | /// 57 | VibrationReduction1 = 130, 58 | 59 | /// 60 | /// Shutter count 2. (Hex: 0X0157) 61 | /// 62 | ShutterCount2 = 343, 63 | 64 | /// 65 | /// Vibration reduction 2. (Hex: 0X01AE) 66 | /// 67 | VibrationReduction2 = 430, 68 | 69 | /// 70 | /// ISO. (Hex: 0X0256) 71 | /// 72 | ISO = 598, 73 | 74 | /// 75 | /// Shutter count. (Hex: 0X0276) 76 | /// 77 | ShutterCount = 630, 78 | 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Tags/NikonVibrationReductionEntryTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // NikonVibrationReductionEntryTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2010 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.IFD.Tags 25 | { 26 | /// 27 | /// Nikon vibration reduction entry tags. 28 | /// Based on: 29 | /// http://exiv2.org/tags-nikon.html 30 | /// 31 | public enum NikonVibrationReductionEntryTag : ushort 32 | { 33 | 34 | /// 35 | /// Version. (Hex: 0X0000) 36 | /// 37 | Version = 0, 38 | 39 | /// 40 | /// Vibration reduction. (Hex: 0X0004) 41 | /// 42 | VibrationReduction = 4, 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/TaglibSharp/IFD/Tags/NikonWorldTimeEntryTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // NikonWorldTimeEntryTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2010 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.IFD.Tags 25 | { 26 | /// 27 | /// Nikon world time entry tags. 28 | /// Based on: 29 | /// http://exiv2.org/tags-nikon.html 30 | /// 31 | public enum NikonWorldTimeEntryTag : ushort 32 | { 33 | 34 | /// 35 | /// Timezone. (Hex: 0X0000) 36 | /// 37 | Timezone = 0, 38 | 39 | /// 40 | /// Daylight savings. (Hex: 0X0002) 41 | /// 42 | DaylightSavings = 2, 43 | 44 | /// 45 | /// Date display format. (Hex: 0X0003) 46 | /// 47 | DateDisplayFormat = 3, 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/TaglibSharp/IIM/IIMTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // IIMTag.cs 3 | // 4 | // Author: 5 | // Eberhard Beilharz 6 | // 7 | // Copyright (c) 2012 Eberhard Beilharz 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License as 11 | // published by the Free Software Foundation; either version 2.1 of the 12 | // License, or (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, but 15 | // WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | // Lesser General Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser General Public 20 | // License along with this library; if not, write to the Free Software 21 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | 23 | using System.Collections.Generic; 24 | 25 | namespace TagLib.IIM 26 | { 27 | /// 28 | /// Represents an IIM Tag 29 | /// 30 | public class IIMTag : Xmp.XmpTag 31 | { 32 | List m_Keywords; 33 | 34 | /// 35 | /// Constructor 36 | /// 37 | public IIMTag () 38 | { 39 | } 40 | 41 | /// 42 | /// Defines the supported TagType 43 | /// 44 | public override TagTypes TagTypes { 45 | get { 46 | return TagTypes.IPTCIIM; 47 | } 48 | } 49 | 50 | /// 51 | /// Clear IIM content 52 | /// 53 | public override void Clear () 54 | { 55 | Title = null; 56 | m_Keywords = null; 57 | Creator = null; 58 | Copyright = null; 59 | Comment = null; 60 | } 61 | 62 | /// 63 | /// Get or Set the Title Tag 64 | /// 65 | 66 | public override string Title { get; set; } 67 | 68 | /// 69 | /// Get or Set the Creator Tag 70 | /// 71 | 72 | public override string Creator { get; set; } 73 | 74 | /// 75 | /// Get or Set the Copyright Tag 76 | /// 77 | 78 | public override string Copyright { get; set; } 79 | 80 | /// 81 | /// Get or Set the comment Tag 82 | /// 83 | public override string Comment { get; set; } 84 | 85 | /// 86 | /// Get or Set the Keywords Tag 87 | /// 88 | public override string[] Keywords { 89 | get { 90 | return m_Keywords?.ToArray (); 91 | } 92 | } 93 | 94 | internal void AddKeyword (string keyword) 95 | { 96 | if (m_Keywords == null) 97 | m_Keywords = new List (); 98 | m_Keywords.Add (keyword); 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/TaglibSharp/ILazy.cs: -------------------------------------------------------------------------------- 1 | // 2 | // PictureLazy.cs: 3 | // 4 | // Author: 5 | // Sebastien Mouy 6 | // 7 | // Copyright (C) 2018 Starwer 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib 25 | { 26 | /// 27 | /// This interface provides generic information about ab object, 28 | /// from which the content can be load only on demand. 29 | /// 30 | public interface ILazy 31 | { 32 | /// 33 | /// Gets an indication whether the object is loaded. 34 | /// 35 | bool IsLoaded { get; } 36 | 37 | /// 38 | /// Load the object data if not done yet. 39 | /// 40 | void Load (); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/TaglibSharp/Id3v1/StringHandler.cs: -------------------------------------------------------------------------------- 1 | // 2 | // StringHandler.cs: 3 | // 4 | // Author: 5 | // Brian Nickel (brian.nickel@gmail.com) 6 | // 7 | // Original Source: 8 | // id3v1tag.cpp from TagLib 9 | // 10 | // Copyright (C) 2005-2007 Brian Nickel 11 | // Copyright (C) 2002,2003 Scott Wheeler (Original Implementation) 12 | // 13 | // This library is free software; you can redistribute it and/or modify 14 | // it under the terms of the GNU Lesser General Public License version 15 | // 2.1 as published by the Free Software Foundation. 16 | // 17 | // This library is distributed in the hope that it will be useful, but 18 | // WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | // Lesser General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU Lesser General Public 23 | // License along with this library; if not, write to the Free Software 24 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 25 | // USA 26 | // 27 | 28 | using System; 29 | 30 | namespace TagLib.Id3v1 31 | { 32 | /// 33 | /// This class provides a mechanism for customizing how Id3v1 text 34 | /// is read and written. 35 | /// 36 | public class StringHandler 37 | { 38 | /// 39 | /// Converts raw ID3v1 text data to a 40 | /// object. 41 | /// 42 | /// 43 | /// A object containing raw Id3v1 44 | /// text data. 45 | /// 46 | /// 47 | /// A object containing the converted 48 | /// text. 49 | /// 50 | public virtual string Parse (ByteVector data) 51 | { 52 | if (data == null) 53 | throw new ArgumentNullException (nameof (data)); 54 | 55 | string output = data.ToString (StringType.Latin1).Trim (); 56 | int i = output.IndexOf ('\0'); 57 | return (i >= 0) ? output.Substring (0, i) : output; 58 | } 59 | 60 | /// 61 | /// Converts a object to raw ID3v1 text 62 | /// data. 63 | /// 64 | /// 65 | /// A object to convert. 66 | /// 67 | /// 68 | /// A containing the raw ID3v1 text 69 | /// data. 70 | /// 71 | public virtual ByteVector Render (string text) 72 | { 73 | return ByteVector.FromString (text, StringType.Latin1); 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/TaglibSharp/Id3v2/EventTimeCode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace TagLib.Id3v2 4 | { 5 | /// 6 | /// 7 | /// 8 | public class EventTimeCode : ICloneable 9 | { 10 | #region Public Properties 11 | 12 | /// 13 | /// 14 | /// 15 | public EventType TypeOfEvent { get; set; } 16 | 17 | /// 18 | /// 19 | /// 20 | public int Time { get; set; } 21 | 22 | #endregion 23 | 24 | #region Public Constructors 25 | 26 | /// 27 | /// 28 | /// 29 | /// 30 | /// 31 | public EventTimeCode (EventType typeOfEvent, int time) 32 | { 33 | TypeOfEvent = typeOfEvent; 34 | Time = time; 35 | } 36 | 37 | #endregion 38 | 39 | #region Static Methods 40 | 41 | /// 42 | /// 43 | /// 44 | /// 45 | public static EventTimeCode CreateEmpty () 46 | { 47 | return new EventTimeCode (EventType.Padding, 0); 48 | } 49 | 50 | #endregion 51 | 52 | #region ICloneable 53 | 54 | /// 55 | /// 56 | /// 57 | /// 58 | public object Clone () 59 | { 60 | return new EventTimeCode (TypeOfEvent, Time); 61 | } 62 | 63 | #endregion 64 | } 65 | } -------------------------------------------------------------------------------- /src/TaglibSharp/Id3v2/EventType.cs: -------------------------------------------------------------------------------- 1 | namespace TagLib.Id3v2 2 | { 3 | /// 4 | /// Specifies the event type used by a and . 6 | /// 7 | public enum EventType 8 | { 9 | /// 10 | /// The padding - no meaning 11 | /// 12 | Padding = 0x00, 13 | 14 | /// 15 | /// The end of initial silence 16 | /// 17 | EndOfInitialSilence = 0x01, 18 | 19 | /// 20 | /// The intro start 21 | /// 22 | IntroStart = 0x02, 23 | 24 | /// 25 | /// The main part start 26 | /// 27 | MainPartStart = 0x03, 28 | 29 | /// 30 | /// The outro start 31 | /// 32 | OutroStart = 0x04, 33 | 34 | /// 35 | /// The outro end 36 | /// 37 | OutroEnd = 0x05, 38 | 39 | /// 40 | /// The verse start 41 | /// 42 | VerseStart = 0x06, 43 | 44 | /// 45 | /// The refrain start 46 | /// 47 | RefrainStart = 0x07, 48 | 49 | /// 50 | /// The interlude start 51 | /// 52 | InterludeStart = 0x08, 53 | 54 | /// 55 | /// The theme start 56 | /// 57 | ThemeStart = 0x09, 58 | 59 | /// 60 | /// The variation start 61 | /// 62 | VariationStart = 0x0A, 63 | 64 | /// 65 | /// The key change 66 | /// 67 | KeyChange = 0x0B, 68 | 69 | /// 70 | /// The time change 71 | /// 72 | TimeChange = 0x0C, 73 | 74 | /// 75 | /// momentary unwanted noise (Snap, Crackle, and Pop) 76 | /// 77 | MomentaryUnwantedNoise = 0x0D, 78 | 79 | /// 80 | /// The sustained noise 81 | /// 82 | SustainedNoise = 0x0E, 83 | 84 | /// 85 | /// The sustained noise end 86 | /// 87 | SustainedNoiseEnd = 0x0F, 88 | 89 | /// 90 | /// The intro end 91 | /// 92 | IntroEnd = 0x10, 93 | 94 | /// 95 | /// The main part end 96 | /// 97 | MainPartEnd = 0x11, 98 | 99 | /// 100 | /// The verse end 101 | /// 102 | VerseEnd = 0x12, 103 | 104 | /// 105 | /// The refrain end 106 | /// 107 | RefrainEnd = 0x13, 108 | 109 | /// 110 | /// The theme end 111 | /// 112 | ThemeEnd = 0x14, 113 | 114 | /// 115 | /// Profanity starts 116 | /// 117 | Profanity = 0x15, 118 | 119 | /// 120 | /// The profanity end 121 | /// 122 | ProfanityEnd = 0x16, 123 | 124 | /// 125 | /// The audio end 126 | /// 127 | AudioEnd = 0xFD, 128 | 129 | /// 130 | /// The audio file end 131 | /// 132 | AudioFileEnd = 0xFE, 133 | } 134 | } -------------------------------------------------------------------------------- /src/TaglibSharp/Id3v2/SynchedTextType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // SynchedTextType.cs: 3 | // 4 | // Author: 5 | // Brian Nickel (brian.nickel@gmail.com) 6 | // 7 | // Copyright (C) 2007 Brian Nickel 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.Id3v2 25 | { 26 | /// 27 | /// Specifies the type of text contained in a . 29 | /// 30 | public enum SynchedTextType 31 | { 32 | /// 33 | /// The text is some other type of text. 34 | /// 35 | Other = 0x00, 36 | 37 | /// 38 | /// The text contains lyrical data. 39 | /// 40 | Lyrics = 0x01, 41 | 42 | /// 43 | /// The text contains a transcription. 44 | /// 45 | TextTranscription = 0x02, 46 | 47 | /// 48 | /// The text lists the movements in the piece. 49 | /// 50 | Movement = 0x03, 51 | 52 | /// 53 | /// The text describes events that occur. 54 | /// 55 | Events = 0x04, 56 | 57 | /// 58 | /// The text contains chord changes that occur in the music. 59 | /// 60 | Chord = 0x05, 61 | 62 | /// 63 | /// The text contains trivia or "pop up" information about 64 | /// the media. 65 | /// 66 | Trivia = 0x06, 67 | 68 | /// 69 | /// The text contains URL's for relevant webpages. 70 | /// 71 | WebpageUrls = 0x07, 72 | 73 | /// 74 | /// The text contains URL's for relevant images. 75 | /// 76 | ImageUrls = 0x08 77 | } 78 | } -------------------------------------------------------------------------------- /src/TaglibSharp/Id3v2/TimestampFormat.cs: -------------------------------------------------------------------------------- 1 | // 2 | // TimestampFormat.cs: 3 | // 4 | // Author: 5 | // Brian Nickel (brian.nickel@gmail.com) 6 | // 7 | // Copyright (C) 2007 Brian Nickel 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | 25 | namespace TagLib.Id3v2 26 | { 27 | /// 28 | /// Specifies the timestamp format used by a and . 30 | /// 31 | public enum TimestampFormat 32 | { 33 | /// 34 | /// The timestamp is of unknown format. 35 | /// 36 | Unknown = 0x00, 37 | 38 | /// 39 | /// The timestamp represents the number of MPEG frames since 40 | /// the beginning of the audio stream. 41 | /// 42 | AbsoluteMpegFrames = 0x01, 43 | 44 | /// 45 | /// The timestamp represents the number of milliseconds since 46 | /// the beginning of the audio stream. 47 | /// 48 | AbsoluteMilliseconds = 0x02 49 | } 50 | } -------------------------------------------------------------------------------- /src/TaglibSharp/Image/ImageOrientation.cs: -------------------------------------------------------------------------------- 1 | // 2 | // ImageOrientation.cs: Enum for the orientation of an image 3 | // 4 | // Author: 5 | // Paul Lange (palango@gmx.de) 6 | // 7 | // Copyright (C) 2009 Paul Lange 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | 23 | namespace TagLib.Image 24 | { 25 | /** 26 | 27 | 1 2 3 4 5 6 7 8 28 | 29 | 888888 888888 88 88 8888888888 88 88 8888888888 30 | 88 88 88 88 88 88 88 88 88 88 88 88 31 | 8888 8888 8888 8888 88 8888888888 8888888888 88 32 | 88 88 88 88 33 | 88 88 888888 888888 34 | 35 | t-l t-r b-r b-l l-t r-t r-b l-b 36 | 37 | **/ 38 | 39 | /// 40 | /// Describes the orientation of an image. 41 | /// Values are viewed in terms of rows and columns. 42 | /// 43 | public enum ImageOrientation : uint 44 | { 45 | /// 46 | /// No value is known. 47 | /// 48 | None = 0, 49 | 50 | /// 51 | /// No need to do any transformations. 52 | /// 53 | TopLeft = 1, 54 | 55 | /// 56 | /// Mirror image vertically. 57 | /// 58 | TopRight = 2, 59 | 60 | /// 61 | /// Rotate image 180 degrees. 62 | /// 63 | BottomRight = 3, 64 | 65 | /// 66 | /// Mirror image horizontally 67 | /// 68 | BottomLeft = 4, 69 | 70 | /// 71 | /// Mirror image horizontally and rotate 90 degrees clockwise. 72 | /// 73 | LeftTop = 5, 74 | 75 | /// 76 | /// Rotate image 90 degrees clockwise. 77 | /// 78 | RightTop = 6, 79 | 80 | /// 81 | /// Mirror image vertically and rotate 90 degrees clockwise. 82 | /// 83 | RightBottom = 7, 84 | 85 | /// 86 | /// Rotate image 270 degrees clockwise. 87 | /// 88 | LeftBottom = 8 89 | } 90 | } -------------------------------------------------------------------------------- /src/TaglibSharp/Jpeg/Codec.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Codec.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // Mike Gemuende (mike@gemuende.de) 7 | // 8 | // Copyright (C) 2009 Ruben Vermeersch 9 | // Copyright (C) 2009 Mike Gemuende 10 | // 11 | // This library is free software; you can redistribute it and/or modify 12 | // it under the terms of the GNU Lesser General Public License version 13 | // 2.1 as published by the Free Software Foundation. 14 | // 15 | // This library is distributed in the hope that it will be useful, but 16 | // WITHOUT ANY WARRANTY; without even the implied warranty of 17 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 | // Lesser General Public License for more details. 19 | // 20 | // You should have received a copy of the GNU Lesser General Public 21 | // License along with this library; if not, write to the Free Software 22 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 23 | // USA 24 | // 25 | 26 | namespace TagLib.Jpeg 27 | { 28 | /// 29 | /// A Jpeg photo codec. Contains basic photo details. 30 | /// 31 | public class Codec : Image.Codec 32 | { 33 | 34 | /// 35 | /// Gets a text description of the media represented by the 36 | /// current instance. 37 | /// 38 | /// 39 | /// A object containing a description 40 | /// of the media represented by the current instance. 41 | /// 42 | public override string Description { get { return "JFIF File"; } } 43 | 44 | 45 | /// 46 | /// Constructs a new with the given width 47 | /// and height. 48 | /// 49 | /// 50 | /// The width of the photo. 51 | /// 52 | /// 53 | /// The height of the photo. 54 | /// 55 | /// 56 | /// The quality of the photo. 57 | /// 58 | /// 59 | /// A new instance. 60 | /// 61 | public Codec (int width, int height, int quality) 62 | : base (width, height, quality) { } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/TaglibSharp/Jpeg/JpegCommentTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // JpegCommentTag.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2009 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | using TagLib.Image; 25 | 26 | namespace TagLib.Jpeg 27 | { 28 | /// 29 | /// Contains the JPEG comment. 30 | /// 31 | public class JpegCommentTag : ImageTag 32 | { 33 | #region Constructors 34 | 35 | /// 36 | /// Constructor. 37 | /// 38 | /// 39 | /// The value of the comment. 40 | /// 41 | public JpegCommentTag (string value) 42 | { 43 | Value = value; 44 | } 45 | 46 | /// 47 | /// Constructor. Creates a new empty comment. 48 | /// 49 | public JpegCommentTag () 50 | { 51 | Value = null; 52 | } 53 | 54 | #endregion 55 | 56 | #region Public Properties 57 | 58 | /// 59 | /// The value of the comment represented by the current instance. 60 | /// 61 | public string Value { get; set; } 62 | 63 | /// 64 | /// Gets or sets the comment for the image described 65 | /// by the current instance. 66 | /// 67 | /// 68 | /// A containing the comment of the 69 | /// current instace. 70 | /// 71 | public override string Comment { 72 | get { return Value; } 73 | set { Value = value; } 74 | } 75 | 76 | #endregion 77 | 78 | #region Public Methods 79 | 80 | /// 81 | /// Gets the tag types contained in the current instance. 82 | /// 83 | /// 84 | /// Always . 85 | /// 86 | public override TagTypes TagTypes { 87 | get { return TagTypes.JpegComment; } 88 | } 89 | 90 | /// 91 | /// Clears the values stored in the current instance. 92 | /// 93 | public override void Clear () 94 | { 95 | Value = null; 96 | } 97 | 98 | #endregion 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/TaglibSharp/Jpeg/Table.cs: -------------------------------------------------------------------------------- 1 | // 2 | // TagLib.Jpeg.Table.cs: 3 | // 4 | // Author: 5 | // Stephane Delcroix (stephane@delcroix.org) 6 | // 7 | // Copyright (c) 2009 Stephane Delcroix 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.Jpeg 25 | { 26 | /// 27 | /// Contains static predefined tables and helpers 28 | /// 29 | public static class Table 30 | { 31 | /// 32 | /// Standard Luminance Quantization table 33 | /// 34 | /// See CCIT Rec. T.81 (1992 E), K.1 (p143) 35 | /// 36 | public static int[] StandardLuminanceQuantization = { 37 | 16, 11, 12, 14, 12, 10, 16, 14, 38 | 13, 14, 18, 17, 16, 19, 24, 40, 39 | 26, 24, 22, 22, 24, 49, 35, 37, 40 | 29, 40, 58, 51, 61, 60, 57, 51, 41 | 56, 55, 64, 72, 92, 78, 64, 68, 42 | 87, 69, 55, 56, 80, 109, 81, 87, 43 | 95, 98, 103, 104, 103, 62, 77, 113, 44 | 121, 112, 100, 120, 92, 101, 103, 99 45 | }; 46 | 47 | /// 48 | /// Standard Chrominance Quantization table 49 | /// 50 | /// See CCIT Rec. T.81 (1992 E), K.1 (p143) 51 | /// 52 | public static int[] StandardChrominanceQuantization = { 53 | 17, 18, 18, 24, 21, 24, 47, 26, 54 | 26, 47, 99, 66, 56, 66, 99, 99, 55 | 99, 99, 99, 99, 99, 99, 99, 99, 56 | 99, 99, 99, 99, 99, 99, 99, 99, 57 | 99, 99, 99, 99, 99, 99, 99, 99, 58 | 99, 99, 99, 99, 99, 99, 99, 99, 59 | 99, 99, 99, 99, 99, 99, 99, 99, 60 | 99, 99, 99, 99, 99, 99, 99, 99 61 | }; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/TaglibSharp/Matroska/EBMLIDs.cs: -------------------------------------------------------------------------------- 1 | // 2 | // EBMLIDs.cs: 3 | // 4 | // Author: 5 | // Julien Moutte 6 | // 7 | // Copyright (C) 2011 FLUENDO S.A. 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.Matroska 25 | { 26 | /// 27 | /// Public enumeration listing the possible EBML element identifiers. 28 | /// 29 | public enum EBMLID 30 | { 31 | /// 32 | /// Indicates an EBML Header element. 33 | /// 34 | EBMLHeader = 0x1A45DFA3, 35 | 36 | /// 37 | /// Indicates an EBML Version element. 38 | /// 39 | EBMLVersion = 0x4286, 40 | 41 | /// 42 | /// Indicates an EBML Read Version element. 43 | /// 44 | EBMLReadVersion = 0x42F7, 45 | 46 | /// 47 | /// Indicates an EBML Max ID Length element. 48 | /// 49 | EBMLMaxIDLength = 0x42F2, 50 | 51 | /// 52 | /// Indicates an EBML Max Size Length element. 53 | /// 54 | EBMLMaxSizeLength = 0x42F3, 55 | 56 | /// 57 | /// Indicates an EBML Doc Type element. 58 | /// 59 | EBMLDocType = 0x4282, 60 | 61 | /// 62 | /// Indicates an EBML Doc Type Version element. 63 | /// 64 | EBMLDocTypeVersion = 0x4287, 65 | 66 | /// 67 | /// Indicates an EBML Doc Type Read Version element. 68 | /// 69 | EBMLDocTypeReadVersion = 0x4285, 70 | 71 | /// 72 | /// Indicates an EBML Void element. 73 | /// 74 | EBMLVoid = 0xEC 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/TaglibSharp/Matroska/SubtitleTrack.cs: -------------------------------------------------------------------------------- 1 | // 2 | // SubtitleTrack.cs: 3 | // 4 | // Author: 5 | // Julien Moutte 6 | // 7 | // Copyright (C) 2011 FLUENDO S.A. 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | using System.Collections.Generic; 25 | 26 | namespace TagLib.Matroska 27 | { 28 | /// 29 | /// Describes a Matroska Subtitle Track. 30 | /// 31 | public class SubtitleTrack : Track 32 | { 33 | #region Constructors 34 | 35 | /// 36 | /// Constructs a parsing from provided 37 | /// file data. 38 | /// Parsing will be done reading from _file at position references by 39 | /// parent element's data section. 40 | /// 41 | /// instance to read from. 42 | /// Parent . 43 | public SubtitleTrack (File _file, EBMLreader element) 44 | : base (_file, element) 45 | { 46 | // Here we handle the unknown elements we know, and store the rest 47 | foreach (EBMLreader elem in base.UnknownElements) { 48 | MatroskaID matroska_id = elem.ID; 49 | 50 | switch (matroska_id) { 51 | default: 52 | UnknownElements.Add (elem); 53 | break; 54 | } 55 | } 56 | } 57 | 58 | #endregion 59 | 60 | #region Public fields 61 | 62 | /// 63 | /// List of unknown elements encountered while parsing. 64 | /// 65 | public new List UnknownElements { get; } = new List(); 66 | 67 | #endregion 68 | 69 | #region Public methods 70 | 71 | #endregion 72 | 73 | #region ICodec 74 | 75 | /// 76 | /// This type of track only has text media type. 77 | /// 78 | public override MediaTypes MediaTypes { 79 | get { 80 | return MediaTypes.Text; 81 | } 82 | } 83 | 84 | #endregion 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/TaglibSharp/Mpeg4/Boxes/IsoSampleTableBox.cs: -------------------------------------------------------------------------------- 1 | // 2 | // IsoSampleTableBox.cs: Provides an implementation of a ISO/IEC 14496-12 3 | // SampleTableBox. 4 | // 5 | // Author: 6 | // Brian Nickel (brian.nickel@gmail.com) 7 | // 8 | // Copyright (C) 2006-2007 Brian Nickel 9 | // 10 | // This library is free software; you can redistribute it and/or modify 11 | // it under the terms of the GNU Lesser General Public License version 12 | // 2.1 as published by the Free Software Foundation. 13 | // 14 | // This library is distributed in the hope that it will be useful, but 15 | // WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | // Lesser General Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser General Public 20 | // License along with this library; if not, write to the Free Software 21 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 22 | // USA 23 | // 24 | 25 | using System; 26 | using System.Collections.Generic; 27 | 28 | namespace TagLib.Mpeg4 29 | { 30 | /// 31 | /// This class extends to provide an 32 | /// implementation of a ISO/IEC 14496-12 SampleTableBox. 33 | /// 34 | public class IsoSampleTableBox : Box 35 | { 36 | #region Private Fields 37 | 38 | #endregion 39 | 40 | 41 | 42 | #region Constructors 43 | 44 | /// 45 | /// Constructs and initializes a new instance of with a provided header and 47 | /// handler by reading the contents from a specified file. 48 | /// 49 | /// 50 | /// A object containing the header 51 | /// to use for the new instance. 52 | /// 53 | /// 54 | /// A object to read the contents 55 | /// of the box from. 56 | /// 57 | /// 58 | /// A object containing the 59 | /// handler that applies to the new instance. 60 | /// 61 | /// 62 | /// is . 63 | /// 64 | public IsoSampleTableBox (BoxHeader header, TagLib.File file, IsoHandlerBox handler) 65 | : base (header, handler) 66 | { 67 | if (file == null) 68 | throw new ArgumentNullException (nameof (file)); 69 | 70 | Children = LoadChildren (file); 71 | } 72 | 73 | #endregion 74 | 75 | 76 | 77 | #region Public Properties 78 | 79 | /// 80 | /// Gets the children of the current instance. 81 | /// 82 | /// 83 | /// A object enumerating the 84 | /// children of the current instance. 85 | /// 86 | public override IEnumerable Children { get; } 87 | 88 | #endregion 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/TaglibSharp/Mpeg4/Boxes/TextBox.cs: -------------------------------------------------------------------------------- 1 | // 2 | // TextBox.cs 3 | // 4 | // Author: 5 | // Alan McGovern 6 | // 7 | // Copyright (c) 2012 Alan McGovern 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License as 11 | // published by the Free Software Foundation; either version 2.1 of the 12 | // License, or (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, but 15 | // WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | // Lesser General Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser General Public 20 | // License along with this library; if not, write to the Free Software 21 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | using System; 23 | using TagLib.Mpeg4; 24 | 25 | namespace TagLib 26 | { 27 | /// 28 | /// Represent an MP4 text box 29 | /// 30 | public class TextBox : Box 31 | { 32 | #region Private Fields 33 | 34 | /// 35 | /// Contains the box's data. 36 | /// 37 | ByteVector data; 38 | 39 | #endregion 40 | 41 | 42 | 43 | #region Constructors 44 | 45 | /// 46 | /// Constructs and initializes a new instance of with a provided header and handler 48 | /// by reading the contents from a specified file. 49 | /// 50 | /// 51 | /// A object containing the header 52 | /// to use for the new instance. 53 | /// 54 | /// 55 | /// A object to read the contents 56 | /// of the box from. 57 | /// 58 | /// 59 | /// A object containing the 60 | /// handler that applies to the new instance. 61 | /// 62 | /// 63 | /// is . 64 | /// 65 | public TextBox (BoxHeader header, File file, IsoHandlerBox handler) 66 | : base (header, handler) 67 | { 68 | if (file == null) 69 | throw new ArgumentNullException (nameof (file)); 70 | 71 | data = LoadData (file); 72 | } 73 | 74 | #endregion 75 | 76 | 77 | 78 | #region Public Properties 79 | 80 | /// 81 | /// Gets and sets the box data contained in the current 82 | /// instance. 83 | /// 84 | /// 85 | /// A object containing the box 86 | /// data contained in the current instance. 87 | /// 88 | public override ByteVector Data { 89 | get { return data; } 90 | set { data = value; } 91 | } 92 | 93 | #endregion 94 | } 95 | } 96 | 97 | -------------------------------------------------------------------------------- /src/TaglibSharp/Mpeg4/Boxes/UrlBox.cs: -------------------------------------------------------------------------------- 1 | // 2 | // UrlBox.cs 3 | // 4 | // Author: 5 | // Alan McGovern 6 | // 7 | // Copyright (c) 2012 Alan McGovern 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License as 11 | // published by the Free Software Foundation; either version 2.1 of the 12 | // License, or (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, but 15 | // WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | // Lesser General Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser General Public 20 | // License along with this library; if not, write to the Free Software 21 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | using System; 23 | using TagLib.Mpeg4; 24 | 25 | namespace TagLib 26 | { 27 | /// 28 | /// Represent a MP4 URL box 29 | /// 30 | public class UrlBox : Box 31 | { 32 | #region Private Fields 33 | 34 | /// 35 | /// Contains the box's data. 36 | /// 37 | ByteVector data; 38 | 39 | #endregion 40 | 41 | 42 | 43 | #region Constructors 44 | 45 | /// 46 | /// Constructs and initializes a new instance of with a provided header and handler 48 | /// by reading the contents from a specified file. 49 | /// 50 | /// 51 | /// A object containing the header 52 | /// to use for the new instance. 53 | /// 54 | /// 55 | /// A object to read the contents 56 | /// of the box from. 57 | /// 58 | /// 59 | /// A object containing the 60 | /// handler that applies to the new instance. 61 | /// 62 | /// 63 | /// is . 64 | /// 65 | public UrlBox (BoxHeader header, File file, IsoHandlerBox handler) 66 | : base (header, handler) 67 | { 68 | if (file == null) 69 | throw new ArgumentNullException (nameof (file)); 70 | 71 | data = LoadData (file); 72 | } 73 | 74 | #endregion 75 | 76 | 77 | 78 | #region Public Properties 79 | 80 | /// 81 | /// Gets and sets the box data contained in the current 82 | /// instance. 83 | /// 84 | /// 85 | /// A object containing the box 86 | /// data contained in the current instance. 87 | /// 88 | public override ByteVector Data { 89 | get { return data; } 90 | set { data = value; } 91 | } 92 | 93 | #endregion 94 | } 95 | } 96 | 97 | -------------------------------------------------------------------------------- /src/TaglibSharp/Png/Codec.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Codec.cs: 3 | // 4 | // Author: 5 | // Mike Gemuende (mike@gemuende.be) 6 | // 7 | // Copyright (C) 2010 Mike Gemuende 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.Png 25 | { 26 | 27 | /// 28 | /// A Png photo codec. Contains basic photo details. 29 | /// 30 | public class Codec : Image.Codec 31 | { 32 | 33 | /// 34 | /// Gets a text description of the media represented by the 35 | /// current instance. 36 | /// 37 | /// 38 | /// A object containing a description 39 | /// of the media represented by the current instance. 40 | /// 41 | public override string Description { get { return "PNG File"; } } 42 | 43 | 44 | /// 45 | /// Constructs a new with the given width 46 | /// and height. 47 | /// 48 | /// 49 | /// The width of the photo. 50 | /// 51 | /// 52 | /// The height of the photo. 53 | /// 54 | /// 55 | /// A new instance. 56 | /// 57 | public Codec (int width, int height) 58 | : base (width, height) { } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/TaglibSharp/Tiff/Codec.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Codec.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2009 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.Tiff 25 | { 26 | /// 27 | /// A TIFF photo codec. Contains basic photo details. 28 | /// 29 | public class Codec : Image.Codec 30 | { 31 | readonly string description = "TIFF File"; 32 | 33 | /// 34 | /// Gets a text description of the media represented by the 35 | /// current instance. 36 | /// 37 | /// 38 | /// A object containing a description 39 | /// of the media represented by the current instance. 40 | /// 41 | public override string Description { get { return description; } } 42 | 43 | 44 | /// 45 | /// Constructs a new with the given width 46 | /// and height. 47 | /// 48 | /// 49 | /// The width of the photo. 50 | /// 51 | /// 52 | /// The height of the photo. 53 | /// 54 | /// 55 | /// A new instance. 56 | /// 57 | public Codec (int width, int height) 58 | : base (width, height) { } 59 | 60 | /// 61 | /// Constructs a new with the given width 62 | /// and height. 63 | /// 64 | /// 65 | /// The width of the photo. 66 | /// 67 | /// 68 | /// The height of the photo. 69 | /// 70 | /// 71 | /// The description of the photo type. 72 | /// 73 | /// 74 | /// A new instance. 75 | /// 76 | public Codec (int width, int height, string description) 77 | : base (width, height) 78 | { 79 | this.description = description; 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/TaglibSharp/Tiff/Rw2/IFDTag.cs: -------------------------------------------------------------------------------- 1 | // 2 | // IFDTag.cs: Handles Panasonics weird metadata structure. 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2010 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | using TagLib.IFD.Tags; 25 | 26 | namespace TagLib.Tiff.Rw2 27 | { 28 | /// 29 | /// Handles the weird structure of Panasonic metadata. 30 | /// 31 | public class IFDTag : TagLib.IFD.IFDTag 32 | { 33 | readonly File file; 34 | 35 | internal IFDTag (File file) 36 | { 37 | this.file = file; 38 | } 39 | 40 | /// 41 | /// Gets the ISO speed the image, the current instance belongs 42 | /// to, was taken with. 43 | /// 44 | /// 45 | /// A with the ISO speed as defined in ISO 12232. 46 | /// 47 | /// 48 | /// Panasonic stores these in a somewhat unstandard location. 49 | /// 50 | public override uint? ISOSpeedRatings { 51 | // TODO: The value in JPGFromRAW should probably be used as well. 52 | get { 53 | return Structure.GetLongValue (0, (ushort)PanasonicMakerNoteEntryTag.ISO); 54 | } 55 | set { 56 | Structure.SetLongValue (0, (ushort)PanasonicMakerNoteEntryTag.ISO, value ?? 0); 57 | } 58 | } 59 | 60 | /// 61 | /// Gets the focal length the image, the current instance belongs 62 | /// to, was taken with, assuming a 35mm film camera. 63 | /// 64 | /// 65 | /// A with the focal length in 35mm equivalent in millimeters. 66 | /// 67 | /// 68 | /// Panasonic stores these in a somewhat unstandard location. 69 | /// 70 | public override uint? FocalLengthIn35mmFilm { 71 | get { 72 | var jpg = file.JpgFromRaw; 73 | if (jpg == null) 74 | return base.FocalLengthIn35mmFilm; 75 | 76 | if (!(jpg.GetTag (TagTypes.TiffIFD, true) is Image.ImageTag tag)) 77 | return base.FocalLengthIn35mmFilm; 78 | 79 | return tag.FocalLengthIn35mmFilm ?? base.FocalLengthIn35mmFilm; 80 | } 81 | set { 82 | (file.JpgFromRaw.GetTag (TagTypes.TiffIFD, true) as Image.ImageTag).FocalLengthIn35mmFilm = value; 83 | } 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/TaglibSharp/Xmp/XmpNodeType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // XmpNodeType.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2009 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.Xmp 25 | { 26 | /// 27 | /// Denotes the type of a node. 28 | /// 29 | public enum XmpNodeType 30 | { 31 | /// 32 | /// Unstructured (simple) value node. 33 | /// 34 | Simple, 35 | 36 | /// 37 | /// Structured value node. 38 | /// 39 | Struct, 40 | 41 | /// 42 | /// Ordered array. 43 | /// 44 | Seq, 45 | 46 | /// 47 | /// Language alternative. 48 | /// 49 | Alt, 50 | 51 | /// 52 | /// Unordered structured value. 53 | /// 54 | Bag 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/TaglibSharp/Xmp/XmpNodeVisitor.cs: -------------------------------------------------------------------------------- 1 | // 2 | // XmpNodeVisitor.cs: 3 | // 4 | // Author: 5 | // Ruben Vermeersch (ruben@savanne.be) 6 | // 7 | // Copyright (C) 2009 Ruben Vermeersch 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License version 11 | // 2.1 as published by the Free Software Foundation. 12 | // 13 | // This library is distributed in the hope that it will be useful, but 14 | // WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | // Lesser General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU Lesser General Public 19 | // License along with this library; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 21 | // USA 22 | // 23 | 24 | namespace TagLib.Xmp 25 | { 26 | /// 27 | /// A visitor that walks the XMP node tree. This can be used to 28 | /// perform cleanups of XMP data. See the Visitor pattern for 29 | /// more info if you don't know how to use this. 30 | /// 31 | public interface XmpNodeVisitor 32 | { 33 | /// 34 | /// Visit an . 35 | /// 36 | /// 37 | /// The that is being visited. 38 | /// 39 | void Visit (XmpNode node); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /taglib-sharp.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | 5 | Name: TagLib Sharp 6 | Description: A .NET platform-independent library for reading and writing metadata in media files, including video, audio, and photo formats. 7 | Version: 2.4.0.0 8 | Libs: -r:${libdir}/mono/taglib-sharp/TagLibSharp.dll 9 | -------------------------------------------------------------------------------- /taglib-sharp.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/taglib-sharp.snk -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Collections/ByteVectorCollectionTest.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Collections 2 | { 3 | [TestClass] 4 | public class ByteVectorCollectionTest 5 | { 6 | static ByteVectorCollection BuildList () 7 | { 8 | var list = new ByteVectorCollection { 9 | "ABC", 10 | "DEF", 11 | "GHI" 12 | }; 13 | return list; 14 | } 15 | 16 | [TestMethod] 17 | public void Add () 18 | { 19 | Assert.AreEqual ("ABC:DEF:GHI", BuildList ().ToByteVector (":").ToString ()); 20 | } 21 | 22 | [TestMethod] 23 | public void Remove () 24 | { 25 | var list = BuildList (); 26 | list.Remove ("DEF"); 27 | Assert.AreEqual ("ABCGHI", list.ToByteVector ("").ToString ()); 28 | } 29 | 30 | [TestMethod] 31 | public void Insert () 32 | { 33 | var list = BuildList (); 34 | list.Insert (1, "QUACK"); 35 | Assert.AreEqual ("ABC,QUACK,DEF,GHI", list.ToByteVector (",").ToString ()); 36 | } 37 | 38 | [TestMethod] 39 | public void Contains () 40 | { 41 | var list = BuildList (); 42 | Assert.IsTrue (list.Contains ("DEF")); 43 | Assert.IsFalse (list.Contains ("CDEFG")); 44 | Assert.AreEqual (2, list.ToByteVector ("").Find ("CDEFG")); 45 | } 46 | 47 | /*[TestMethod] 48 | public void SortedInsert() 49 | { 50 | ByteVectorCollection list = BuildList(); 51 | list.SortedInsert("000"); 52 | Console.WriteLine(list.ToByteVector(",").ToString()); 53 | }*/ 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Collections/StringCollectionTest.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Collections 2 | { 3 | [TestClass] 4 | public class StringCollectionTest 5 | { 6 | static StringCollection BuildList () 7 | { 8 | var list = new StringCollection { 9 | "ABC", 10 | "DEF", 11 | "GHI" 12 | }; 13 | return list; 14 | } 15 | 16 | [TestMethod] 17 | public void Add () 18 | { 19 | Assert.AreEqual ("ABC:DEF:GHI", BuildList ().ToString (":")); 20 | } 21 | 22 | [TestMethod] 23 | public void Remove () 24 | { 25 | var list = BuildList (); 26 | list.Remove ("DEF"); 27 | Assert.AreEqual ("ABCGHI", list.ToString (string.Empty)); 28 | } 29 | 30 | [TestMethod] 31 | public void Insert () 32 | { 33 | var list = BuildList (); 34 | list.Insert (1, "QUACK"); 35 | Assert.AreEqual ("ABC,QUACK,DEF,GHI", list.ToString (",")); 36 | } 37 | 38 | [TestMethod] 39 | public void Contains () 40 | { 41 | var list = BuildList (); 42 | Assert.IsTrue (list.Contains ("DEF")); 43 | Assert.IsFalse (list.Contains ("CDEFG")); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/AacFormatTest.cs: -------------------------------------------------------------------------------- 1 | using TagLib.Aac; 2 | 3 | using File = TagLib.File; 4 | 5 | namespace TaglibSharp.Tests.FileFormats 6 | { 7 | [TestClass] 8 | public class AacFormatTest : IFormatTest 9 | { 10 | static readonly string sample_file = TestPath.Samples + "sample.aac"; 11 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite.aac"; 12 | static File file; 13 | 14 | [ClassInitialize] 15 | public static void Init (TestContext testContext) 16 | { 17 | file = File.Create (sample_file); 18 | } 19 | 20 | [TestMethod] 21 | public void ReadAudioProperties () 22 | { 23 | StandardTests.ReadAudioProperties (file); 24 | } 25 | 26 | [TestMethod] 27 | public void ReadTags () 28 | { 29 | Assert.AreEqual ("AAC album", file.Tag.Album); 30 | Assert.AreEqual ("AAC artist", file.Tag.FirstPerformer); 31 | Assert.AreEqual ("AAC comment", file.Tag.Comment); 32 | Assert.AreEqual ("Acid Punk", file.Tag.FirstGenre); 33 | Assert.AreEqual ("AAC title", file.Tag.Title); 34 | Assert.AreEqual (6u, file.Tag.Track); 35 | Assert.AreEqual (1234u, file.Tag.Year); 36 | } 37 | 38 | [TestMethod] 39 | public void WriteStandardTags () 40 | { 41 | StandardTests.WriteStandardTags (sample_file, tmp_file); 42 | } 43 | 44 | [TestMethod] 45 | public void WriteStandardPictures () 46 | { 47 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.None); 48 | } 49 | 50 | [TestMethod] 51 | public void WriteStandardPicturesLazy () 52 | { 53 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.PictureLazy); 54 | } 55 | 56 | [TestMethod] 57 | public void TestCorruptionResistance () 58 | { 59 | StandardTests.TestCorruptionResistance (TestPath.Samples + "corrupt/a.aac"); 60 | } 61 | 62 | [TestMethod] 63 | public void TestBitStream () 64 | { 65 | byte[] data = { 0xAA, 0xAD, 0xFE, 0xE9, 0xFF, 0xFF, 0xFF }; 66 | var stream = new BitStream (data); 67 | 68 | // 2 5 5 45 69 | // (10)(101)(010 1)(0101101) 70 | // 0xAA 0xAD 71 | 72 | // 63 745 73 | // (111111)(10 11101001) 74 | // 0xFE 0xAA 75 | 76 | // 16777215 77 | // (11111111 11111111 11111111) 78 | // 0xFF 0xFF 0xFF 79 | 80 | Assert.AreEqual (2, stream.ReadInt32 (2)); 81 | Assert.AreEqual (5, stream.ReadInt32 (3)); 82 | Assert.AreEqual (5, stream.ReadInt32 (4)); 83 | Assert.AreEqual (45, stream.ReadInt32 (7)); 84 | Assert.AreEqual (63, stream.ReadInt32 (6)); 85 | Assert.AreEqual (745, stream.ReadInt32 (10)); 86 | Assert.AreEqual (16777215, stream.ReadInt32 (24)); 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/AiffFormatTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.FileFormats; 4 | 5 | [TestClass] 6 | public class AiffFormatTest : IFormatTest 7 | { 8 | static readonly string sample_file = TestPath.Samples + "sample.aif"; 9 | static readonly string corrupt_file = TestPath.Samples + "corrupta.aif"; 10 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite.aif"; 11 | static File file; 12 | 13 | [ClassInitialize] 14 | public static void Init (TestContext testContext) 15 | { 16 | file = File.Create (sample_file); 17 | } 18 | 19 | [TestMethod] 20 | public void ReadAudioProperties () 21 | { 22 | Assert.AreEqual (44100, file.Properties.AudioSampleRate); 23 | Assert.AreEqual (2, file.Properties.Duration.Seconds); 24 | } 25 | 26 | [TestMethod] 27 | public void ReadTags () 28 | { 29 | Assert.AreEqual ("Aiff Album", file.Tag.Album); 30 | Assert.AreEqual ("Aiff Artist", file.Tag.FirstPerformer); 31 | Assert.AreEqual ("Aiff Comment", file.Tag.Comment); 32 | Assert.AreEqual ("Blues", file.Tag.FirstGenre); 33 | Assert.AreEqual ("Aiff Title", file.Tag.Title); 34 | Assert.AreEqual (5u, file.Tag.Track); 35 | Assert.AreEqual (10u, file.Tag.TrackCount); 36 | 37 | // sample.aif contains a TDAT (and no TYER) with 2009 in it, but TDAT 38 | // is supposed to contain MMDD - so the following should not be equal 39 | Assert.AreNotEqual (2009u, file.Tag.Year); 40 | } 41 | 42 | [TestMethod] 43 | public void WriteStandardTags () 44 | { 45 | StandardTests.WriteStandardTags (sample_file, tmp_file); 46 | } 47 | 48 | [TestMethod] 49 | public void WriteExtendedTags () 50 | { 51 | ExtendedTests.WriteExtendedTags (sample_file, tmp_file); 52 | } 53 | 54 | [TestMethod] 55 | public void WriteStandardPictures () 56 | { 57 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.None); 58 | } 59 | 60 | [TestMethod] 61 | public void WriteStandardPicturesLazy () 62 | { 63 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.PictureLazy); 64 | } 65 | 66 | [TestMethod] 67 | public void TestCorruptionResistance () 68 | { 69 | StandardTests.TestCorruptionResistance (corrupt_file); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/AsfFormatTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.FileFormats; 4 | 5 | [TestClass] 6 | public class AsfFormatTest : IFormatTest 7 | { 8 | static readonly string sample_file = TestPath.Samples + "sample.wma"; 9 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite.wma"; 10 | static File file; 11 | 12 | [ClassInitialize] 13 | public static void Init (TestContext testContext) 14 | { 15 | file = File.Create (sample_file); 16 | } 17 | 18 | [TestMethod] 19 | public void ReadAudioProperties () 20 | { 21 | Assert.AreEqual (96, file.Properties.AudioBitrate); 22 | Assert.AreEqual (2, file.Properties.AudioChannels); 23 | Assert.AreEqual (44100, file.Properties.AudioSampleRate); 24 | // NOTE, with .net core it keeps the decimal places. So, for now, we round to match .net behavior 25 | Assert.AreEqual (4153, Math.Round(file.Properties.Duration.TotalMilliseconds)); 26 | Assert.AreEqual (MediaTypes.Audio, file.Properties.MediaTypes); 27 | } 28 | 29 | [TestMethod] 30 | public void ReadTags () 31 | { 32 | Assert.AreEqual ("WMA album", file.Tag.Album); 33 | Assert.AreEqual ("Dan Drake", file.Tag.FirstAlbumArtist); 34 | Assert.AreEqual ("WMA artist", file.Tag.FirstPerformer); 35 | Assert.AreEqual ("WMA comment", file.Tag.Description); 36 | Assert.AreEqual ("Brit Pop", file.Tag.FirstGenre); 37 | Assert.AreEqual ("WMA title", file.Tag.Title); 38 | Assert.AreEqual (5u, file.Tag.Track); 39 | Assert.AreEqual (2005u, file.Tag.Year); 40 | } 41 | 42 | [TestMethod] 43 | public void WriteStandardTags () 44 | { 45 | StandardTests.WriteStandardTags (sample_file, tmp_file); 46 | } 47 | 48 | [TestMethod] 49 | public void WriteStandardPictures () 50 | { 51 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.None); 52 | } 53 | 54 | [TestMethod] 55 | [Ignore ("PictureLazy not supported yet")] 56 | public void WriteStandardPicturesLazy () 57 | { 58 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.PictureLazy); 59 | } 60 | 61 | [TestMethod] 62 | public void WriteExtendedTags () 63 | { 64 | ExtendedTests.WriteExtendedTags (sample_file, tmp_file); 65 | } 66 | 67 | [TestMethod] 68 | public void TestCorruptionResistance () 69 | { 70 | StandardTests.TestCorruptionResistance (TestPath.Samples + "corrupt/a.wma"); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/AviFormatTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.FileFormats; 4 | 5 | [TestClass] 6 | public class AviFormatTest : IFormatTest 7 | { 8 | static readonly string sample_file = TestPath.Samples + "sample.avi"; 9 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite.avi"; 10 | static File file; 11 | 12 | [ClassInitialize] 13 | public static void Init (TestContext testContext) 14 | { 15 | file = File.Create (sample_file); 16 | } 17 | 18 | [TestMethod] 19 | public void ReadAudioProperties () 20 | { 21 | StandardTests.ReadAudioProperties (file); 22 | } 23 | 24 | [TestMethod] 25 | public void ReadTags () 26 | { 27 | Assert.AreEqual ("Avi album", file.Tag.Album); 28 | Assert.AreEqual ("Dan Drake", file.Tag.FirstAlbumArtist); 29 | Assert.AreEqual ("AVI artist", file.Tag.FirstPerformer); 30 | Assert.AreEqual ("AVI comment", file.Tag.Comment); 31 | Assert.AreEqual ("Brit Pop", file.Tag.FirstGenre); 32 | Assert.AreEqual ("AVI title", file.Tag.Title); 33 | Assert.AreEqual (5u, file.Tag.Track); 34 | Assert.AreEqual (2005u, file.Tag.Year); 35 | } 36 | 37 | [TestMethod] 38 | public void WriteStandardTags () 39 | { 40 | StandardTests.WriteStandardTags (sample_file, tmp_file, StandardTests.TestTagLevel.Medium); 41 | } 42 | 43 | 44 | [TestMethod] 45 | public void WriteStandardPictures () 46 | { 47 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.None); 48 | } 49 | 50 | [TestMethod] 51 | public void WriteStandardPicturesLazy () 52 | { 53 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.PictureLazy); 54 | } 55 | 56 | 57 | [TestMethod] 58 | public void WriteStandardTagsID3v2 () 59 | { 60 | StandardTests.WriteStandardTags (sample_file, tmp_file, StandardTests.TestTagLevel.Medium, TagTypes.Id3v2); 61 | } 62 | 63 | [TestMethod] 64 | public void TestCorruptionResistance () 65 | { 66 | StandardTests.TestCorruptionResistance (TestPath.Samples + "corrupt/a.avi"); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/DsfFormatTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.FileFormats; 4 | 5 | [TestClass] 6 | public class DsfFormatTest : IFormatTest 7 | { 8 | static readonly string sample_file = TestPath.Samples + "sample.dsf"; 9 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite.dsf"; 10 | static File file; 11 | 12 | [ClassInitialize] 13 | public static void Init (TestContext testContext) 14 | { 15 | file = File.Create (sample_file); 16 | } 17 | 18 | [TestMethod] 19 | public void ReadAudioProperties () 20 | { 21 | Assert.AreEqual (2822400, file.Properties.AudioSampleRate); 22 | } 23 | 24 | [TestMethod] 25 | public void ReadTags () 26 | { 27 | Assert.AreEqual ("Dsf Album", file.Tag.Album); 28 | Assert.AreEqual ("Dsf Artist", file.Tag.FirstPerformer); 29 | Assert.AreEqual ("Dsf Comment", file.Tag.Comment); 30 | Assert.AreEqual ("Rock", file.Tag.FirstGenre); 31 | Assert.AreEqual ("Dsf Title", file.Tag.Title); 32 | Assert.AreEqual (1u, file.Tag.Track); 33 | Assert.AreEqual (2016u, file.Tag.Year); 34 | } 35 | 36 | [TestMethod] 37 | public void WriteStandardTags () 38 | { 39 | StandardTests.WriteStandardTags (sample_file, tmp_file); 40 | } 41 | 42 | [TestMethod] 43 | public void WriteStandardPictures () 44 | { 45 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.None); 46 | } 47 | 48 | [TestMethod] 49 | public void WriteStandardPicturesLazy () 50 | { 51 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.PictureLazy); 52 | } 53 | 54 | [TestMethod] 55 | public void TestCorruptionResistance () 56 | { 57 | StandardTests.TestCorruptionResistance (TestPath.Samples + "corrupt/a.dsf"); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/ExtendedTests.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.FileFormats 4 | { 5 | public static class ExtendedTests 6 | { 7 | public static void WriteExtendedTags (string sample_file, string tmp_file) 8 | { 9 | if (System.IO.File.Exists (tmp_file)) 10 | System.IO.File.Delete (tmp_file); 11 | 12 | try { 13 | System.IO.File.Copy (sample_file, tmp_file); 14 | 15 | var tmp = File.Create (tmp_file); 16 | SetTags (tmp.Tag); 17 | tmp.Save (); 18 | 19 | tmp = File.Create (tmp_file); 20 | CheckTags (tmp.Tag); 21 | } finally { 22 | if (System.IO.File.Exists (tmp_file)) 23 | System.IO.File.Delete (tmp_file); 24 | } 25 | } 26 | 27 | public static void SetTags (Tag tag) 28 | { 29 | tag.ReplayGainTrackGain = -10.28; 30 | tag.ReplayGainTrackPeak = 0.999969; 31 | tag.ReplayGainAlbumGain = -9.98; 32 | tag.ReplayGainAlbumPeak = 0.999980; 33 | } 34 | 35 | public static void CheckTags (Tag tag) 36 | { 37 | Assert.AreEqual (-10.28, tag.ReplayGainTrackGain); 38 | Assert.AreEqual (0.999969, tag.ReplayGainTrackPeak); 39 | Assert.AreEqual (-9.98, tag.ReplayGainAlbumGain); 40 | Assert.AreEqual (0.999980, tag.ReplayGainAlbumPeak); 41 | } 42 | 43 | public static void TestCorruptionResistance (string path) 44 | { 45 | try { 46 | File.Create (path); 47 | } catch (CorruptFileException) { 48 | } catch (NullReferenceException) { 49 | throw; 50 | } catch { 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/IFormatTest.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.FileFormats; 2 | 3 | public interface IFormatTest 4 | { 5 | void ReadAudioProperties (); 6 | void ReadTags (); 7 | void TestCorruptionResistance (); 8 | } 9 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/Id3V1FormatTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.FileFormats; 4 | 5 | [TestClass] 6 | public class Id3V1FormatTest : IFormatTest 7 | { 8 | static readonly string sample_file = TestPath.Samples + "sample_v1_only.mp3"; 9 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite_v1_only.mp3"; 10 | static File file; 11 | 12 | [ClassInitialize] 13 | public static void Init (TestContext testContext) 14 | { 15 | file = File.Create (sample_file); 16 | } 17 | 18 | [TestMethod] 19 | public void ReadAudioProperties () 20 | { 21 | Assert.AreEqual (44100, file.Properties.AudioSampleRate); 22 | Assert.AreEqual (1, file.Properties.Duration.Seconds); 23 | } 24 | 25 | [TestMethod] 26 | public void ReadTags () 27 | { 28 | Assert.AreEqual ("MP3 album", file.Tag.Album); 29 | Assert.AreEqual ("MP3 artist", file.Tag.FirstPerformer); 30 | Assert.AreEqual ("MP3 comment", file.Tag.Comment); 31 | Assert.AreEqual ("Acid Punk", file.Tag.FirstGenre); 32 | Assert.AreEqual ("MP3 title", file.Tag.Title); 33 | Assert.AreEqual (6u, file.Tag.Track); 34 | Assert.AreEqual (1234u, file.Tag.Year); 35 | } 36 | 37 | [TestMethod] 38 | public void WriteStandardTags () 39 | { 40 | StandardTests.WriteStandardTags (sample_file, tmp_file); 41 | } 42 | 43 | [TestMethod] 44 | public void WriteStandardPictures () 45 | { 46 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.None); 47 | } 48 | 49 | [TestMethod] 50 | public void WriteStandardPicturesLazy () 51 | { 52 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.PictureLazy); 53 | } 54 | 55 | 56 | [TestMethod] 57 | public void TestCorruptionResistance () 58 | { 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/MpcFormatTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.FileFormats; 4 | 5 | [TestClass] 6 | public class MpcFormatTest : IFormatTest 7 | { 8 | static readonly string sample_file = TestPath.Samples + "sample.mpc"; 9 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite.mpc"; 10 | static File file; 11 | 12 | [ClassInitialize] 13 | public static void Init (TestContext testContext) 14 | { 15 | file = File.Create (sample_file); 16 | } 17 | 18 | [TestMethod] 19 | public void ReadAudioProperties () 20 | { 21 | StandardTests.ReadAudioProperties (file); 22 | } 23 | 24 | [TestMethod] 25 | public void ReadTags () 26 | { 27 | Assert.AreEqual ("MPC album", file.Tag.Album); 28 | Assert.AreEqual ("MPC artist", file.Tag.FirstPerformer); 29 | Assert.AreEqual ("MPC comment", file.Tag.Comment); 30 | Assert.AreEqual ("Acid Punk", file.Tag.FirstGenre); 31 | Assert.AreEqual ("MPC title", file.Tag.Title); 32 | Assert.AreEqual (6u, file.Tag.Track); 33 | Assert.AreEqual (7u, file.Tag.TrackCount); 34 | Assert.AreEqual (1234u, file.Tag.Year); 35 | } 36 | 37 | [TestMethod] 38 | public void WriteStandardTags () 39 | { 40 | StandardTests.WriteStandardTags (sample_file, tmp_file); 41 | } 42 | 43 | [TestMethod] 44 | public void WriteStandardPictures () 45 | { 46 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.None, StandardTests.TestTagLevel.Normal); 47 | } 48 | 49 | [TestMethod] 50 | [Ignore ("PictureLazy not supported yet")] 51 | public void WriteStandardPicturesLazy () 52 | { 53 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.PictureLazy, StandardTests.TestTagLevel.Normal); 54 | } 55 | 56 | [TestMethod] 57 | public void TestCorruptionResistance () 58 | { 59 | StandardTests.TestCorruptionResistance (TestPath.Samples + "corrupt/a.mpc"); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/Mpcv8FormatTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.FileFormats; 4 | 5 | [TestClass] 6 | public class MpcV8FormatTest : IFormatTest 7 | { 8 | static readonly string sample_file = TestPath.Samples + "sample_v8.mpc"; 9 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite_v8.mpc"; 10 | static File file; 11 | 12 | [ClassInitialize] 13 | public static void Init (TestContext testContext) 14 | { 15 | file = File.Create (sample_file); 16 | } 17 | 18 | [TestMethod] 19 | public void ReadAudioProperties () 20 | { 21 | StandardTests.ReadAudioProperties (file); 22 | } 23 | 24 | [TestMethod] 25 | public void ReadTags () 26 | { 27 | Assert.AreEqual ("Mpc Album", file.Tag.Album); 28 | Assert.AreEqual ("Mpc Artist", file.Tag.FirstPerformer); 29 | Assert.AreEqual ("Mpc Comment", file.Tag.Comment); 30 | Assert.AreEqual ("Pop", file.Tag.FirstGenre); 31 | Assert.AreEqual ("Mpc Title", file.Tag.Title); 32 | Assert.AreEqual (1u, file.Tag.Track); 33 | Assert.AreEqual (10u, file.Tag.TrackCount); 34 | Assert.AreEqual (2016u, file.Tag.Year); 35 | } 36 | 37 | [TestMethod] 38 | public void WriteStandardTags () 39 | { 40 | StandardTests.WriteStandardTags (sample_file, tmp_file); 41 | } 42 | 43 | 44 | [TestMethod] 45 | public void WriteStandardPictures () 46 | { 47 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.None, StandardTests.TestTagLevel.Normal); 48 | } 49 | 50 | [TestMethod] 51 | [Ignore ("PictureLazy not supported yet")] 52 | public void WriteStandardPicturesLazy () 53 | { 54 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.PictureLazy, StandardTests.TestTagLevel.Normal); 55 | } 56 | 57 | 58 | [TestMethod] 59 | public void TestCorruptionResistance () 60 | { 61 | StandardTests.TestCorruptionResistance (TestPath.Samples + "corrupt/a.mpc"); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/OggFormatTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.FileFormats; 4 | 5 | [TestClass] 6 | public class OggFormatTest : IFormatTest 7 | { 8 | static readonly string sample_file = TestPath.Samples + "sample.ogg"; 9 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite.ogg"; 10 | static File file; 11 | 12 | [ClassInitialize] 13 | public static void Init (TestContext testContext) 14 | { 15 | file = File.Create (sample_file); 16 | } 17 | 18 | [TestMethod] 19 | public void ReadAudioProperties () 20 | { 21 | StandardTests.ReadAudioProperties (file); 22 | } 23 | 24 | [TestMethod] 25 | public void ReadTags () 26 | { 27 | Assert.AreEqual ("OGG album", file.Tag.Album); 28 | Assert.AreEqual ("OGG artist", file.Tag.FirstPerformer); 29 | Assert.AreEqual ("OGG comment", file.Tag.Comment); 30 | Assert.AreEqual ("Acid Punk", file.Tag.FirstGenre); 31 | Assert.AreEqual ("OGG title", file.Tag.Title); 32 | Assert.AreEqual (6u, file.Tag.Track); 33 | Assert.AreEqual (7u, file.Tag.TrackCount); 34 | Assert.AreEqual (1234u, file.Tag.Year); 35 | } 36 | 37 | [TestMethod] 38 | public void WriteStandardTags () 39 | { 40 | StandardTests.WriteStandardTags (sample_file, tmp_file, StandardTests.TestTagLevel.Medium); 41 | } 42 | 43 | [TestMethod] 44 | public void WriteExtendedTags () 45 | { 46 | ExtendedTests.WriteExtendedTags (sample_file, tmp_file); 47 | } 48 | 49 | [TestMethod] 50 | public void WriteStandardPictures () 51 | { 52 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.None); 53 | } 54 | 55 | [TestMethod] 56 | [Ignore ("PictureLazy not supported yet")] 57 | public void WriteStandardPicturesLazy () 58 | { 59 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.PictureLazy); 60 | } 61 | 62 | 63 | [TestMethod] 64 | public void TestCorruptionResistance () 65 | { 66 | StandardTests.TestCorruptionResistance (TestPath.Samples + "corrupt/a.ogg"); 67 | StandardTests.TestCorruptionResistance (TestPath.Samples + "corrupt/missing_flag.ogg"); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/FileFormats/WavFormatTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.FileFormats; 4 | 5 | [TestClass] 6 | public class WavFormatTest : IFormatTest 7 | { 8 | static readonly string sample_file = TestPath.Samples + "sample.wav"; 9 | static readonly string sample_picture = TestPath.Samples + "sample_gimp.gif"; 10 | static readonly string sample_other = TestPath.Samples + "apple_tags.m4a"; 11 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite.wav"; 12 | static File file; 13 | 14 | [ClassInitialize] 15 | public static void Init (TestContext testContext) 16 | { 17 | file = File.Create (sample_file); 18 | } 19 | 20 | [TestMethod] 21 | public void ReadAudioProperties () 22 | { 23 | Assert.AreEqual (44100, file.Properties.AudioSampleRate); 24 | Assert.AreEqual (2000, file.Properties.Duration.TotalMilliseconds); 25 | Assert.AreEqual (16, file.Properties.BitsPerSample); 26 | Assert.AreEqual (706, file.Properties.AudioBitrate); 27 | Assert.AreEqual (1, file.Properties.AudioChannels); 28 | } 29 | 30 | [TestMethod] 31 | public void ReadTags () 32 | { 33 | Assert.AreEqual ("Artist", file.Tag.FirstPerformer); 34 | Assert.AreEqual ("yepa", file.Tag.Comment); 35 | Assert.AreEqual ("Genre", file.Tag.FirstGenre); 36 | Assert.AreEqual ("Album", file.Tag.Album); 37 | Assert.AreEqual ("Title", file.Tag.Title); 38 | Assert.AreEqual (2009u, file.Tag.Year); 39 | Assert.IsNull (file.Tag.FirstComposer); 40 | Assert.IsNull (file.Tag.Conductor); 41 | Assert.IsNull (file.Tag.Copyright); 42 | } 43 | 44 | [TestMethod] 45 | public void ReadPictures () 46 | { 47 | var pics = file.Tag.Pictures; 48 | Assert.AreEqual (PictureType.FrontCover, pics[0].Type); 49 | Assert.AreEqual ("image/jpeg", pics[0].MimeType); 50 | Assert.AreEqual (10210, pics[0].Data.Count); 51 | } 52 | 53 | [TestMethod] 54 | public void WriteStandardPictures () 55 | { 56 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.None); 57 | } 58 | 59 | [TestMethod] 60 | public void WriteStandardPicturesLazy () 61 | { 62 | StandardTests.WriteStandardPictures (sample_file, tmp_file, ReadStyle.PictureLazy); 63 | } 64 | 65 | [TestMethod] 66 | public void WriteStandardTags () 67 | { 68 | StandardTests.WriteStandardTags (sample_file, tmp_file, StandardTests.TestTagLevel.Medium); 69 | } 70 | 71 | [TestMethod] 72 | public void RemoveStandardTags () 73 | { 74 | StandardTests.RemoveStandardTags (sample_file, tmp_file); 75 | } 76 | 77 | [TestMethod] 78 | public void TestCorruptionResistance () 79 | { 80 | StandardTests.TestCorruptionResistance (TestPath.Samples + "corrupt/a.mkv"); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/GifExiftoolLongCommentTest.cs: -------------------------------------------------------------------------------- 1 | using TaglibSharp.Tests.Images.Validators; 2 | 3 | namespace TaglibSharp.Tests.Images 4 | { 5 | [TestClass] 6 | public class GifExiftoolLongCommentTest 7 | { 8 | static readonly string long_comment_orig = "This is a very long comment, because long comments must be stored in mutiple sub-blocks. This comment is used to check that long comments are parsed correctly and that they are written back correctly. So what else to say? taglib rocks - 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz 1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz"; 9 | static readonly string long_comment_test = "ABCD " + long_comment_orig + " CDEF " + long_comment_orig; 10 | 11 | [TestMethod] 12 | public void Test () 13 | { 14 | // This file is originally created with GIMP and the metadata was modified 15 | // by exiftool. A very long comment is added by exiftool because such comments 16 | // are stored in multiple sub-blocks. This should be handled by taglib. 17 | ImageTest.Run ("sample_exiftool_long_comment.gif", 18 | true, 19 | new GifExiftoolLongCommentTestInvariantValidator (), 20 | NoModificationValidator.Instance, 21 | new TagKeywordsModificationValidator (new string[] { }, TagTypes.XMP, true), 22 | new CommentModificationValidator (long_comment_orig), 23 | new CommentModificationValidator (long_comment_orig, long_comment_test), 24 | new TagCommentModificationValidator (long_comment_orig, TagTypes.GifComment, true), 25 | new TagCommentModificationValidator (long_comment_orig, long_comment_test, TagTypes.GifComment, true), 26 | new RemoveMetadataValidator (TagTypes.GifComment | TagTypes.XMP), 27 | new RemoveMetadataValidator (TagTypes.GifComment | TagTypes.XMP, TagTypes.GifComment), 28 | new RemoveMetadataValidator (TagTypes.GifComment | TagTypes.XMP, TagTypes.XMP) 29 | ); 30 | } 31 | } 32 | 33 | public class GifExiftoolLongCommentTestInvariantValidator : IMetadataInvariantValidator 34 | { 35 | public void ValidateMetadataInvariants (TagLib.Image.File file) 36 | { 37 | Assert.IsNotNull (file); 38 | Assert.IsNotNull (file.Properties); 39 | 40 | Assert.AreEqual (12, file.Properties.PhotoWidth); 41 | Assert.AreEqual (37, file.Properties.PhotoHeight); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/GifExiftoolTangled1Test.cs: -------------------------------------------------------------------------------- 1 | using TaglibSharp.Tests.Images.Validators; 2 | 3 | namespace TaglibSharp.Tests.Images; 4 | 5 | [TestClass] 6 | public class GifExiftoolTangled1Test 7 | { 8 | [TestMethod] 9 | public void Test () 10 | { 11 | // This file is originally created with GIMP and the metadata was modified 12 | // by exiftool. Furthermore, the file is modified in the following way: 13 | // (1) the version 89a is substituted by 87a, this leads to an invalid 87a 14 | // file, but we change the version if we write metadata. 15 | // (2) the blocks which contain the metadata are moved to the end of the file. 16 | // This is allowed and should be handled correctly by taglib. 17 | ImageTest.Run ("sample_exiftool_tangled1.gif", 18 | true, 19 | new GifExiftoolTangled1TestInvariantValidator (), 20 | NoModificationValidator.Instance, 21 | new TagKeywordsModificationValidator (new[] { "Keyword 1", "Keyword 2" }, TagTypes.XMP, true), 22 | new CommentModificationValidator ("Created with GIMP"), 23 | new TagCommentModificationValidator ("Created with GIMP", TagTypes.GifComment, true), 24 | new RemoveMetadataValidator (TagTypes.GifComment | TagTypes.XMP), 25 | new RemoveMetadataValidator (TagTypes.GifComment | TagTypes.XMP, TagTypes.GifComment), 26 | new RemoveMetadataValidator (TagTypes.GifComment | TagTypes.XMP, TagTypes.XMP) 27 | ); 28 | } 29 | } 30 | 31 | public class GifExiftoolTangled1TestInvariantValidator : IMetadataInvariantValidator 32 | { 33 | public void ValidateMetadataInvariants (TagLib.Image.File file) 34 | { 35 | Assert.IsNotNull (file); 36 | Assert.IsNotNull (file.Properties); 37 | 38 | Assert.AreEqual (12, file.Properties.PhotoWidth); 39 | Assert.AreEqual (37, file.Properties.PhotoHeight); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/GifExiftoolTangled2Test.cs: -------------------------------------------------------------------------------- 1 | using TaglibSharp.Tests.Images.Validators; 2 | 3 | namespace TaglibSharp.Tests.Images 4 | { 5 | [TestClass] 6 | public class GifExiftoolTangled2Test 7 | { 8 | [TestMethod] 9 | public void Test () 10 | { 11 | // This file is originally created with GIMP and the metadata was modified 12 | // by exiftool. Furthermore, the file is modified in the following way: 13 | // (1) the version 89a is substituted by 87a, this leads to an invalid 87a 14 | // file, but we change the version if we write metadata. 15 | // (2) the blocks which contain the metadata are moved to the end of the file. 16 | // This is allowed and should be handled correctly by taglib. 17 | // (3) Gif Comment block is removed 18 | ImageTest.Run ("sample_exiftool_tangled2.gif", 19 | true, 20 | new GifExiftoolTangled2TestInvariantValidator (), 21 | NoModificationValidator.Instance, 22 | new TagKeywordsModificationValidator (new[] { "Keyword 1", "Keyword 2" }, TagTypes.XMP, true), 23 | new CommentModificationValidator (), 24 | new TagCommentModificationValidator (null, TagTypes.GifComment, false), 25 | new RemoveMetadataValidator (TagTypes.XMP) 26 | ); 27 | } 28 | } 29 | 30 | public class GifExiftoolTangled2TestInvariantValidator : IMetadataInvariantValidator 31 | { 32 | public void ValidateMetadataInvariants (TagLib.Image.File file) 33 | { 34 | Assert.IsNotNull (file); 35 | Assert.IsNotNull (file.Properties); 36 | 37 | Assert.AreEqual (12, file.Properties.PhotoWidth); 38 | Assert.AreEqual (37, file.Properties.PhotoHeight); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/GifExiftoolTangled3Test.cs: -------------------------------------------------------------------------------- 1 | using TaglibSharp.Tests.Images.Validators; 2 | 3 | namespace TaglibSharp.Tests.Images 4 | { 5 | [TestClass] 6 | public class GifExiftoolTangled3Test 7 | { 8 | [TestMethod] 9 | public void Test () 10 | { 11 | // This file is originally created with GIMP and the metadata was modified 12 | // by exiftool. Furthermore, the file is modified in the following way: 13 | // (1) the blocks which contain the metadata are moved to the end of the file. 14 | // This is allowed and should be handled correctly by taglib. 15 | // (2) XMP Block is removed. 16 | ImageTest.Run ("sample_exiftool_tangled3.gif", 17 | true, 18 | new GifExiftoolTangled3TestInvariantValidator (), 19 | NoModificationValidator.Instance, 20 | new TagKeywordsModificationValidator (new string[] { }, TagTypes.XMP, false), 21 | new CommentModificationValidator ("Created with GIMP"), 22 | new TagCommentModificationValidator ("Created with GIMP", TagTypes.GifComment, true), 23 | new RemoveMetadataValidator (TagTypes.GifComment) 24 | ); 25 | } 26 | } 27 | 28 | public class GifExiftoolTangled3TestInvariantValidator : IMetadataInvariantValidator 29 | { 30 | public void ValidateMetadataInvariants (TagLib.Image.File file) 31 | { 32 | Assert.IsNotNull (file); 33 | Assert.IsNotNull (file.Properties); 34 | 35 | Assert.AreEqual (12, file.Properties.PhotoWidth); 36 | Assert.AreEqual (37, file.Properties.PhotoHeight); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/GifExiftoolTest.cs: -------------------------------------------------------------------------------- 1 | using TaglibSharp.Tests.Images.Validators; 2 | 3 | namespace TaglibSharp.Tests.Images 4 | { 5 | [TestClass] 6 | public class GifExiftoolTest 7 | { 8 | [TestMethod] 9 | public void Test () 10 | { 11 | // This file is originally created with GIMP and the metadata was modified 12 | // by exiftool. 13 | ImageTest.Run ("sample_exiftool.gif", 14 | true, 15 | new GifExiftoolTestInvariantValidator (), 16 | NoModificationValidator.Instance, 17 | new TagKeywordsModificationValidator (new[] { "Keyword 1", "Keyword 2" }, TagTypes.XMP, true), 18 | new CommentModificationValidator ("Created with GIMP"), 19 | new TagCommentModificationValidator ("Created with GIMP", TagTypes.GifComment, true), 20 | new RemoveMetadataValidator (TagTypes.GifComment | TagTypes.XMP), 21 | new RemoveMetadataValidator (TagTypes.GifComment | TagTypes.XMP, TagTypes.GifComment) 22 | ); 23 | } 24 | } 25 | 26 | public class GifExiftoolTestInvariantValidator : IMetadataInvariantValidator 27 | { 28 | public void ValidateMetadataInvariants (TagLib.Image.File file) 29 | { 30 | Assert.IsNotNull (file); 31 | Assert.IsNotNull (file.Properties); 32 | 33 | Assert.AreEqual (12, file.Properties.PhotoWidth); 34 | Assert.AreEqual (37, file.Properties.PhotoHeight); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/GifGimpTest.cs: -------------------------------------------------------------------------------- 1 | using TaglibSharp.Tests.Images.Validators; 2 | 3 | namespace TaglibSharp.Tests.Images 4 | { 5 | [TestClass] 6 | public class GifGimpTest 7 | { 8 | [TestMethod] 9 | public void Test () 10 | { 11 | // This file is originally created with GIMP. 12 | ImageTest.Run ("sample_gimp.gif", 13 | true, 14 | new GifGimpTestInvariantValidator (), 15 | NoModificationValidator.Instance, 16 | new CommentModificationValidator ("Created with GIMP"), 17 | new TagCommentModificationValidator ("Created with GIMP", TagTypes.GifComment, true), 18 | new TagKeywordsModificationValidator (TagTypes.XMP, false), 19 | new RemoveMetadataValidator (TagTypes.GifComment) 20 | ); 21 | } 22 | } 23 | 24 | public class GifGimpTestInvariantValidator : IMetadataInvariantValidator 25 | { 26 | public void ValidateMetadataInvariants (TagLib.Image.File file) 27 | { 28 | Assert.IsNotNull (file); 29 | Assert.IsNotNull (file.Properties); 30 | 31 | Assert.AreEqual (12, file.Properties.PhotoWidth); 32 | Assert.AreEqual (37, file.Properties.PhotoHeight); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/ImageTagTests.cs: -------------------------------------------------------------------------------- 1 | using TagLib.Image; 2 | 3 | namespace TaglibSharp.Tests.Images; 4 | 5 | /// 6 | /// This test validates the correct mapping of different metadata formats onto ImageTag. 7 | /// 8 | [TestClass] 9 | public class ImageTagTests 10 | { 11 | [TestMethod] 12 | public void TestXMPImageTag () 13 | { 14 | var file = TagLib.File.Create (TestPath.Samples + "sample_canon_bibble5.jpg") as TagLib.Image.File; 15 | Assert.IsNotNull (file); 16 | 17 | var tag = file.GetTag (TagTypes.XMP) as ImageTag; 18 | Assert.IsNotNull (tag); 19 | 20 | Assert.IsNull (tag.Comment, "Comment"); 21 | CollectionAssert.AreEqual (new string[] { }, tag.Keywords, "Keywords"); 22 | Assert.AreEqual (0u, tag.Rating, "Rating"); 23 | Assert.IsNull (tag.DateTime, "DateTime"); 24 | Assert.AreEqual (ImageOrientation.None, tag.Orientation, "Orientation"); 25 | Assert.IsNull (tag.Software, "Software"); 26 | Assert.IsNull (tag.Latitude, "Latitude"); 27 | Assert.IsNull (tag.Longitude, "Longitude"); 28 | Assert.IsNull (tag.Altitude, "Altitude"); 29 | Assert.AreEqual (0.005, tag.ExposureTime, "ExposureTime"); 30 | Assert.AreEqual (5, tag.FNumber, "FNumber"); 31 | Assert.AreEqual (100u, tag.ISOSpeedRatings, "ISOSpeedRatings"); 32 | Assert.AreEqual (21, tag.FocalLength, "FocalLength"); 33 | Assert.IsNull (tag.FocalLengthIn35mmFilm, "FocalLengthIn35mmFilm"); 34 | Assert.AreEqual ("Canon", tag.Make, "Make"); 35 | Assert.AreEqual ("Canon EOS 400D DIGITAL", tag.Model, "Model"); 36 | Assert.IsNull (tag.Creator, "Creator"); 37 | } 38 | 39 | [TestMethod] 40 | public void TestXMPImageTag2 () 41 | { 42 | var file = TagLib.File.Create (TestPath.Samples + "sample_gimp_exiftool.jpg") as TagLib.Image.File; 43 | Assert.IsNotNull (file); 44 | 45 | var tag = file.GetTag (TagTypes.XMP) as ImageTag; 46 | Assert.IsNotNull (tag); 47 | 48 | Assert.AreEqual ("This is an image Comment", tag.Comment, "Comment"); 49 | CollectionAssert.AreEqual (new string[] { "keyword 1", "keyword 2" }, tag.Keywords, "Keywords"); 50 | Assert.AreEqual (5u, tag.Rating, "Rating"); 51 | Assert.IsNull (tag.DateTime, "DateTime"); 52 | Assert.AreEqual (ImageOrientation.None, tag.Orientation, "Orientation"); 53 | Assert.IsNull (tag.Software, "Software"); 54 | Assert.IsNull (tag.Latitude, "Latitude"); 55 | Assert.IsNull (tag.Longitude, "Longitude"); 56 | Assert.IsNull (tag.Altitude, "Altitude"); 57 | Assert.IsNull (tag.ExposureTime, "ExposureTime"); 58 | Assert.IsNull (tag.FNumber, "FNumber"); 59 | Assert.IsNull (tag.ISOSpeedRatings, "ISOSpeedRatings"); 60 | Assert.IsNull (tag.FocalLength, "FocalLength"); 61 | Assert.IsNull (tag.FocalLengthIn35mmFilm, "FocalLengthIn35mmFilm"); 62 | Assert.IsNull (tag.Make, "Make"); 63 | Assert.IsNull (tag.Model, "Model"); 64 | Assert.AreEqual ("Isaac Newton", tag.Creator, "Creator"); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/IptcTest.cs: -------------------------------------------------------------------------------- 1 | // 2 | // IptcTest.cs 3 | // 4 | // Author: 5 | // Eberhard Beilharz 6 | // 7 | // Copyright (c) 2012 Eberhard Beilharz 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License as 11 | // published by the Free Software Foundation; either version 2.1 of the 12 | // License, or (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, but 15 | // WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | // Lesser General Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser General Public 20 | // License along with this library; if not, write to the Free Software 21 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | 23 | using TagLib.Xmp; 24 | 25 | using File = TagLib.File; 26 | 27 | namespace TaglibSharp.Tests.Images 28 | { 29 | [TestClass] 30 | public class IptcIimTest 31 | { 32 | [TestMethod] 33 | public void Iim_Keywords () 34 | { 35 | var file = File.Create (TestPath.Samples + "sample_iptc1.jpg"); 36 | var tag = file.GetTag (TagTypes.XMP) as XmpTag; 37 | 38 | Assert.IsNotNull (tag, "tag"); 39 | 40 | CollectionAssert.AreEqual (new[] { "kw1", "kw2", "kw3 " }, tag.Keywords); 41 | } 42 | 43 | [TestMethod] 44 | public void Iim_AllInfo () 45 | { 46 | var file = File.Create (TestPath.Samples + "sample_iptc2.jpg"); 47 | var tag = file.GetTag (TagTypes.XMP) as XmpTag; 48 | 49 | Assert.IsNotNull (tag, "tag"); 50 | 51 | CollectionAssert.AreEqual (new[] { "kw" }, tag.Keywords); 52 | Assert.AreEqual ("Title", tag.Title); 53 | Assert.AreEqual ("Creator", tag.Creator); 54 | Assert.AreEqual ("Copyright", tag.Copyright); 55 | } 56 | 57 | [TestMethod] 58 | public void IimAndXmp () 59 | { 60 | var file = File.Create (TestPath.Samples + "sample_iptc3.jpg"); 61 | var tag = file.GetTag (TagTypes.XMP) as XmpTag; 62 | 63 | Assert.IsNotNull (tag, "tag"); 64 | 65 | CollectionAssert.AreEqual (new[] { "XmpKw" }, tag.Keywords); 66 | Assert.AreEqual ("XmpTitle", tag.Title); 67 | Assert.AreEqual ("XmpCreator", tag.Creator); 68 | Assert.AreEqual ("XmpCopyright", tag.Copyright); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/JpegNoMetadataTest.cs: -------------------------------------------------------------------------------- 1 | using TaglibSharp.Tests.Images.Validators; 2 | 3 | namespace TaglibSharp.Tests.Images 4 | { 5 | [TestClass] 6 | public class JpegNoMetadataTest 7 | { 8 | [TestMethod] 9 | public void Test () 10 | { 11 | ImageTest.Run ("sample_no_metadata.jpg", 12 | new JpegNoMetadataTestInvariantValidator (), 13 | NoModificationValidator.Instance, 14 | new NoModificationValidator (), 15 | new TagCommentModificationValidator (TagTypes.TiffIFD, false), 16 | new TagCommentModificationValidator (TagTypes.XMP, false), 17 | new TagKeywordsModificationValidator (TagTypes.XMP, false) 18 | ); 19 | } 20 | } 21 | 22 | public class JpegNoMetadataTestInvariantValidator : IMetadataInvariantValidator 23 | { 24 | public void ValidateMetadataInvariants (TagLib.Image.File file) 25 | { 26 | Assert.IsNotNull (file); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/JpegSegmentSizeTest.cs: -------------------------------------------------------------------------------- 1 | using TagLib.IFD; 2 | using TagLib.Jpeg; 3 | using TagLib.Xmp; 4 | 5 | using File = TagLib.File; 6 | 7 | namespace TaglibSharp.Tests.Images 8 | { 9 | [TestClass] 10 | public class JpegSegmentSizeTest 11 | { 12 | static readonly string sample_file = TestPath.Samples + "sample.jpg"; 13 | static readonly string tmp_file = TestPath.SamplesTmp + "tmpwrite_exceed_segment_size.jpg"; 14 | 15 | static readonly int max_segment_size = 0xFFFF; 16 | 17 | readonly TagTypes contained_types = 18 | TagTypes.JpegComment | 19 | TagTypes.TiffIFD | 20 | TagTypes.XMP; 21 | 22 | 23 | string CreateDataString (int min_size) 24 | { 25 | string src = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 26 | 27 | var data = new ByteVector (); 28 | 29 | for (int i = 0; data.Count < min_size; i++) { 30 | int index = i % src.Length; 31 | data.Add (src.Substring (index, src.Length - index)); 32 | } 33 | 34 | return data.ToString (); 35 | } 36 | 37 | [TestMethod] 38 | public void ExifExceed () 39 | { 40 | var tmp = Utils.CreateTmpFile (sample_file, tmp_file) as File; 41 | CheckTags (tmp); 42 | 43 | var exif_tag = tmp.GetTag (TagTypes.TiffIFD) as IFDTag; 44 | 45 | Assert.IsNotNull (exif_tag, "exif tag"); 46 | 47 | // ensure data is big enough 48 | exif_tag.Comment = CreateDataString (max_segment_size); 49 | 50 | Assert.IsFalse (SaveFile (tmp), "file with exceed exif segment saved"); 51 | } 52 | 53 | [TestMethod] 54 | public void XmpExceed () 55 | { 56 | var tmp = Utils.CreateTmpFile (sample_file, tmp_file) as File; 57 | CheckTags (tmp); 58 | 59 | var xmp_tag = tmp.GetTag (TagTypes.XMP) as XmpTag; 60 | 61 | Assert.IsNotNull (xmp_tag, "xmp tag"); 62 | 63 | // ensure data is big enough 64 | xmp_tag.Comment = CreateDataString (max_segment_size); 65 | 66 | Assert.IsFalse (SaveFile (tmp), "file with exceed xmp segment saved"); 67 | } 68 | 69 | [TestMethod] 70 | public void JpegCommentExceed () 71 | { 72 | var tmp = Utils.CreateTmpFile (sample_file, tmp_file) as File; 73 | CheckTags (tmp); 74 | 75 | var com_tag = tmp.GetTag (TagTypes.JpegComment) as JpegCommentTag; 76 | 77 | Assert.IsNotNull (com_tag, "comment tag"); 78 | 79 | // ensure data is big enough 80 | com_tag.Comment = CreateDataString (max_segment_size); 81 | 82 | Assert.IsFalse (SaveFile (tmp), "file with exceed comment segment saved"); 83 | } 84 | 85 | void CheckTags (File file) 86 | { 87 | Assert.IsTrue (file is TagLib.Jpeg.File, "not a Jpeg file"); 88 | 89 | Assert.AreEqual (contained_types, file.TagTypes); 90 | Assert.AreEqual (contained_types, file.TagTypesOnDisk); 91 | } 92 | 93 | bool SaveFile (File file) 94 | { 95 | try { 96 | file.Save (); 97 | } catch (Exception) { 98 | return false; 99 | } 100 | 101 | return true; 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/PngGimpPngcrushTest.cs: -------------------------------------------------------------------------------- 1 | using TaglibSharp.Tests.Images.Validators; 2 | 3 | namespace TaglibSharp.Tests.Images 4 | { 5 | [TestClass] 6 | public class PngGimpPngcrushTest 7 | { 8 | [TestMethod] 9 | public void Test () 10 | { 11 | // This file is originally created with GIMP and was modified with png crush: 12 | ImageTest.Run ("sample_gimp_pngcrush.png", 13 | true, 14 | new PngGimpPngcrushTestInvariantValidator (), 15 | NoModificationValidator.Instance, 16 | 17 | new PropertyModificationValidator ("Comment", "Modified with pngcrush", "$% ¬ Test Comment äö "), 18 | new PropertyModificationValidator ("Creator", "Isaac Newton", "Albert Einstein"), 19 | new PropertyModificationValidator ("Title", "Sunrise", "Eclipse"), 20 | new TagPropertyModificationValidator ("Comment", "Modified with pngcrush", "$% ¬ Test Comment äö ", TagTypes.Png, true), 21 | new TagPropertyModificationValidator ("Creator", "Isaac Newton", "Albert Einstein", TagTypes.Png, true), 22 | new TagPropertyModificationValidator ("Title", "Sunrise", "Eclipse", TagTypes.Png, true), 23 | new TagPropertyModificationValidator ("Comment", null, "$% ¬ Test Comment äö ", TagTypes.XMP, false), 24 | new TagPropertyModificationValidator ("Creator", null, "Albert Einstein", TagTypes.XMP, false), 25 | new TagPropertyModificationValidator ("Title", null, "Eclipse", TagTypes.XMP, false), 26 | new TagKeywordsModificationValidator (TagTypes.XMP, false), 27 | new RemoveMetadataValidator (TagTypes.Png) 28 | ); 29 | } 30 | } 31 | 32 | public class PngGimpPngcrushTestInvariantValidator : IMetadataInvariantValidator 33 | { 34 | public void ValidateMetadataInvariants (TagLib.Image.File file) 35 | { 36 | Assert.IsNotNull (file); 37 | Assert.IsNotNull (file.Properties); 38 | 39 | Assert.AreEqual (37, file.Properties.PhotoWidth); 40 | Assert.AreEqual (71, file.Properties.PhotoHeight); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/PngGimpTest.cs: -------------------------------------------------------------------------------- 1 | using TaglibSharp.Tests.Images.Validators; 2 | 3 | namespace TaglibSharp.Tests.Images 4 | { 5 | [TestClass] 6 | public class PngGimpTest 7 | { 8 | [TestMethod] 9 | public void Test () 10 | { 11 | // This file is originally created with GIMP. 12 | ImageTest.Run ("sample_gimp.png", 13 | true, 14 | new PngGimpTestInvariantValidator (), 15 | NoModificationValidator.Instance, 16 | new CommentModificationValidator ("Created with GIMP"), 17 | new TagCommentModificationValidator ("Created with GIMP", TagTypes.Png, true), 18 | new TagKeywordsModificationValidator (TagTypes.XMP, false), 19 | new RemoveMetadataValidator (TagTypes.Png) 20 | ); 21 | } 22 | } 23 | 24 | public class PngGimpTestInvariantValidator : IMetadataInvariantValidator 25 | { 26 | public void ValidateMetadataInvariants (TagLib.Image.File file) 27 | { 28 | Assert.IsNotNull (file); 29 | Assert.IsNotNull (file.Properties); 30 | 31 | Assert.AreEqual (37, file.Properties.PhotoWidth); 32 | Assert.AreEqual (71, file.Properties.PhotoHeight); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/RawLeicaDigilux2Test.cs: -------------------------------------------------------------------------------- 1 | using TaglibSharp.Tests.Images.Validators; 2 | 3 | namespace TaglibSharp.Tests.Images; 4 | 5 | [TestClass] 6 | public class RawLeicaDigilux2Test 7 | { 8 | [TestMethod] 9 | public void Test () 10 | { 11 | ImageTest.Run (TestPath.GetRawSubDirectory ("RAW"), "RAW_LEICA_DIGILUX2_SRGB.RAW", 12 | false, new RawLeicaDigilux2TestInvariantValidator ()); 13 | } 14 | } 15 | 16 | public class RawLeicaDigilux2TestInvariantValidator : IMetadataInvariantValidator 17 | { 18 | public void ValidateMetadataInvariants (TagLib.Image.File file) 19 | { 20 | Assert.IsNotNull (file); 21 | // 22 | // ---------- Start of ImageTag tests ---------- 23 | 24 | var imagetag = file.ImageTag; 25 | Assert.IsNotNull (imagetag); 26 | Assert.AreEqual (String.Empty, imagetag.Comment, "Comment"); 27 | CollectionAssert.AreEqual (new string[] { }, imagetag.Keywords, "Keywords"); 28 | Assert.IsNull (imagetag.Rating, "Rating"); 29 | Assert.AreEqual (TagLib.Image.ImageOrientation.TopLeft, imagetag.Orientation, "Orientation"); 30 | Assert.IsNull (imagetag.Software, "Software"); 31 | Assert.IsNull (imagetag.Latitude, "Latitude"); 32 | Assert.IsNull (imagetag.Longitude, "Longitude"); 33 | Assert.IsNull (imagetag.Altitude, "Altitude"); 34 | Assert.AreEqual (0.004, imagetag.ExposureTime, "ExposureTime"); 35 | Assert.AreEqual (11, imagetag.FNumber, "FNumber"); 36 | Assert.AreEqual (100u, imagetag.ISOSpeedRatings, "ISOSpeedRatings"); 37 | Assert.AreEqual (7, imagetag.FocalLength, "FocalLength"); 38 | Assert.IsNull (imagetag.FocalLengthIn35mmFilm, "FocalLengthIn35mmFilm"); 39 | Assert.AreEqual ("LEICA", imagetag.Make, "Make"); 40 | Assert.AreEqual ("DIGILUX 2", imagetag.Model, "Model"); 41 | Assert.IsNull (imagetag.Creator, "Creator"); 42 | 43 | var properties = file.Properties; 44 | Assert.IsNotNull (properties); 45 | Assert.AreEqual (2564, properties.PhotoWidth, "PhotoWidth"); 46 | Assert.AreEqual (1924, properties.PhotoHeight, "PhotoHeight"); 47 | 48 | // ---------- End of ImageTag tests ---------- 49 | 50 | // ---------- Start of IFD tests ---------- 51 | // --> Omitted, because the test generator doesn't handle them yet. 52 | // --> If the above works, I'm happy. 53 | // ---------- End of IFD tests ---------- 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Utils.cs: -------------------------------------------------------------------------------- 1 | using System.Security.Cryptography; 2 | using System.Text; 3 | 4 | using File = TagLib.File; 5 | 6 | namespace TaglibSharp.Tests.Images; 7 | 8 | public static class Utils 9 | { 10 | static readonly MD5 md5 = MD5.Create (); 11 | 12 | public static File CreateTmpFile (string sample_file, string tmp_file) 13 | { 14 | if (sample_file == tmp_file) 15 | throw new Exception ("files cannot be equal"); 16 | 17 | // Create tmp_file path if it doesn't exist 18 | Directory.CreateDirectory(Path.GetDirectoryName(tmp_file)); 19 | 20 | if (System.IO.File.Exists(tmp_file)) 21 | System.IO.File.Delete(tmp_file); 22 | 23 | System.IO.File.Copy (sample_file, tmp_file); 24 | var tmp = File.Create (tmp_file); 25 | 26 | return tmp; 27 | } 28 | 29 | public static string Md5Encode (byte[] data) 30 | { 31 | var hash = md5.ComputeHash (data); 32 | 33 | var shash = new StringBuilder (); 34 | for (int i = 0; i < hash.Length; i++) { 35 | shash.Append (hash[i].ToString ("x2")); 36 | } 37 | 38 | return shash.ToString (); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Validators/CommentModificationValidator.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Images.Validators 2 | { 3 | /// 4 | /// This class tests the modification of the Comment field, 5 | /// regardless of which metadata format is used. 6 | /// 7 | public class CommentModificationValidator : PropertyModificationValidator 8 | { 9 | public CommentModificationValidator () : this (string.Empty) { } 10 | 11 | public CommentModificationValidator (string orig_comment) 12 | : this (orig_comment, "This is a TagLib# &Test?Comment%$@_ ") 13 | { } 14 | 15 | public CommentModificationValidator (string orig_comment, string test_comment) 16 | : base ("Comment", orig_comment, test_comment) 17 | { } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Validators/IMetadataInvariantValidator.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Images.Validators 2 | { 3 | public interface IMetadataInvariantValidator 4 | { 5 | /// 6 | /// Validate any metadata assumptions that should always 7 | /// hold (and thus never change upon modification). 8 | /// 9 | void ValidateMetadataInvariants (TagLib.Image.File file); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Validators/IMetadataModificationValidator.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Images.Validators 2 | { 3 | public interface IMetadataModificationValidator 4 | { 5 | /// 6 | /// Validate metadata assumptions that should hold 7 | /// before modification. 8 | /// 9 | void ValidatePreModification (TagLib.Image.File file); 10 | 11 | /// 12 | /// Modify the metadata of a file. 13 | /// 14 | void ModifyMetadata (TagLib.Image.File file); 15 | 16 | /// 17 | /// Validate metadata assumptions that should hold 18 | /// after modification. 19 | /// 20 | void ValidatePostModification (TagLib.Image.File file); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Validators/KeywordsModificationValidator.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Images.Validators; 2 | 3 | /// 4 | /// This class tests the modification of the Keywords field, 5 | /// regardless of which metadata format is used. 6 | /// 7 | public class KeywordsModificationValidator : IMetadataModificationValidator 8 | { 9 | readonly string[] orig_keywords; 10 | readonly string[] test_keywords = { "keyword 1", "§$&§%", "99 dsf", "ഈ ヰᛥกツ" }; 11 | 12 | public KeywordsModificationValidator () : this (new string[] { }) { } 13 | 14 | public KeywordsModificationValidator (string[] orig_keywords) 15 | { 16 | this.orig_keywords = orig_keywords; 17 | } 18 | 19 | /// 20 | /// Check if the original keywords are found. 21 | /// 22 | public virtual void ValidatePreModification (TagLib.Image.File file) 23 | { 24 | CollectionAssert.AreEqual (orig_keywords, GetTag (file).Keywords); 25 | } 26 | 27 | /// 28 | /// Changes the keywords. 29 | /// 30 | public virtual void ModifyMetadata (TagLib.Image.File file) 31 | { 32 | GetTag (file).Keywords = test_keywords; 33 | } 34 | 35 | /// 36 | /// Validates if changes survived a write. 37 | /// 38 | public void ValidatePostModification (TagLib.Image.File file) 39 | { 40 | Assert.IsNotNull (file.GetTag (TagTypes.XMP, false)); 41 | CollectionAssert.AreEqual (test_keywords, GetTag (file).Keywords); 42 | } 43 | 44 | /// 45 | /// Returns the tag that should be tested. Default 46 | /// behavior is no specific tag. 47 | /// 48 | public virtual TagLib.Image.ImageTag GetTag (TagLib.Image.File file) 49 | { 50 | return file.ImageTag; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Validators/NoModificationValidator.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Images.Validators 2 | { 3 | /// 4 | /// This class writes a file unmodified and tests if all metadata 5 | /// is still present. Default behavior for the modification 6 | /// validator. 7 | /// 8 | public class NoModificationValidator : IMetadataModificationValidator 9 | { 10 | public static NoModificationValidator Instance { get; } = new NoModificationValidator (); 11 | 12 | /// 13 | /// No preconditions that will change (everything is checked 14 | /// in the invariant validator). 15 | /// 16 | public void ValidatePreModification (TagLib.Image.File file) { } 17 | 18 | /// 19 | /// No modifications. 20 | /// 21 | public void ModifyMetadata (TagLib.Image.File file) { } 22 | 23 | /// 24 | /// No changes. 25 | /// 26 | public void ValidatePostModification (TagLib.Image.File file) { } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Validators/PropertyModificationValidator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Reflection; 3 | 4 | namespace TaglibSharp.Tests.Images.Validators; 5 | 6 | public class PropertyModificationValidator : IMetadataModificationValidator 7 | { 8 | readonly T test_value; 9 | readonly T orig_value; 10 | 11 | readonly PropertyInfo property_info; 12 | 13 | public PropertyModificationValidator (string property_name, T orig_value, T test_value) 14 | { 15 | this.test_value = test_value; 16 | this.orig_value = orig_value; 17 | 18 | property_info = typeof (TagLib.Image.ImageTag).GetProperty (property_name); 19 | 20 | if (property_info == null) 21 | throw new Exception ($"There is no property named {property_name} in ImageTag"); 22 | } 23 | 24 | public virtual void ValidatePreModification (TagLib.Image.File file) 25 | { 26 | var expected = orig_value; 27 | var actual = GetValue (GetTag (file)); 28 | if (expected is IEnumerable && expected is not string) 29 | CollectionAssert.AreEqual((ICollection)expected, (ICollection)actual); 30 | else 31 | Assert.AreEqual (expected, actual); 32 | } 33 | 34 | public virtual void ModifyMetadata (TagLib.Image.File file) 35 | { 36 | SetValue (GetTag (file), test_value); 37 | } 38 | 39 | public void ValidatePostModification (TagLib.Image.File file) 40 | { 41 | var expected = test_value; 42 | var actual = GetValue(GetTag(file)); 43 | if (expected is IEnumerable && expected is not string) 44 | CollectionAssert.AreEqual((ICollection)expected, (ICollection)actual); 45 | else 46 | Assert.AreEqual(expected, actual); 47 | } 48 | 49 | public virtual TagLib.Image.ImageTag GetTag (TagLib.Image.File file) 50 | { 51 | return file.ImageTag; 52 | } 53 | 54 | public void SetValue (TagLib.Image.ImageTag tag, T value) 55 | { 56 | Assert.IsNotNull (tag); 57 | 58 | property_info.SetValue (tag, value, null); 59 | } 60 | 61 | public T GetValue (TagLib.Image.ImageTag tag) 62 | { 63 | Assert.IsNotNull (tag); 64 | 65 | return (T)property_info.GetValue (tag, null); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Validators/RemoveMetadataValidator.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Images.Validators 2 | { 3 | /// 4 | /// This class tests the removal of metadata 5 | /// 6 | public class RemoveMetadataValidator : IMetadataModificationValidator 7 | { 8 | readonly TagTypes remove_types; 9 | readonly TagTypes contained_types; 10 | 11 | public RemoveMetadataValidator (TagTypes contained_types) : this (contained_types, contained_types) { } 12 | 13 | public RemoveMetadataValidator (TagTypes contained_types, TagTypes remove_types) 14 | { 15 | this.contained_types = contained_types; 16 | this.remove_types = remove_types; 17 | } 18 | 19 | public void ValidatePreModification (TagLib.Image.File file) 20 | { 21 | Assert.AreEqual (contained_types, file.TagTypes); 22 | } 23 | 24 | public void ModifyMetadata (TagLib.Image.File file) 25 | { 26 | file.RemoveTags (remove_types); 27 | } 28 | 29 | public void ValidatePostModification (TagLib.Image.File file) 30 | { 31 | Assert.AreEqual (contained_types & (~remove_types), file.TagTypes); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Validators/TagCommentModificationValidator.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Images.Validators 2 | { 3 | /// 4 | /// This class tests the modification of the Comment field, 5 | /// in a specific tag. 6 | /// 7 | public class TagCommentModificationValidator : TagPropertyModificationValidator 8 | { 9 | public TagCommentModificationValidator (TagTypes type, bool tag_present) 10 | : this (null, type, tag_present) 11 | { } 12 | 13 | public TagCommentModificationValidator (string orig_comment, TagTypes type, bool tag_present) 14 | : this (orig_comment, "This is a TagLib# &Test?Comment%$@_ ", type, tag_present) 15 | { } 16 | 17 | public TagCommentModificationValidator (string orig_comment, string test_comment, TagTypes type, bool tag_present) 18 | : base ("Comment", orig_comment, test_comment, type, tag_present) 19 | { } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Validators/TagKeywordsModificationValidator.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Images.Validators 2 | { 3 | /// 4 | /// This class tests the modification of the Keywords field, 5 | /// in a specific tag. 6 | /// 7 | public class TagKeywordsModificationValidator : KeywordsModificationValidator 8 | { 9 | readonly bool tag_present; 10 | readonly TagTypes type; 11 | 12 | public TagKeywordsModificationValidator (TagTypes type, bool tag_present) : this (new string[] { }, type, tag_present) { } 13 | 14 | public TagKeywordsModificationValidator (string[] orig_keywords, TagTypes type, bool tag_present) : base (orig_keywords) 15 | { 16 | this.type = type; 17 | this.tag_present = tag_present; 18 | } 19 | 20 | /// 21 | /// Check if the original keywords are found. 22 | /// 23 | public override void ValidatePreModification (TagLib.Image.File file) 24 | { 25 | if (!tag_present) { 26 | Assert.IsNull (file.GetTag (type, false)); 27 | } else { 28 | Assert.IsNotNull (file.GetTag (type, false)); 29 | base.ValidatePreModification (file); 30 | } 31 | } 32 | 33 | /// 34 | /// Creates the tag if needed. 35 | /// 36 | public override void ModifyMetadata (TagLib.Image.File file) 37 | { 38 | if (!tag_present) 39 | file.GetTag (type, true); 40 | base.ModifyMetadata (file); 41 | } 42 | 43 | public override TagLib.Image.ImageTag GetTag (TagLib.Image.File file) 44 | { 45 | return file.GetTag (type, false) as TagLib.Image.ImageTag; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/Validators/TagPropertyModificationValidator.cs: -------------------------------------------------------------------------------- 1 | namespace TaglibSharp.Tests.Images.Validators 2 | { 3 | public class TagPropertyModificationValidator : PropertyModificationValidator 4 | { 5 | readonly TagTypes type; 6 | readonly bool tag_present; 7 | 8 | public TagPropertyModificationValidator (string property_name, T orig_value, T test_value, TagTypes type, bool tag_present) 9 | : base (property_name, orig_value, test_value) 10 | { 11 | this.type = type; 12 | this.tag_present = tag_present; 13 | } 14 | 15 | public override void ValidatePreModification (TagLib.Image.File file) 16 | { 17 | if (!tag_present) { 18 | Assert.IsNull (GetTag (file)); 19 | } else { 20 | Assert.IsNotNull (GetTag (file)); 21 | base.ValidatePreModification (file); 22 | } 23 | } 24 | 25 | public override void ModifyMetadata (TagLib.Image.File file) 26 | { 27 | 28 | if (!tag_present) 29 | file.GetTag (type, true); 30 | 31 | base.ModifyMetadata (file); 32 | } 33 | 34 | public override TagLib.Image.ImageTag GetTag (TagLib.Image.File file) 35 | { 36 | return file.GetTag (type, false) as TagLib.Image.ImageTag; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/XmlNullEndedTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.Images 4 | { 5 | /// 6 | /// This file contains XMP data ended with null (0x00) value. 7 | /// 8 | [TestClass] 9 | public class XmpNullEndedTest 10 | { 11 | static readonly string sample_file = TestPath.Samples + "sample_xmpnullended.jpg"; 12 | 13 | [TestMethod] 14 | public void ParseXmp () 15 | { 16 | var file = File.Create (sample_file, "taglib/jpeg", ReadStyle.Average) as TagLib.Image.File; 17 | Assert.IsNotNull (file, "file"); 18 | 19 | var tag = file.ImageTag; 20 | Assert.IsNotNull (tag, "ImageTag"); 21 | Assert.AreEqual ("SONY ", tag.Make); 22 | Assert.AreEqual ("DSLR-A330", tag.Model); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/XmpCrashTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.Images 4 | { 5 | /// 6 | /// This file presents an interesting challenge as it has an 7 | /// xmlns declaration in a somewhat nonstandard location. 8 | /// This is valid, so we need to take it into account. 9 | /// 10 | [TestClass] 11 | public class XmpCrashTest 12 | { 13 | static readonly string sample_file = TestPath.Samples + "sample_xmpcrash.jpg"; 14 | 15 | [TestMethod] 16 | public void ParseXmp () 17 | { 18 | var file = File.Create (sample_file) as TagLib.Image.File; 19 | Assert.IsNotNull (file, "file"); 20 | 21 | var tag = file.ImageTag; 22 | Assert.IsNotNull (tag, "ImageTag"); 23 | Assert.AreEqual ("Asahi Optical Co.,Ltd. ", tag.Make); 24 | Assert.AreEqual ("PENTAX Optio 230 ", tag.Model); 25 | Assert.IsNull (tag.ISOSpeedRatings, "ISOSpeedRatings"); 26 | CollectionAssert.AreEqual (new[] { "Türkei 2004" }, tag.Keywords); 27 | Assert.AreEqual (new DateTime (2004, 08, 23, 11, 20, 57), tag.DateTime); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Images/jpegSonyDscRX100M4.cs: -------------------------------------------------------------------------------- 1 | // 2 | // jpegSonyDscRX100M4.cs 3 | // 4 | // Author: 5 | // david 6 | // 7 | // Copyright (c) 2016 david 8 | // 9 | // This library is free software; you can redistribute it and/or modify 10 | // it under the terms of the GNU Lesser General Public License as 11 | // published by the Free Software Foundation; either version 2.1 of the 12 | // License, or (at your option) any later version. 13 | // 14 | // This library is distributed in the hope that it will be useful, but 15 | // WITHOUT ANY WARRANTY; without even the implied warranty of 16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 | // Lesser General Public License for more details. 18 | // 19 | // You should have received a copy of the GNU Lesser General Public 20 | // License along with this library; if not, write to the Free Software 21 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 | 23 | using File = TagLib.File; 24 | 25 | namespace TaglibSharp.Tests.Images 26 | { 27 | [TestClass] 28 | public class jpegSonyDscRX100M4 29 | { 30 | [TestMethod] 31 | public void Test () 32 | { 33 | bool isSuccess = true; 34 | try { 35 | File.Create (TestPath.Samples + "sample_sony_DSC-RX100M4.jpg"); 36 | } catch (ArithmeticException) { 37 | // Old versions of TagLib were throwing an ArithmeticException on reading in Sony DSC RX100M4 images 38 | isSuccess = false; 39 | } catch (Exception) { 40 | // All excetions shall make this test fail 41 | isSuccess = false; 42 | } 43 | Assert.IsTrue (isSuccess); 44 | } 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/MSTestSettings.cs: -------------------------------------------------------------------------------- 1 | [assembly: DoNotParallelize] -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/Performance/PerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using File = TagLib.File; 2 | 3 | namespace TaglibSharp.Tests.Performance; 4 | 5 | [TestClass] 6 | public class PerformanceTest 7 | { 8 | [TestMethod] 9 | public void CreateM4a () 10 | { 11 | try { 12 | double total_time = 0.0; 13 | int iterations = 1000; 14 | using (new CodeTimer ("Combined")) { 15 | for (int i = 0; i < iterations; i++) { 16 | var timer = new CodeTimer (); 17 | using (timer) { 18 | File.Create (TestPath.Samples + "sample.m4a"); 19 | } 20 | total_time += timer.ElapsedTime.TotalSeconds; 21 | } 22 | } 23 | Console.WriteLine ("Average time: {0}", total_time / iterations); 24 | } catch (Exception e) { 25 | Console.WriteLine (e); 26 | } 27 | } 28 | 29 | [TestMethod] 30 | public void CreateOgg () 31 | { 32 | try { 33 | double total_time = 0.0; 34 | int iterations = 1000; 35 | using (new CodeTimer ("Combined")) { 36 | for (int i = 0; i < iterations; i++) { 37 | var timer = new CodeTimer (); 38 | using (timer) { 39 | File.Create (TestPath.Samples + "sample.ogg"); 40 | } 41 | total_time += timer.ElapsedTime.TotalSeconds; 42 | } 43 | } 44 | Console.WriteLine ("Average time: {0}", total_time / iterations); 45 | } catch (Exception e) { 46 | Console.WriteLine (e); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/TaglibSharp.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0;net9.0 5 | net472;$(TargetFrameworks) 6 | true 7 | Exe 8 | true 9 | false 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/TestPath.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace TaglibSharp.Tests; 3 | 4 | /// 5 | /// OS-Independent Path composition 6 | /// 7 | public static class TestPath 8 | { 9 | public static string TestsDir { get; } = Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(Debugger)).Location); 10 | public static string Samples { get; } = Path.Combine(TestsDir, "..", "..", "..", "samples", " ").TrimEnd(); 11 | public static string SamplesTmp { get; } = Path.Combine(TestsDir, "..", "..", "..", "samples", Environment.Version.ToString(), " ").TrimEnd(); 12 | public static string RawSamples { get; } = Path.Combine(TestsDir, "..", "..", "..", "raw-samples", " ").TrimEnd(); 13 | public static string GetRawSubDirectory(string subdir) => Path.Combine(RawSamples, subdir); 14 | public static string Covers { get; } = Path.Combine(TestsDir, "..", "..", "..", "..", "..", "examples", "covers", " ").TrimEnd(); 15 | } -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/raw-samples/ARW/RAW_SONY_A700.ARW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/raw-samples/ARW/RAW_SONY_A700.ARW -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/raw-samples/CR2/sample_canon_350d_broken.cr2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/raw-samples/CR2/sample_canon_350d_broken.cr2 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/raw-samples/CR2/sample_canon_400d1.cr2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/raw-samples/CR2/sample_canon_400d1.cr2 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/raw-samples/DNG/RAW_LEICA_M8.DNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/raw-samples/DNG/RAW_LEICA_M8.DNG -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/raw-samples/NEF/RAW_NIKON_D90.NEF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/raw-samples/NEF/RAW_NIKON_D90.NEF -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/raw-samples/PEF/RAW_PENTAX_KD10.PEF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/raw-samples/PEF/RAW_PENTAX_KD10.PEF -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/raw-samples/RAW/RAW_LEICA_DIGILUX2_SRGB.RAW: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/raw-samples/RAW/RAW_LEICA_DIGILUX2_SRGB.RAW -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/raw-samples/README.md: -------------------------------------------------------------------------------- 1 | This repository contains RAW files for the Taglib# test suite. 2 | 3 | All available images are offered to you under the CCL (Creative Common License) 4 | (in accordance with the license of rawsamples.ch, from which many of the used 5 | files originate). 6 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/raw-samples/RW2/RAW_PANASONIC_G1.RW2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/raw-samples/RW2/RAW_PANASONIC_G1.RW2 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/LICENSE: -------------------------------------------------------------------------------- 1 | Sample was taken from a CC-licensed track: 2 | http://ccmixter.org/file/nimmo/1 3 | 4 | Author: "nimmo" 5 | http://ccmixter.org/by/nimmo 6 | License: Creative Commons Attribution Non-Commercial Share-Alike 2.0 7 | http://creativecommons.org/licenses/by-nc-sa/2.0/ 8 | 9 | -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/Turning Lime.mkv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/Turning Lime.mkv -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/Turning Lime.mpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/Turning Lime.mpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/apple_tags.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/apple_tags.m4a -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/audible/first.aa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/audible/first.aa -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/audible/fourth.aa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/audible/fourth.aa -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/audible/second.aax: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/audible/second.aax -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/audible/third.aa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/audible/third.aa -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/bgo_658920.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/bgo_658920.m4a -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/bgo_676934.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/bgo_676934.m4a -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/bgo_701689.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/bgo_701689.m4a -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.aac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.aac -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.aif -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.ape: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.ape -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.dsf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.dsf -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.flac -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.m4a -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.mkv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.mkv -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.mp3 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.mpc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.mpc -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.mpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.mpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.ogg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.wav -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/a.wma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/a.wma -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/missing_flag.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/missing_flag.ogg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/corrupt/null_title_v2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/corrupt/null_title_v2.mp3 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/remove_tags.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/remove_tags.mp3 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.aac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.aac -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.aif -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.ape: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.ape -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.avi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.avi -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.dsf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.dsf -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.flac -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.m4a -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.m4v -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.mp3 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.mpc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.mpc -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.ogg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.opus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.opus -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.wav -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample.wma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample.wma -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_badifdentrytype.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_badifdentrytype.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_bgo493530.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_bgo493530.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_bgo624097.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_bgo624097.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_bgo625367.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_bgo625367.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_bgo631333.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_bgo631333.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_both.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_both.mp3 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_canon_bibble5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_canon_bibble5.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_canon_bibble5_16bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_canon_bibble5_16bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_canon_bibble5_8bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_canon_bibble5_8bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_canon_dpp_16bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_canon_dpp_16bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_canon_dpp_8bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_canon_dpp_8bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_canon_zoombrowser.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_canon_zoombrowser.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_emptycomment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_emptycomment.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_exiftool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_exiftool.gif -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_exiftool_long_comment.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_exiftool_long_comment.gif -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_exiftool_tangled1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_exiftool_tangled1.gif -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_exiftool_tangled2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_exiftool_tangled2.gif -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_exiftool_tangled3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_exiftool_tangled3.gif -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_gimp.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_gimp.gif -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_gimp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_gimp.png -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_gimp.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_gimp.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_gimp_exiftool.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_gimp_exiftool.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_gimp_lzw.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_gimp_lzw.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_gimp_pngcrush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_gimp_pngcrush.png -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_invalidifdoffset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_invalidifdoffset.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_iptc1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_iptc1.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_iptc2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_iptc2.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_iptc3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_iptc3.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon1.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon1_bibble5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon1_bibble5.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon1_bibble5_16bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon1_bibble5_16bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon1_bibble5_8bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon1_bibble5_8bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon1_viewnx_16bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon1_viewnx_16bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon1_viewnx_8bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon1_viewnx_8bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon2.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon2_bibble5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon2_bibble5.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon2_bibble5_16bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon2_bibble5_16bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon2_bibble5_8bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon2_bibble5_8bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon2_viewnx_16bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon2_viewnx_16bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon2_viewnx_8bit.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon2_viewnx_8bit.tiff -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon3.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_nikon4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_nikon4.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_no_metadata.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_no_metadata.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_null_orientation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_null_orientation.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_olympus1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_olympus1.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_olympus2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_olympus2.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_olympus3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_olympus3.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_olympus_corrupt_mn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_olympus_corrupt_mn.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_panasonic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_panasonic.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_recursive_ifd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_recursive_ifd.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_replaygain.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_replaygain.flac -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_replaygain.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_replaygain.m4a -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_replaygain.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_replaygain.mp3 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_sony1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_sony1.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_sony2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_sony2.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_sony_DSC-RX100M4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_sony_DSC-RX100M4.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_tangled1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_tangled1.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_tangled2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_tangled2.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_tangled3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_tangled3.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_tangled4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_tangled4.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_tangled5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_tangled5.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_tangled6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_tangled6.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_unicode5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_unicode5.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_v1_only.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_v1_only.mp3 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_v2_3_ext_header.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_v2_3_ext_header.mp3 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_v2_4_unsynch.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_v2_4_unsynch.mp3 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_v2_only.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_v2_only.mp3 -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_v8.mpc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_v8.mpc -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_xap.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_xap.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_xmpcrash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_xmpcrash.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/sample_xmpnullended.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/sample_xmpnullended.jpg -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/unsupported/sample.it: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/unsupported/sample.it -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/unsupported/sample.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/unsupported/sample.mod -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/unsupported/sample.s3m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/unsupported/sample.s3m -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/unsupported/sample.xm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/unsupported/sample.xm -------------------------------------------------------------------------------- /tests/TaglibSharp.Tests/samples/vector.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/taglib-sharp/da41dc30756189217624d8fdde3c70956e7341f9/tests/TaglibSharp.Tests/samples/vector.bin --------------------------------------------------------------------------------