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
0 answers

Python Wand, Color.red_int8 (blue and green too) always returns 0

Running this simple example: with Color('#f00') as red: print red print red.red_int8, red.green_int8, red.blue_int8 the first print shows srgb(255,0,0) as I expected. For the second print I expected to get 255 0 0 but it actually prints 0 0…
ap0
  • 1,083
  • 1
  • 12
  • 37
0
votes
2 answers

Python-wand: How can I read image properties/statistics

I am trying to extract statistics for an image such as the "mean", "standard-deviation" etc. However, I cannot find anything related in the python-wand documentation about it. From the command line I can get such statistics like this: convert…
Vangelis Tasoulas
  • 3,109
  • 3
  • 23
  • 36
0
votes
1 answer

Wand (imagemagick) draw colored points on top of greyscale sun raster image

Here's what I have so far: from wand.image import Image from wand.display import display img=Image(filename='filename.ras') display(img) next I want to loop over a list of 2D indices and change the pixel color of each of these corresponding points…
zimzam
  • 81
  • 8
0
votes
1 answer

gpio programming in c for wandboard

How i can access gpio wandboard in c? I have a wandboard with ubuntu 14.04 and a wanted access our gpio in my c program. I can access in shell script, and i can put my script in my c code, but i wanted a mode of access the gpio directly my c code,…
user3651443
  • 29
  • 1
  • 11
0
votes
1 answer

building tiff stack with wand

How can I achieve this with Wand library for python: convert *.png stack_of_multiple_pngs.tiff ? In particular, how can I read every png image, pack them into a sequence and then save the image as tiff stack: with Image(filename='*.tiff') as img: …
Yauhen Yakimovich
  • 13,635
  • 8
  • 60
  • 67
0
votes
1 answer

Converting pdf to Image : spacing issue

I am trying to convert the first page of PDF (containing both image and text) to image using Wand (Imagemagick binding for python). The output looks like this!!!https://i.stack.imgur.com/OdCMZ.jpg The text here is not the part of the image.The Image…
0
votes
1 answer

Python 3 and Wand: ValueError when attempting to save new image

I have a file with that consists of color names and values foo,(255, 212, 201),#FFD4C9 bar,(248, 201, 189),#F8C9BD baz,(167, 145, 138),#A7918A That I'd like to turn into 200px × 200px color swatches (i.e. just rectangles of that color) named…
Ryan M
  • 647
  • 2
  • 6
  • 16
0
votes
2 answers

Create square thumbnails with Python + MagickWand

How can I create square thumbnails with Python and Wand? I'm trying to make square thumbnails from source images of any size. It's important that the thumbnail have the same aspect ratio as the original, cropping is ok, and it should fill the sapce…
ensnare
  • 40,069
  • 64
  • 158
  • 224
0
votes
2 answers

How to multiply images in Python Wand?

I'm currently writing a script to generate some textures according to color schemes for a project of mine, and one of the things I need to do is "multiply" the image, much like the layering mode that you can find in Gimp or Photoshop. However, I'm…
Zauberin Stardreamer
  • 1,284
  • 1
  • 13
  • 22
0
votes
2 answers

jpg images converted to PNG with wand get much larger

I've got a batch process that converts uploaded images using wand to generate thumbnails and resized versions. The problem is that the converted images get a lot larger than the original image. An uploaded jpg (1024x768) that was 239kB ends up over…
sliptonic
  • 460
  • 3
  • 11
0
votes
1 answer

Quantize using wand

I want to retrieve a list of n average colors in an image using Python Wand. From the command line, this can be achieved using Imagemagick directly. convert image.jpg -colors $n -format %c histogram:info:- Wands Image objects have a histogram…
XZS
  • 2,374
  • 2
  • 19
  • 38
0
votes
1 answer

How to get just the image format with Magick/py-wand?

I'm using py-wand to read images in Python. All I really want though is the image meta information, like size, format, color depth, etc. I don't want to load the entire image. Some of my images are extremely large and loading them this way is…
edA-qa mort-ora-y
  • 30,295
  • 39
  • 137
  • 267
0
votes
1 answer

Wand with webp support on Ubuntu 12.04

I am trying to use Wand (http://docs.wand-py.org/en/0.3.5/) library to transform images server side. I installed libmagickwand-dev on my Ubuntu server. I can work with jpg and png images but I get an error message when trying to transform a webp…
Richard Knop
  • 81,041
  • 149
  • 392
  • 552
0
votes
1 answer

Python Wand open a img file as blob, md5 is incorrect. Is this the Wand's bug?

Python Wand open a img file as blob, md5 is incorrect. with Image(filename=picture) as img: blob = img.make_blob() print 'blob md5', hashlib.md5(blob).hexdigest() with open(picture, 'rb') as img: content = img.read() print 'content…
0
votes
1 answer

Create thumbnails for images inside specific folders

I would like to create image thumbnails (250x250px) using Wand (imagemagick) for python. I want results to be similar to PHP's imagecopyresampled()** function with no quality loss if possible. My directory structure is the following: > main folder…
Biker John
  • 2,621
  • 10
  • 33
  • 52
1 2 3
25
26