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

FEAT: Replaced System.Drawing implementation. #31

Merged
merged 2 commits into from
Dec 29, 2022

Conversation

CesarD
Copy link
Collaborator

@CesarD CesarD commented Dec 26, 2022

Closes #5
Implements SkiaSharp to replace System.Drawing package for resizing images and obtain thumbnails. It also implements ExifLibNet to obtain metadata from images such as Date Taken and GPS Latitude/Longitude.
This should allow better cross-OS implementation of the solution.
Added GPS Latitude/Longitude to the Image entity sample.

@CesarD CesarD requested a review from a team December 26, 2022 16:41
@CesarD CesarD linked an issue Dec 26, 2022 that may be closed by this pull request
Copy link
Collaborator

@Gonzo345 Gonzo345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I was doubting about regenerating migrations but we don't provide any init migration at all!

@Gonzo345 Gonzo345 merged commit e1afd1a into main Dec 29, 2022
@CesarD CesarD deleted the feat/system.drawing-replacement branch December 29, 2022 13:11
CesarD pushed a commit that referenced this pull request Mar 9, 2023
## Description
- Refactor FileService to remove remaining dependency on System.Drawing
- Fix BlobStorageService GetFileType() to use string.ToLower()
  - Add unit tests for GetFileType()
- Add unit tests to FileServiceTests
- Remove duplicate Trait declarations in test classes
- General tidy up
- Update packages

## Motivation and Context
#31 replaced System.Drawing implementation, however FileService still
had a dependency on System.Drawing for its Size class. As we are not
using any specific functionality from the Size class and are just using
it to represent data then we can replace it with a tuple.

Other changes in this PR are to:
- fix a bug with the GetFileType method that was not handling strings
with uppercase characters properly.
- correct some typos and apply consistent style in some areas
- add unit tests

## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)

## Checklist:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
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

Successfully merging this pull request may close these issues.

Replace System.Drawing implementation
2 participants