Image handling: Mode from RGB path will always be overwritten
We have the following section for image mode retrieval: https://github.com/py-pdf/pypdf/blob/d9649d0d5f22c2710da238aa555c7dfdf8ff6eb3/pypdf/_xobj_image_helpers.py#L348-L375
As far as I can tell from the execution flow, the value of line 356 will always be overwritten by the following conditions.
The offending change is https://github.com/py-pdf/pypdf/commit/68e2cf0c25961f8ae5277dfc9ffa8978c00e3305#diff-185702ddcfbf2e4a9ef7106622bb77505eacae032966bba39c65ffb9cd0f9bc7L667 from #1834.
We should check whether this causes any harm and evaluate a fix with a corresponding fix.
Hi there, my team and i would like to work on this issue if that is alright with you?
No need to ask for permission to work on issues as long as there is no reason like somebody already having indicated working on it beforehand and actually having made progress.