Skip to content

ykhr53/insta-margin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What's this

You can add a white margin to your photo.

How to use

easy peasy.

insta-margin $ go get golang.org/x/image/draw
insta-margin $ go build insta.go 
insta-margin $ ./insta landscape.jpg 

Output file has random base62 suffix, don't worry about overwrite.

Options

-p

You can specify a white margin percentage by -p option.
Default value is defined as defaultMarginPercent, and it is 80.

-d

Also, you can specify a directory with -d option.
All photos inside the specified directory will be converted.

insta-margin $ ./insta -d photos/

Configuration

You can configure baseSize and defaultMarginPercent.
For now, as Instagram's maximum upload size is 1080 x 1080, the default baseSize value follows this limit.

Sample

Landscape ratio.

Portrait ratio.

Thanks, all sample photos are mine 😊
https://www.flickr.com/people/yukihira_fl/

About

Create white-margined image for Instagram

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages