Skip to content

Commit

Permalink
wrap imencode
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Mar 1, 2023
1 parent 95578ef commit c7f165b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Imgcodecs/funclist.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
(
['','imencode','@brief Encodes an image into a memory buffer.
The function imencode compresses the image and stores it in the memory buffer that is resized to fit the
result. See cv::imwrite for the list of supported formats and flags description.
@param ext File extension that defines the output format.
@param img Image to be written.
@param buf Output buffer resized to fit the compressed image.
@param params Format-specific parameters. See cv::imwrite and cv::ImwriteFlags.',0,'bool',['String','ext','',['/C','/Ref']],['Mat','img','',[]],['vector_uchar','buf','',['/O','/Ref']],['vector_int','params','std::vector<int>()',['/C','/Ref']]],
['','imread','@brief Loads an image from a file.
@anchor imread
Expand Down
5 changes: 4 additions & 1 deletion genpp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'Mat()' => ['PDL->zeroes(sbyte,0,0,0)',],
'Point()' => ['empty(sbyte)',],
'Ptr<float>()' => ['empty(float)','0'],
'std::vector<int>()' => ['empty(long)',],
'Size()' => ['empty(sbyte)',],
false => [0,0], # perl, C
true => [1,1],
Expand Down Expand Up @@ -62,7 +63,9 @@ sub new {
if ($self->{is_vector}) {
$self->{fixeddims} = 1 if my $spec = $DIMTYPES{$nonvector_type};
$self->{use_comp} = 1 if $self->{is_output};
@$self{qw(pdltype type_c)} = ($spec ? $CTYPE2PDL{$spec->[0][0]} : $nonvector_type, ('vector_'x$self->{is_vector})."${nonvector_type}Wrapper *",
@$self{qw(pdltype type_c)} = (
$spec ? $CTYPE2PDL{$spec->[0][0]} : $self->{type_pp},
('vector_'x$self->{is_vector})."${nonvector_type}Wrapper *",
);
@$self{qw(is_other naive_otherpar use_comp pdltype)} = (1,1,1,'') if $STAYWRAPPED{$nonvector_type} || $self->{is_vector} > 1;
return $self;
Expand Down
1 change: 1 addition & 0 deletions maint/genlists
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ my %force = map +($_=>1), qw(
cv.normalize
cv.minMaxLoc
cv.imread
cv.imencode
cv.imshow
cv.waitKey
cv.namedWindow
Expand Down

0 comments on commit c7f165b

Please sign in to comment.