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

331 questions
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
  • 370
  • 1
  • 9
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,124
  • 2
  • 16
  • 35
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
  • 26,115
  • 34
  • 118
  • 238
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
  • 73,317
  • 142
  • 374
  • 539
0
votes
2 answers

does wand support reading/writing webp images?

I have blob representing webp image I want to be able to create an image from the blob using Wand and then convert it to jpeg. Is that possible with Wand or any other python library.
Ubaidah
  • 867
  • 1
  • 10
  • 25
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

How to open multiple images using Wand and Python

I'm trying to use imagemagick to take several JPGs and lay them out on a pdf I'm at the beginning of the project and I do not understand how to open the multiple images and do this. My research indicated to me that this is possible on the command…
user2666063
  • 85
  • 1
  • 1
  • 6
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,289
  • 10
  • 28
  • 45
-1
votes
1 answer

prevent black and white image auto convert to grayscale image

Start from ImageMagick 6.8, it will auto convert a black and white image(RGB) to be grayscale, which will make the altered image to be lighter than the original one. In ImageMagick 6.9, we can turn this feature off by using the command "-set…
-1
votes
2 answers

How to avoid creating mipmaps for dds using python Wand?

Env: python - 3.6.6 Wand - 0.5.7 Code example: Part of this file from wand import image with image.Image(filename='example_32_on_32_px.png') as img: img.compression = 'dxt3' img.save(filename='output.dds') It will produce output.dds which…
Yuriy Leonov
  • 332
  • 1
  • 3
  • 22
-1
votes
1 answer

edit XML file in terminal

I have a server running on Linux system, and I want to edit an XML file of Imagemagick. The file content is: .. .. …
zaki
  • 97
  • 9
-1
votes
1 answer

How do I get Wand for the Raspberry Pi?

I am trying to learn more about displaying graphics with Python 2.7.9 and one post on StackOverflow directed me to wand, but nowhere can I find how to install wand. 'sudo apt-get install wand' fails with 'Unable to locate package…
user3573562
  • 161
  • 9
-1
votes
1 answer

python 2.7 wand: UnicodeDecodeError: (Error in get_font_metrics)

I am getting this error "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 17: ordinal not in range(128)" when I try to merge this image "La Pocatière.png". Python 2.7.11 bg_img = Image(filename='C:/Pocatière.png') …
mrzoogle
  • 91
  • 2
  • 12
-1
votes
1 answer

Memoryleak in Python script using Spark

I just started to use Spark for the first time for a OCR task, i have a folder of PDF files containing scanned text documents and I want to convert it to plain text. I first create a parallelized dataset of all the pdf's in the folder and perform a…
Chris p
  • 43
  • 5
-2
votes
1 answer

How to fix TypeError: __init__() takes at least 2 arguments (1 given) Error

I am trying to split the uploaded pdf file into images but i am getting error like take at least 2 arguments(1given). I know this error is already asked but i confused to fix in my program. from pyPdf import PdfFileWriter, PdfFileReader from…
Thala
  • 21
  • 4
1 2 3
22
23