Questions tagged [vips]

`libvips` is a fast image processing library with low memory needs. `vips` is the command-line tool for that library.

libvips is a fast image processing library with low memory needs.

vips is the command-line tool for that library.

179 questions
3
votes
2 answers

Combine multiple images using vips (ruby-vips8)

How do I apply a function to corresponding pixels of two images of the same resolution? Like Photoshop does when covering one layer with another one. What about more than two images? If it was Wolfram Mathematica I would take a List of those images…
Nakilon
  • 34,866
  • 14
  • 107
  • 142
2
votes
1 answer

Rails 7, vips on M1 MacBook Air

I'm unable to use Rails 7.0.3.1 with vips on an M1 MacBook Air due to the error: rails aborted! LoadError: Could not open library 'glib-2.0.0': dlopen(glib-2.0.0, 0x0005): tried: 'glib-2.0.0' (no such file), '/usr/local/lib/glib-2.0.0' (no such…
Brody
  • 51
  • 3
2
votes
2 answers

Handle 150GB .jp2 image

I downloaded a 150GB satellite .jp2 image, of which I only want a small section at a time. How would I go about tiling the image in manageable chunks? Just extracting a part of the image would also be enough. As I'm only somewhat familiar with…
Edigorin
  • 21
  • 2
2
votes
1 answer

Rails ActiveStorage: Attach a Vips Image

I'm struggling to attach a Vips:Image object to an ActiveStorage object. I use Vips to compress a PNG image. I'm then looking to save this compressed PNG version into a second ActiveStorage attachment. The code is failing when attempting to attach.…
2
votes
1 answer

LibVips pdf to jpg on specific pdf page for multi-page pdf

I'm currently transforming pdfs to jpgs using the libvips command line. vips jpegsave mypdf.pdf myimg.jpg If a PDF is a multi page PDF then libvips will only transform the first page of the PDF. Is there a way to tell libvips which of the pages in…
ThreeAccents
  • 1,822
  • 2
  • 13
  • 24
2
votes
1 answer

How to do affine transform with pyvips and get the same size as the original image?

I did some experiment on the Affine function. I applied the transformation matrix I got from Air-lab to moving image with skimage, opencv and vips. Can Vips achieve the same result as the other two? I think vips did a lot pading for the result…
fred
  • 21
  • 1
2
votes
1 answer

libvips / pyvips access small sections of a multi-channel tiff (OME-Tiff)

Wondering if there's a speedy way to return specific pixel ranges of a given channel of an ome-tiff file using pyvips / libvips. The crop doesn't allow for channel specfics. My OME-Tiff is large (10 GB+) so I don't want to load the entire image into…
2
votes
1 answer

Resize the image using PHP vips library

I am using both PHP imagick and PHP vips library for image operations. I am working on image resize operation. For imagick I am using resizeImage() function and for vips I am using resize() function. But the output of both the image are different…
Amv
  • 59
  • 8
2
votes
4 answers

How to extract the pixels of a specific color for OCR?

I want to run some small images/sprites through OCR (Tesseract, probably) and extract a number or words out of it, and I know these number/words will be of a specific color (let's say white on a noisy/colored background). While reading about…
Thiago Belem
  • 7,732
  • 5
  • 43
  • 64
2
votes
1 answer

How to efficiently create a solid colored background image with Ruby-Vips

I want to create a solid colored background canvas of a given size, using the methods available with Ruby-Vips. Right now, I am able to do so, like this: canvas = Vips::Image.black(600, 600).ifthenelse([0,0,0], [252, 186, 3]) However, it seems…
adam tropp
  • 674
  • 7
  • 22
2
votes
1 answer

libvips Nearest Neighbor / Bicubic Deep Zoom Pyramid Creation

I'm in the process of moving some of my code off of openzoom.py and onto Libvips but am not sure how dictate the interpolation method, which is important. I at the very least need to be able to use bicubic/bilinear in one case and nearest neighbors…
2
votes
1 answer

Which heroku buildpack to use for VIPS support on Rails 6.0?

On Heroku, I would like to use Rails 6.0 with Active Storage and VIPS for fast and low memory image transformation. I tried following the instructions here https://github.com/janko/image_processing/issues/32, but the build fails: -----> vips app…
Ivan Raszl
  • 330
  • 2
  • 12
2
votes
1 answer

Combine remote images to one image using ruby-vips

I had a template image and need to append on that a specific images on X , Y positions. Is there any equivalent to that function in…
abdoutelb
  • 1,015
  • 1
  • 15
  • 33
2
votes
1 answer

pyvips Image composite not working as expected

When trying to composite images with pyvips 2.1.5: import pyvips i1 = pyvips.Image.black(100, 100, bands=4) + (255, 0, 0, 128) i2 = pyvips.Image.black(10, 10, bands=4) + (0, 255, 0, 128) i1.composite(i2, 'over').write_to_file('output.png') It…
chyno
  • 382
  • 3
  • 13
2
votes
1 answer

Issues building vips library from go

I am trying to run/build a GoLang package that uses vips. When I try to compile the program I get this error: go build gopkg.in/h2non/bimg.v1: invalid flag in pkg-config --cflags: -Xpreprocessor Here are my specs: macOS Mojave Version 10.14.3 vips…
cashews
  • 161
  • 1
  • 3
  • 9
1
2
3
11 12