Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue loading specific image #111

Open
devedse opened this issue Dec 31, 2022 · 2 comments
Open

Issue loading specific image #111

devedse opened this issue Dec 31, 2022 · 2 comments

Comments

@devedse
Copy link
Contributor

devedse commented Dec 31, 2022

Hello,

I found another image that fails to load in ExifLibrary. As far as I can see it loads fine in other tools though:
ECT_lmdonpba
ECT_lmdonpba.zip

Could you maybe have a look into what's going on?

Devedse

@devedse
Copy link
Contributor Author

devedse commented Jan 16, 2023

@oozcitak , hey, wanted to ask if you had time to look into this yet.

@T0T4R4
Copy link

T0T4R4 commented Jun 28, 2023

I have the same issue here. An image which can load successfully in a MAUI app and to which the Exif metadata gets updated by this library fails to be loaded by a .NET 6 webapp, with the error below :

Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')

thrown on this line(

Array.Copy(data, i * 8 + 4, den, 0, 4);
)

   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)

   at ExifLibrary.ExifBitConverter.ToURationalArray(Byte[] data, Int32 count, ByteOrder frombyteorder) in .\exiflibrary\ExifLibrary\[ExifBitConverter.cs:line 199]
   at ExifLibrary.ExifPropertyFactory.Get(UInt16 tag, UInt16 type, UInt32 count, Byte[] value, ByteOrder byteOrder, IFD ifd, Encoding encoding) in .\exiflibrary\ExifLibrary\ExifPropertyFactory.cs:line 141
   at ExifLibrary.JPEGFile.ReadExifAPP1() in .\exiflibrary\ExifLibrary\JPEGFile.cs:line 736
   at ExifLibrary.JPEGFile..ctor(MemoryStream stream, Encoding encoding, Boolean readTrailingData) in .\exiflibrary\ExifLibrary\JPEGFile.cs:line 176
   at ExifLibrary.ImageFile.FromStreamInternal(MemoryStream stream, Encoding encoding) in .\exiflibrary\ExifLibrary\ImageFile.cs:line 278
   at ExifLibrary.ImageFile.FromStream(Stream stream, Encoding encoding) in .\exiflibrary\ExifLibrary\ImageFile.cs:line 167
   at ExifLibrary.ImageFile.<FromStreamAsync>d__38.MoveNext() in .\exiflibrary\ExifLibrary\ImageFile.cs:line 252
   at ExifLibrary.ImageFile.<FromFileAsync>d__36.MoveNext() in .\exiflibrary\ExifLibrary\ImageFile.cs:line 230
   at ExifLibrary.ImageFile.<FromFileAsync>d__35.MoveNext() in .\exiflibrary\ExifLibrary\ImageFile.cs:line 214

   at MyWebsite.Controllers.MobileAppController.<ReadExif>d__6.MoveNext() in C:\Users\MyUser\Documents\MyWebsite\Controllers\MobileAppController.cs:line 62
   at MyWebsite.Controllers.MobileAppController.<SavePhoto>d__7.MoveNext() in C:\Users\MyUser\Documents\MyWebsite\Controllers\MobileAppController.cs:line 137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants