Skip to content

Commit

Permalink
feat: generate images in desired size function added
Browse files Browse the repository at this point in the history
  • Loading branch information
saledjenic committed Apr 12, 2022
1 parent 10d0133 commit 4c993a8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions mobile/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/exportlogs"
"github.com/status-im/status-go/extkeys"
"github.com/status-im/status-go/images"
"github.com/status-im/status-go/multiaccounts"
"github.com/status-im/status-go/multiaccounts/accounts"
"github.com/status-im/status-go/multiaccounts/settings"
Expand Down Expand Up @@ -842,3 +843,16 @@ func SwitchFleet(fleet string, configJSON string) string {

return makeJSONResponse(err)
}

func GenerateImages(filepath string, aX, aY, bX, bY int) string {
iis, err := images.GenerateIdentityImages(filepath, aX, aY, bX, bY)
if err != nil {
return makeJSONResponse(err)
}

data, err := json.Marshal(iis)
if err != nil {
return makeJSONResponse(fmt.Errorf("Error marshalling to json: %v", err))
}
return string(data)
}

0 comments on commit 4c993a8

Please sign in to comment.