-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(exif): Enable EXIF Writing using FIMD_EXIF_RAW #14
Conversation
FreeImage keeps two separate copies of Exif Metadata in memory: - One is used/found in MDM_EXIF_MAIN and its extensions(e.g. MDM_EXIF_GPS). - Another one is used when files are actually written that support the EXIF Format. - In some cases you want to access, the raw data. - A good example of this is when using MetadataModel.DestroyModel to wipe EXIF data on an image that you wanted persisted if that file is exported again from FreeImage. - DestoryModel was also corrected to DestroyModel, this will result in a breaking change version but that's worth it! With this you can use the following to clear and persist that "clearing" of the exif data on a FreeImage image: ```cs ImageMetadata imageMetadata = new ImageMetadata(dib, true, true); var model = imageMetadata[FREE_IMAGE_MDMODEL.FIMD_EXIF_RAW]; model.DestroyModel(); ``` When you then write that subsequent image to a file, the file will not contain any EXIF data! This is based on: - https://sourceforge.net/p/freeimage/discussion/36111/thread/2d087f91/ where i discovered FIMD_EXIF_RAW - https://sourceforge.net/p/freeimage/discussion/36111/thread/8233f5bc/ where I learnt how you might use it. As this change doesn't touch the native library, you won't need to compile that again. This is a purely .NET change. -
While this is straight forward, I'm still wanting at least 1 team review from Geenz or Froox. Due to the nature of free-image being very complicated. |
@@ -148,7 +148,7 @@ public bool RemoveTag(string key) | |||
/// which will remove all tags of this model from the bitmap. | |||
/// </summary> | |||
/// <returns>Returns true on success, false on failure.</returns> | |||
public bool DestoryModel() | |||
public bool DestroyModel() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling is important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Especially when it tells a "destory"
Looks good to me. |
Ok, I'll roll a new version thanks!, this unblocks some work im doing! |
More context now available here: Yellow-Dog-Man/Resonite-Issues#2015 |
FreeImage keeps two separate copies of Exif Metadata in memory:
With this you can use the following to clear and persist that "clearing" of the exif data on a FreeImage image:
When you then write that subsequent image to a file, the file will not contain any EXIF data!
This is based on:
As this change doesn't touch the native library, you won't need to compile that again. This is a purely .NET change. -