admin管理员组

文章数量:1417404

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.

Share Improve this question asked Jan 31 at 11:46 DJRfumeDJRfume 71 bronze badge 5
  • 1 Can you share your code in the question? – Dasari Kamali Commented Jan 31 at 12:16
  • I dont think its relevant right? I am looking for a service/method of processing and correctly rotating jpegs. The code that stores them to the blob works fine. – DJRfume Commented Jan 31 at 13:38
  • 1 @DJRfume - it is relevant to show your work (a minimal reproducible example). Right now, you only posted a general set of requirements, and then asked for opinions and recommendations (off-topic). – David Makogon Commented Jan 31 at 17:14
  • Please provide enough code so others can better understand or reproduce the problem. – Community Bot Commented Jan 31 at 22:32
  • I mean drag an image to blob storage and you arrived at my situation lmao – DJRfume Commented Feb 1 at 9:00
Add a comment  | 

1 Answer 1

Reset to default -1

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/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!

本文标签: Post processing rotating photos in AzureStack Overflow