Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
9548cf7c
Commit
9548cf7c
authored
Dec 17, 2021
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
added bindings call
parent
9aa61726
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!117
Release
,
!85
added image compression api
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/utils.go
+1
-1
1 addition, 1 deletion
api/utils.go
bindings/utils.go
+17
-0
17 additions, 0 deletions
bindings/utils.go
with
18 additions
and
1 deletion
api/utils.go
+
1
−
1
View file @
9548cf7c
...
@@ -24,7 +24,7 @@ const (
...
@@ -24,7 +24,7 @@ const (
)
)
// CompressJpeg takes a JPEG image in byte format
// CompressJpeg takes a JPEG image in byte format
// and compresses it based on
the above consts
// and compresses it based on
desired output size
func
CompressJpeg
(
imgBytes
[]
byte
)
([]
byte
,
error
)
{
func
CompressJpeg
(
imgBytes
[]
byte
)
([]
byte
,
error
)
{
// Convert bytes to a reader
// Convert bytes to a reader
imgBuf
:=
bytes
.
NewReader
(
imgBytes
)
imgBuf
:=
bytes
.
NewReader
(
imgBytes
)
...
...
This diff is collapsed.
Click to expand it.
bindings/utils.go
0 → 100644
+
17
−
0
View file @
9548cf7c
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2021 Privategrity Corporation /
// /
// All rights reserved. /
////////////////////////////////////////////////////////////////////////////////
// Provides various utility functions for access over the bindings
package
bindings
import
"gitlab.com/elixxir/client/api"
// CompressJpeg takes a JPEG image in byte format
// and compresses it based on desired output size
func
CompressJpeg
(
imgBytes
[]
byte
)
([]
byte
,
error
)
{
return
api
.
CompressJpeg
(
imgBytes
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment