- you can crop the profile image of
Doubutsu-No-Mori Pocket Camp
(Animal Crossing Pocket Camp)- first step
- you prepare the profile image file(s) of
Doubutsu-No-Mori Pocket Camp
(Animal Crossing Pocket Camp)
- you prepare the profile image file(s) of
- second step
- exec method in this gem
- third step
- you get the devided image files, be happy :)
- first step
$ gem install crop_pokemori_prof_image
- you must install
imagemagick
andlibmagickwand-dev
(for Ubuntu) to usermagick
gem- please investigate if you use CentOS or so forth
- if you use macOS, do
$ brew install imagemagick@6
- caution:
rmagick
cannot run if imagemagick@7
- caution:
- prepare the profile image file(s) of
Doubutsu-No-Mori Pocket Camp
(Animal Crossing Pocket Camp) like below
require 'crop_pokemori_prof_image'
- these are class method of
CropPokemoriProfImage
class
crop_single_image
method is for only one image filecrop_single_image
method takes two arguments- the first argument
- the image file name
- the second argument
- the output directory name
- optional
- the default value is 'crop_image'
- the first argument
crop_multiple_image
method is for multiple image filescrop_multiple_image
method takes two arguments- the first argument
- the directory name which contains the image files
- optional
- the default value is '.'
- the second argument
- the output directory name
- optional
- the default value is 'crop_image'
- the first argument
- after exec method, you can get the crop image files
- you can get four part files per one source file
-
- face
- naming format is
SOURCE_FILENAME_WITHOUT_EXT
_face.EXT
-
- name
- naming format is
SOURCE_FILENAME_WITHOUT_EXT
_name.EXT
-
- id number without 'ID' notation
- naming format is
SOURCE_FILENAME_WITHOUT_EXT
_id_number.EXT
-
- id number with 'ID' notation
- naming format is
SOURCE_FILENAME_WITHOUT_EXT
_whole_id_part.EXT
-
require 'crop_pokemori_prof_image'
CropPokemoriProfImage.crop_single_image('sample.jpg')
sample.jpg
is below
- note: the image with Gaussian blur for privacy
require 'crop_pokemori_prof_image'
CropPokemoriProfImage.crop_multiple_image
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/corselia/crop-pokemori-prof-image.
The gem is available as open source under the terms of the MIT License.
- Test codes aren't written!
- if the source file's resolution isn't 16 vs 9, this app doesn't work correctly...
- for instance, iOS resolution
- for instance, pre-crop the image file by player