Skip to content

imgcodecs: update documentation for imwrite() to support images formats.#23410

Merged
asmorkalov merged 2 commits intoopencv:3.4from
Kumataro:3.4-fix23397-step1
Apr 2, 2023
Merged

imgcodecs: update documentation for imwrite() to support images formats.#23410
asmorkalov merged 2 commits intoopencv:3.4from
Kumataro:3.4-fix23397-step1

Conversation

@Kumataro
Copy link
Copy Markdown
Contributor

@Kumataro Kumataro commented Mar 26, 2023

This PR is for pre-work for #23397 .

Reason

The current imwrite() was listing based on the input image (8/16/32/64, unsigned/siged/float).
For this reason, it is not easy to describe specification changes for each format.

Therefore, I propose listing based on the output file.
This allows us to change only the Encoder line that modifies the supported input image formats.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Copy link
Copy Markdown
Contributor

@mshabunin mshabunin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Perhaps in future all imgcodecs backend descriptions and specifics should be extracted to a separate page (e.g. https://docs.opencv.org/4.x/d8/d6a/group__imgcodecs__flags.html). It clutters imread and imwrite more and more with time.

@Kumataro
Copy link
Copy Markdown
Contributor Author

Kumataro commented Mar 29, 2023

Thank you for your comment, I agree with you !

We have several encoder functions and decoder functions in imgcodecs module.
I feel that it is not good to describe all the backend specifications in representative functions ( imwrite() and imread() ).

[For 3.4 branch] (This pull request.)
New backend will not be added. I feel it is better to keep current style.

[For 5.0 / 4.x branch ]
Based on the purpose of describing common information to encoder/decoder functions, I feel that it appropriate to describe them in "Detailed Description" section, like imgproc module.

https://docs.opencv.org/4.7.0/d4/d86/group__imgproc__filter.html

@asmorkalov asmorkalov modified the milestones: 4.8.0, 3.4.20 Apr 2, 2023
@asmorkalov asmorkalov merged commit 85a0418 into opencv:3.4 Apr 2, 2023
@asmorkalov asmorkalov mentioned this pull request Apr 20, 2023
@asmorkalov asmorkalov mentioned this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants