T413556-Add rotate option to OCR tool#148
Conversation
…eBase::getImage (rotation before crop)
… key; pass rotate to engines; add API param
…en rotate value, and ensure rotation applied/cleared on submit
Preview:2026-01-29.15-24-25.mp4 |
|
Have not taken a proper look at the code but on first glance it seems like it'd be better to use either OOUI icons or Codex icons. |
That other patch was last updated only a couple of weeks ago, so I'd recommend first asking @shraddhaa09 if they're still working on it, and reviewing their patch to discuss how it can be improved. Always better to help a work-in-progress rather than jumping in with a new patch for someone else's task (although as the task isn't assigned to Shraddha it's technically available, but that's probably just because they aren't familiar with how things are done, I'm guessing). |
Sure. |
|
|
||
| <div class="btn-group" role="group"> | ||
| <button type="button" class="btn btn-default rotate-left" title="Rotate left"> | ||
| ↺ |
There was a problem hiding this comment.
I have used Unicode Character for Rotate Left,
| ↺ | ||
| </button> | ||
| <button type="button" class="btn btn-default rotate-right" title="Rotate right"> | ||
| ↻ |
There was a problem hiding this comment.
I have used Unicode Character for Rotate Right,
|
@Parthiv-M thanks for pointing this out. Currently I implemented the use of - Unicode Characters ( I gone thru the Codex icons library. Codex currently doesn’t provide a dedicated “rotate” icon. I also wen thru the OOUI icons library. There is an Icon for
The other closest available options in OOUI are the curved arrow icons (undo/redo),
which can be used to represent rotate-left / rotate-right actions in image editing contexts (if that suits the current needs of T413556) If we find this causes confusion or Codex adds rotation-specific icons later, we can revisit. Or if there is better way we can handle this ? |
Thanks @samwilson for the suggestion. I agree that building on existing work is generally the better path when someone is actively progressing on a patch. That said, when I looked at the open patch, it included additional changes beyond what was needed for this specific issue, and there wasn’t any clear indication yet whether it was still being actively driven to completion (last commit was on 16 Jan). Rather than letting the task stall, I explored a minimal, focused implementation in parallel to keep momentum and provide an alternative that can be evaluated. I’m more than happy to coordinate with @shraddhaa09 and review their approach as well. If their patch is still in progress and closer to the intended direction, we can consolidate efforts or adjust accordingly. My goal here isn’t to duplicate work, but to ensure the rotation support lands cleanly and without unnecessary delay. |
|
Hi , Thanks for checking in. |
|
@shraddhaa09 @Agamya-Samuel: Okay great, sounds good! So I think if you two can settle on one of these patches and then work together to review it, that'd be best. |
|
@shraddhaa09 @Agamya-Samuel |
@okerekechinweotito I am still in the process of completing the patch |



Add rotate option to OCR tool
Fixes: T413556
I noticed there’s already a PR open (#147) addressing this issue. Since that patch includes some changes that might not be strictly necessary, and it hasn’t had recent updates, I went ahead and explored my own implementation in the meantime.