-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Question: Writing EXIF #167
Comments
Make `tag_is_ascii` aware of the EXIF 2.3 ASCII tags that are available since libexif 0.6.22. See: kleisauke/net-vips#167
Hi @jeromenelson, These ASCII tags were added in the EXIF 2.3 specification, which libvips is currently unaware of. I've just opened PR libvips/libvips#2795 that allows you to modify/create these tags in libvips. After that, this should work without any problems: using var image = Image.NewFromFile("x.jpg");
using var mutated = image.Mutate(m => m.Set(GValue.GStrType, "exif-ifd2-LensMake", "Canon"));
mutated.WriteToFile("x2.jpg");
using var image2 = Image.NewFromFile("x2.jpg");
Debug.Assert(image2.Contains("exif-ifd2-LensMake")); |
Thank you for the quick response, any idea how long would it take for this PR to make it into the next release? |
* Allow to modify/create EXIF 2.3 ASCII tags Make `tag_is_ascii` aware of the EXIF 2.3 ASCII tags that are available since libexif 0.6.22. See: kleisauke/net-vips#167 * Fix CI
We aim for a release in late May, see: libvips/libvips#2790. Setting using var image = Image.Black(100, 100);
using var mutated = image.Mutate(m => m.Set(GValue.GStrType, "exif-ifd2-LensSpecification", "5/1 10/1 100/1 200/1"));
mutated.WriteToFile("x2.jpg");
using var image2 = Image.NewFromFile("x2.jpg");
Debug.Assert(image2.Contains("exif-ifd2-LensSpecification")); |
NetVips v2.2.0 and NetVips.Native v8.13.0 is now available. Note that setting |
Thank you, super excited about the other new features as well! |
Hello there,
Hoping this is a quick one. How to insert IFD2/Lens tags into an image? I was able to set many other tags without any issues, anything related to Lens info (
exif-ifd2-LensModel
,exif-ifd2-LensSpecification
,exif-ifd2-LensSerialNumber
,exif-ifd2-LensMake
) does not seem to work.Side note: I tried both
GValue.GStrType
andGValue.RefStrType
with no luck. For other tags, I figured out how to successfully set certain values through trial and error - for example, while working with other numeric fields (sayexif-ifd2-FNumber
), instead of directly usingGValue.GDoubleType
I had to convert it to a rational string and then use the typeGValue.RefStrType
to successfully set. But this simple string field, I just can't get to the bottom of it.Thank you in advance!
The text was updated successfully, but these errors were encountered: