-
Notifications
You must be signed in to change notification settings - Fork 39
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
RuntimeError('Memory allocation failed') on appending XMP tags to large JPEG's. #26
Comments
The workflow of class
While class How do you create xmp_file_obj in your code? |
Can your code successfully handle other images that are less than 1.5g? |
Thanks for the clear rundown. Yes! Lower resolution images work perfectly, and I've appended metadata (XMP tags) to ~700mb JPEG's before. I forgot the line of code for xmp_file_obj (my bad, copied and pasted the pieces separately), so here's the full piece:
Where It's worth noting that 1.5gb is after JPEG compression... is it possible that the file is opened in memory uncompressed or something? |
I'm not familiar with the JPEG image format and don't know if it's greater than 1.5g in memory. I get an exception when I use pyexiv2 to open images larger than 2g, but not the exception that you get. |
I just tried with the image saved to disk first, and modifying that directly (class No go, unfortunately, same error as before. Can I send you the file to check? |
I want to try opening your image, but how to send it to me? |
I'll give you a google drive link after it finishes uploading in a few minutes - does that work? |
How long will it take?If it is too late, I will deal with the problem in 24 hours. |
Not a problem, it's about halfway done by now. Not sure how late it is for you but it's expecting to be done in around 5-10 minutes. |
OK. I can wait another hour. |
The file can be accessed here. Let me know if you need access to the code that generates the XMP tags for testing. |
It takes me a few hours to download this image, so I'll process it in 20 hours. |
Sure, looking forward. |
The problem seems to be that Exiv2 cannot modify images larger than 1G. I am waiting for the confirmation from the Exiv2 developer. |
Thanks for the update! Let's hear what he says. |
So, I'm assuming pyexiv2 can only read the image less than 2G and modify the image less than 1G. But this feature has not been fully tested. |
Thanks for testing that out. I'll put a conditional in limiting to files 1gb or less. |
This issue has been automatically closed because there has been no activity for a month. |
Hi! I'm using Pyexiv2 to write XMP tags to a large JPEG file - 1.5gb, 61328 x 61535 pixels. Since the file limit is 2gb this should work. However, I am hitting RuntimeError('Memory allocation failed'). The same image at lower resolution work with the same tages.
The piece of code is simple enough:
Does Pyexiv2 have to open the image in memory in order to add tags to it? I'm not sure where it's gone wrong here.
The text was updated successfully, but these errors were encountered: