ruby-vips
ruby-vips copied to clipboard
Ruby extension for the libvips image processing library.
**Describe the bug** `Vips::Image.thumbnail("filename.gif[n=-1]", 200, height: 200, crop: :centre)` with animated GIF file saves static file with 1 scene only. Without `crop: :centre` it saves animated file correctly I used...
Per the example here: https://www.printful.com/blog/everything-you-need-to-know-to-prepare-the-perfect-printfile/#1_You_resized_a_low-quality_image_lowering_its_DPI_even_more I am trying to detect if a PNG has a certain DPI for use in a validation, is that something that is currently possible with...
Segmentation fault on almost all images that are downscaled with e.g, `Vips::Image.thumbnail('source.png', 1920, height: 1080, **{crop: 'centre', size: :down})`. Some images work if I remove the height parameter, but there’s...
https://github.com/libvips/ruby-vips/blob/932c31a103bb91c93ea862f3702b24b3fdd12905/lib/vips.rb#L26 This puts it in the global scope, is that a good idea?
I've been using this to help deal with memory usage issues.
**Describe the bug** Rotating in 90º increments leaves a black line on one or more sides of non-square images **To Reproduce** Steps to reproduce the behavior: Using this image: [flip-me-for-real](https://user-images.githubusercontent.com/5025990/174635975-7e2a87a8-24d9-4cd9-874a-bedc82d9e525.jpg)...
but TIFF write fails for some reason argh
After updating to OS X 10.13.3, I received the following error trying to `require 'vips'`: ``` objc[25602]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was...
```ruby require "vips" mask = Array.new(10){ |i| Array.new(10){ |j| 1 / Math::hypot(i-4.5, j-4.5) } } hm = Vips::Image.new_from_file("PlayerSpawnsHeatMap.png").extract_band(0) hm.conv(mask, precision: :integer).to_a.flatten.sort.uniq p hm.cast(:int).conv(mask, precision: :approximate).to_a.flatten.sort.uniq p hm.cast(:int).conv(mask, precision: :approximate).to_a.flatten.sort.uniq ```...
I am a windows 11 users, using rails 7.0 and ruby 3.0.1p64. I followed the instruction on the ruby-vips, installed the gem, installed the vips lib at C:\vips-dev-w64-web-8.12.1 on my...