Questions tagged [wand]

The ctypes-based simple ImageMagick binding for Python.

Wand is a ctypes-based simple ImageMagick binding library for Python. It works on Python 2.7, 3.2 through 3.9 and PyPy.

Docs

Community

383 questions
0
votes
2 answers

Python Wand Scaling Issue

I'm using Python Wand module(version 0.4.3.) to convert an image stored in pdf to PNG. Final PNG quality is great when I saved the final image in its orignal image width and height. But, when I try to save it to smaller image final PNG gets blurry…
wijerasa
  • 11
  • 5
0
votes
0 answers

Writing raw SVG data to a file in python3?

I have this code thus far: def make_png_download(): svg_data = Graphs.svgdata with open('chart.svg', 'wb+') as file: file.write(svg_data) with wand.image.Image(blob=file.read(), format="svg") as image: png_image =…
MattE
  • 159
  • 12
0
votes
5 answers

Using +level-colors from ImageMagick in Python with Wand

I'm going to use Wand to cut out some parts of an image. The image has a transparent background. But before I cut out the parts, I first want to make some adjustments to the source image (without actually altering the source file). The adjustments I…
Jip
  • 123
  • 8
0
votes
1 answer

How to motion blur with ImageMagick using wand?

I want to use motion blur with ImageMagick. Motion blur in ImageMagick documentation. But in Wand there is only gaussian_blur. Gaussian blur in Wand documentation. Is motion blur missing in wand?
crg__
  • 11
  • 1
0
votes
1 answer

Writing command line argument for Wand

I'm wondering how to convert this working command line sequence for ImageMagick into a Python script using the Wand library: convert me.jpg -fill none -fuzz 1% -draw 'matte 0,0 floodfill' -flop -draw 'matte 0,0 floodfill' -flop me.png It basically…
robeastham
  • 41
  • 1
  • 4
0
votes
1 answer

Shaped shadows with wand

Are there functions equivalent to: convert -background none -stroke black -fill white \ -font Candice -pointsize 48 label:A -trim \ \( +clone -background navy -shadow 80x3+3+3 \) +swap \ -background none -layers merge…
Emma
  • 430
  • 8
  • 14
0
votes
1 answer

Slice image with Wand

I want to extract multiple parts of an image with Wand. I've just found a function for cropping (in-place) the image img.crop(left, top, right, bottom) but note the slicing one as they say in the doc. Note If you want to crop the image but not…
Ghilas BELHADJ
  • 13,412
  • 10
  • 59
  • 99
0
votes
1 answer

Sliced tiff image gets bigger with python Wand

I have a .tif file that has 10 pages. I want to create a sub-image containing only pages 2-7, but the produced file is much bigger than the orginal. It should be smaller. What would you suggest? Here is my code: from wand.image import Image with…
Emanuel
  • 155
  • 2
  • 11
0
votes
1 answer

How to convert list of figures to long png in Python

I have a list of matplotlib figures and I'm wondering if there's any way to concatenate them into a single long png file. I have tried experimenting with MagickWand but it doesn't seem like there is a way to input figures as a canvas.Image. As well…
dlwlrma
  • 99
  • 2
  • 13
0
votes
1 answer

Wand Python module does not seem to work when called in a python script through a command to the operating system in matlab

In a matlab script, I use the shell escape character "!" to run other python scripts like external commands. All was running without any problem, excepted since the addition of a portion of code concerning the module Wand (I need this to convert…
servoz
  • 606
  • 9
  • 22
0
votes
1 answer

Is there a -level function in wand-py

Is there a -level function in wand-py to adjust the levels of an image? How do I access this ?
Gabriel
  • 8,990
  • 6
  • 57
  • 101
0
votes
1 answer

Wand equivalent of composite -stereo

I would like to write the Wand equivalent of: composite -stereo 0 right.tif left.tif output.tif I think the 0 is an x-axis offset and is probably not be relevant. I have bodged together some bits and pieces from other posts and the result is good,…
user4588415
0
votes
1 answer

Prevent interruption of wand display method on Raspbian

I am using wand library in my raspberry project running raspbian and python 2.7. I have a code part as below to display picture from an url: with Image(file=urllib2.urlopen(r.text)) as imageOBJ: display(imageOBJ) These lines display the image…
Süha Boncukçu
  • 913
  • 1
  • 10
  • 29
0
votes
3 answers

convert and crop image in tiles with python

I tried to tile a JPG image in python. Usualy I use imageMagick .. so I have seen than wand seems to do this work ... But I am not able to translate convert -crop 256x256 +repage big_image.jpg tiles_%d.jpg someone ca help me ?
delaye
  • 1,357
  • 27
  • 45
0
votes
1 answer

Draw an image into another one in imagemagick?

I would like to draw an image into another image with Wand (an ImageMagick binding for Python). The source image should totally replace the destination image (at given position). I can use: destinationImage.composite_channel(channel='all_channels',…
arthur.sw
  • 11,052
  • 9
  • 47
  • 104