
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
A very light Ruby wrapper for the Graphicsmagick CLI that supports mogrify, composite, and convert, plus a few convenience methods.
Graphicsmagick was 10x faster for our image processing needs than ImageMagick. I wanted to use Graphicsmagick, but wanted a Ruby wrapper to help deal with exceptions and long running tasks. I needed to use multiple utilities within Graphicsmagick and the current crop of *_magick gems either did not support all of them, or had costly overhead (or both).
http://www.graphicsmagick.org/README.html
On OS X, it's recommended to use brew
brew update
brew install graphicsmagick
Add this line to your application's Gemfile:
gem 'graphicsmagick'
And then execute:
$ bundle
Or install it yourself as:
$ gem install graphicsmagick
img = GraphicsMagick::Image.new('my_file.jpg')
img.crop('360x504+432+72').resize('125x177!')
img.write!
Equivalent to
gm mogrify -crop '360x504+432+72' -resize '125x177!' my_file.jpg
img = GraphicsMagick::Image.new('my_file.jpg')
img.crop('360x504+432+72').resize('125x177!')
img.write('my_new_file.jpg')
Equivalent to
cp my_file.jpg my_new_file.jpg & gm mogrify -crop '360x504+432+72' -resize '125x177!' my_new_file.jpg
img = GraphicsMagick::Image.new("my_file.pdf")
img.strip.density(144).colorspace('RGB').auto-orient
img.convert.resize('50%')
img.write('my_new_file.png')
Equivalent to
gm convert -density 144 -strip -colorspace RGB -auto-orient "my_file.pdf" -resize '50%' my_new_file.png
background = GraphicsMagick::Image.new("background.png")
img = GraphicsMagick::Image.new("overlay.png")
img.composite(background).geometry('+100+150')
img.write('composite.png')
Equivalent to
gm composite -geometry +100+150 background.png overlay.png composite.png
file = File.new('my_file.png')
img = GraphicsMagick::Image.new(file)
temp_img = GraphicsMagick::Image.new(Tempfile.new('foo'))
temp_img.path #=> "path/to/temp/file"
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that graphicsmagick demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.