looking for some architectural advice.
I have a mobile app that uploads photos to Azure Blob Storage. Some of these photos end up rotated incorrectly. Also it causes some delay, so i'd rather do the processing after the upload instead of on the app.
So, the photos are posted from the app to Azure Blob Storage. I'm mostly an AWS guys so I know you can probably trigger a seperate event from this, or even have a scheduled function that scans the blob storage. Now I have a question:
Is there a way to do this post-processing on the server (or via an Azure Function or a service) so I can grab each uploaded blob, fix the orientation, and re-upload/replace it without losing resolution?
Is there any managed service that can help here? Will some custom code work? Does anybody have some advice for me regarding this.
looking for some architectural advice.
I have a mobile app that uploads photos to Azure Blob Storage. Some of these photos end up rotated incorrectly. Also it causes some delay, so i'd rather do the processing after the upload instead of on the app.
So, the photos are posted from the app to Azure Blob Storage. I'm mostly an AWS guys so I know you can probably trigger a seperate event from this, or even have a scheduled function that scans the blob storage. Now I have a question:
Is there a way to do this post-processing on the server (or via an Azure Function or a service) so I can grab each uploaded blob, fix the orientation, and re-upload/replace it without losing resolution?
Is there any managed service that can help here? Will some custom code work? Does anybody have some advice for me regarding this.
I recognize that this is probably a relatively expensive option, but it looks like Azure OpenAI service using GPT-4o can handle this. I submitted an incorrectly rotated image and the following prompt and got the below response. Prompt: Is this image rotated incorrectly? Response: Yes, the image is rotated incorrectly. It appears to be 90 degrees counterclockwise from its correct orientation. The floor should be at the bottom of the image.
This could probably be improved by using structured outputs, so subsequent code can handle the actual rotation if needed. https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/structured-outputs?tabs=python-secure
In terms of where to run the code for this, triggering Azure functions using the addition of a new blob to storage is generally well-documented both by Microsoft and/or blogs, if you have any specific questions do not hesitate to ask!