-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[clojure] clojurify function names in image.clj namespace #15121
[clojure] clojurify function names in image.clj namespace #15121
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! let me merge this.
as an aside, are there other places in examples where *-image
functions are used? if yes, can you replace those usages as well?
(defn decode | ||
"Decodes an image from an input stream with OpenCV. | ||
`input-stream`: `InputStream` - Contains the binary encoded image | ||
`color-flag`: 0 or 1 - Convert decoded image to grayscale (0) or color (1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one thing i'm wondering is whether color-flag
should be specified as :grayscale
or :color
and we handle the conversion to 0, 1 in this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good point! Let me fix this then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to use another name for the keyword :color
instead of :color-flag
. I am open to better name for that. The problem is that it is not possible to have two different specs with the same name.
@Chouffe : you need to fix some conflicts because i merged your other PR |
Will do! Thanks for reviewing so promptly @kedarbellare |
4947d03
to
cc54869
Compare
1969463
to
c665fdc
Compare
Should be ready to 🚢 now @kedarbellare |
* [clojure] clojurify function names in image.clj namespace * move deprecated to the proper location for defn * rename color-flag to color and use :color :grayscale as values * add rm dest-path in with-file * change `color-flag` to `color` in `color->int`
Description
The
image
namespace is using some functions that are not named theclojure way
. It is an attempt to clojurify these functions.The namespaces are supposed to be imported qualified and having the suffix
-image
in the following functions is redundantresize-image
decode-image
read-image
One should be able to call
image/resize
,image/decode
,image/read
instead.The function
to-image
is misleading as we dont know what is turned into an image. I suggest to name itndarray->image
instead.deprecated
is added in metadatadeprecated
is added in docstrings