drewnoakes / xmp-core-dotnet

.NET library for working with the Extensible Metadata Platform (XMP)
60 stars 22 forks source link

Fix ArgumentOutOfRangeException in XmpUtils.PackageForJPEG #41

Closed trylock closed 5 years ago

trylock commented 5 years ago

Current implementation of XmpUtils.PackageForJPEG throws ArgumentOutOfRangeException for all inputs. The error was likely caused by difference in StringBuilder API. In C#, StringBuilder.Remove expects position and length of the removed substring whereas in Java, StringBuilder.delete takes start and end indices.

kwhopper commented 5 years ago

Seems reasonable to me. Thanks!