mirror of
https://github.com/status-im/status-go.git
synced 2025-02-24 04:38:41 +00:00
feat: generate images in desired size function added
This commit is contained in:
parent
10d0133974
commit
4c993a8610
@ -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"
|
||||
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user