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
1
vote
1 answer

Efficiently saving tiles to a bigtiff image

I have thousands of grayscale tiles of 256 x 256 pixels with dtype np.uint8 and I want to combine those into one BigTiff pyramidical image as fast as possible. My current approach is to create a numpy array with the size of the final image, in…
duocorn
  • 43
  • 1
  • 8
1
vote
1 answer

How to reduce space between lines in text using VIPS?

Using VIPS, how to reduce the space between lines in a text? There is an optional parameter for vips.Image.text() called spacing that determines this space between lines. However, I can make spacing larger but not smaller. E.g., in the code below…
PiFace
  • 526
  • 3
  • 19
1
vote
1 answer

How to optimize VIPS performance in PHP

I want to convert images held as strings in variables as fast as possible to WebP format while shrinking larger images but do not enlarge smaller images. The base system is a Debian 9.9 with PHP 7.3. I've tried to measure speed for the following…
rabudde
  • 7,498
  • 6
  • 53
  • 91
1
vote
1 answer

Draw multiple polylines using pyvips

I want to draw a polygon/polyline on to a big image. So, I am migrating from PIL/opencv to pyvips. Recently, I came across loadsvg_buffer method that can actually do it without the use of draw_mask and draw_image methods. Can someone give me one…
Aravind
  • 54
  • 6
1
vote
1 answer

How can I avoid a "Segmentation Fault (core dumped)" error when loading large .JP2 images with PIL/OpenCV/Matplotlib?

I am running the following simple line in a short script without any issues: Python 3.5.2; PIL 1.1.7; OpenCV 2.4.9.1; Matplotlib 3.0.1; ... # for example: img = plt.imread(i1) ... However, if the size of a loaded .JP2 > ~500 MB, Python3 throws the…
1
vote
1 answer

libvips and padding when doing image pyramids

I am trying to do a pyramid of tiles with a non-square image (width: 32768px and height: 18433px) I am using libvips as follows: vips dzsave my_image.tif out_folder --layout google --suffix .png For the same purpose I have also used…
Aenaon
  • 3,169
  • 4
  • 32
  • 60
1
vote
1 answer

Generate PDF preview with Shrine

I'm converting our backend file upload to work with Shrine. I managed to get the image upload and thumbnailing up and running pretty easily but I've been struggling to do the same with PDF files. The upload itself works, however, I can't manage to…
ilrock
  • 573
  • 8
  • 24
1
vote
1 answer

How to install libvips with mozjpeg and libimagequant on Debian/Ubuntu?

I want to build a server for treat all images of a website. I have a script in Nodejs using Sharp and I would like to setup the server with the best libs to use maximum power of libvips. I would like to get help to install it. I can install…
NAG
  • 341
  • 6
  • 29
1
vote
1 answer

vips - How to create justified text?

I'm using the vips library for manipulating some images, specifically its Lua binding, lua-vips, and I'm trying to create justified text images. I guess there is no available function in vips to do this directly, so I was wondering how to come up…
PiFace
  • 526
  • 3
  • 19
1
vote
1 answer

Overlay text with php-vips

I'm trying to write a PHP function to overlay text onto an image using the php-vips library. Looking through the documentation I can't find a function that draws text in the libvips documentation here and the php-vips documentation here doesn't…
avorum
  • 2,243
  • 10
  • 39
  • 49
1
vote
0 answers

Create binary tiff files (compressed with lzw) from numpy array

I need to create binary tiff files (normally 9 layered but only layer 0 is important) I have the results as boolean numpy 2D arrays. But I couldn't write them to tiff format. Code with PIL: res = np.zeros((89262, 208796),dtype=bool) rois =…
Uğur Dinç
  • 303
  • 3
  • 16
1
vote
2 answers

vips - How to achieve edge feather effect

I'm using the vips library for manipulating some images, specifically its Lua binding, lua-vips, and I'm trying to find a way to do a feather effect on the edge of an image. It's the first time I try a library for this kind of task and I've been…
PiFace
  • 526
  • 3
  • 19
1
vote
1 answer

Create Vips Image from Numpy RGB array for big images

I was trying to output a large, generated image with PIL/Pillow, but it breaks when the image sizes get bigger. So based on things I read on SO, I'm trying to use Vips. My generated data is a numpy array of RGB values. I want to convert this to a…
Kingsley
  • 14,398
  • 5
  • 31
  • 53
1
vote
1 answer

RLE8 image support/decompression with Pillow (PIL fork)

I'm using Pillow (version 5.2.0) on Python3 to open both PNG and BMP images, and display them with a Tkinter GUI. The PNG images display correctly with no issues, however, I'm encountering an IOError ("Unsupported BMP compression") with some of the…
bbotezatu
  • 25
  • 7
1
vote
1 answer

Making a huge image mosaic with pyvips

I am trying to make an image mosaic generator using pyvips. So basically, given an image (called original in the following) create a new, bigger, image that resembles the original one except each pixel (or more realistically groups of pixels) are…
Max Smith
  • 925
  • 1
  • 14
  • 25