Repository: opencv
Issue: IMREAD_ANYCOLOR return BGR on BGRA png image
Labels: category: imgcodecs,RFC

##### System information (version)

- OpenCV => 4.5.5
- Operating System / Platform => Ubuntu 20.04
- Compiler => g++

##### Detailed description

I have the following constraints when I open images:
- Handling exif orientation
- Possibly convert myself from BGRA to BGR because of #21694 

I cannot use `IMREAD_UNCHANGED` because it will ignore the exif orientation. So I thought `IMREAD_ANYCOLOR` was exactly what I wanted, but it seem to have the same behavior than `IMREAD_COLOR` as it returns a BGRA image directly in BGR format.
The documentation is not so clear, but I expected it to respect the number of channel of the initial file, converting it to 8U (if not associated with `IMREAD_ANYDEPTH`) and applying the exif orientation.

If I wrongly interpreted `IMREAD_ANYCOLOR`, maybe another IMREAD flag is missing for my use case, or a way to apply the exif orientation afterward can be useful (just like PIL does).

##### Steps to reproduce

```
import cv2

img = cv2.imread(path, cv2.IMREAD_ANYCOLOR)
print(img.shape)
```
![test](https://user-images.githubusercontent.com/8860364/157049570-303abbe9-ea0f-4d85-a72b-ceda17b86ffc.png)


##### Issue submission checklist

 - [x] I report the issue, it's not a question
   <!--
   OpenCV team works with forum.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with questions without a real issue statement will be
   closed.
   -->
 - [x] I checked the problem with documentation, FAQ, open issues,
       forum.opencv.org, Stack Overflow, etc and have not found any solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://forum.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [x] I updated to the latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only the latest release for each branch.
   The ticket is closed if the problem is not reproduced with the modern version.
   -->
 - [x] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as an archive to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->