-
Notifications
You must be signed in to change notification settings - Fork 284
Processing input via POST /ob/images causes images to become rotated #1630
Comments
Attempted the following request against a local node using my graphic of choice: Which provided the following response:
Which looks normal when returned by the gateway: https://gateway.ob1.io/ob/images/QmQkizhW5JUhCGhSNgnEMn5ySRBYAiuC1Xzh7shK32xYQV All seems fine to me. |
After examining the ingress of this data and that the encoding really doesn't change as it's processed through, I began looking at the inherent state of the file (because this problem does not occur on all files equally). After taking some additional pictures using an android devices in various orientations, it appears that the EXIF data impacts how these files are interpreted in most GUIs despite the underlying data being different to what's presented. So while the data always "appears" to be right-side up in various utilities, these values are being stripped when processed through the daemon and forced into their natural orientation after processing. ...ultimately, this is the result of golang not considering the EXIF data and expecting this consideration to be handled manually before processing. After understanding the problem, the existing issues were much easier to find around this. (See: golang/go#4341) Investigating how this can be properly handled in the face of the stdlib's disregard for that metadata. |
@placer14 sorry, I should have jumped in here earlier. We had this same issue in the desktop client long, long ago. This is what we do:
If the Haven client did the same thing it should work fine. The code is in the |
Too little, too late. Nevertheless, after this fix you should be able to simplify the desktop client. 🍻 |
Report from @drwasho indicates that the
POST /ob/images
endpoint either persists the rotated image or persists the original image yet returns a rotated image. Whichever the case, the response should be consistent with the original image.The text was updated successfully, but these errors were encountered: