Questions tagged [magickwand]

106 questions
3
votes
2 answers

PhotoShop - Automate Batch to remove content outside border

Would like to automate and capture only the map part and save it to a different file i.e. any thing outside the rectangle is removed. I tried exploring Photoshop's magic wand and refine edge tools but not sure if I am missing anything in my…
SunSmiles
  • 186
  • 9
3
votes
1 answer

Magickwand conversion to TIFF&CCITT group 4 compression gives uncompressed image

Trying to convert a 24 bpp bitmap to black & white TIFF with CCITT group 4 compression. The result is a TIFF 1 bpp image as expected but it is uncompressed. I'm using FreePascal which has magickwand bindings and the status is never…
reiniero
  • 428
  • 6
  • 14
3
votes
0 answers

Memory leak when resizing animated gif with ImageMagick

I'm trying to resize animated gifs with ImageMagick MagickWand, but get some small memory leaks. ~3 Mb per 400 gifs. I`m not 100% sure if I'm using MagickWand right. MagickWandGenesis(); MagickCore::MagickWand *magick_wand =…
2
votes
2 answers

wand.image Import Error: shared library not found. You probably had not installed ImageMagick library

I am attempting to use the PDFPlumber library, which uses Wand's image format. However, upon trying to run: from wand.image import Image I get this error: Traceback (most recent call last): File…
Moe
  • 21
  • 1
2
votes
0 answers

How to deal with MagickWand C api having different include paths depending on system

What I mean by that is that in the include directive, on some systems the path is given by #include While on other systems it's #include I'm not sure what the correct path in any system is and I cannot…
Alex
  • 31
  • 4
2
votes
1 answer

Apply stroke to caption: using MagickWand

ImageMagick lets you apply a caption to an image. The caption text is automatically sized and wrapped to fit into the area that you define. Using ImageMagick via the command line, I am able to define a stroke width and colour for this caption like…
2
votes
1 answer

Errors converting pdf to jpg using wand, Imagemagick, and Django

I am using ImageMagick 6.7.7-10 2017-07-31 Q16 on Ubuntu 14.04, through Wand 0.4.4, Python 3.4.3 and Django 1.11. I am trying to create a jpg thumbnail of a pdf file. On the command line, I can do this with no errors: convert -thumbnail x300…
user1045680
  • 815
  • 2
  • 9
  • 19
2
votes
0 answers

Installation of Wand fails because of imagemagick linking error

I want to use the python package wand and installed it with pip install Wand but when I run the script I get the error ImportError: MagickWand shared library not found. You probably had not installed ImageMagick library. Try to install: brew…
carl
  • 4,216
  • 9
  • 55
  • 103
2
votes
1 answer

magickWand -> PNG to JPG

When converting from PNG to JPG using the MagickWand API, how do I set the background to specified color for transparent pixels? I still get only white background which I don't want. I know there is similar question, but without answer = How to set…
Oldes
  • 937
  • 1
  • 9
  • 24
2
votes
1 answer

SVG to PNG by PythonMagickWand

I try to convert SVG to PNG. Result picture has a white background I need transparent. Sample of code: wand = NewMagickWand() MagickReadImage(wand,tmp_file_name) transparentColor = NewPixelWand() PixelSetMagickColor(transparentColor,…
mapcuk
  • 800
  • 1
  • 7
  • 21
2
votes
1 answer

getting the average rgb value of an image in wand

I'm wondering if it is possible to calculate the average rgb value in with wand? I know how to do it with PIL, but in the docs of wand I can't really find how to get the image data. The only thing I could find was this: for row in image: for…
Tom
  • 2,545
  • 5
  • 31
  • 71
2
votes
2 answers

'jpeg' is unsupported format error

This is method i wrote: def pdf_page_to_png(src_pdf, pagenum=0, resolution=300, slug=''): dst_pdf = PyPDF2.PdfFileWriter() dst_pdf.addPage(src_pdf.getPage(pagenum)) pdf_bytes = io.BytesIO() dst_pdf.write(pdf_bytes) …
KylieY
  • 21
  • 2
2
votes
0 answers

Pass Image as file to an ImageField without saving

I have a model, lets call it FooModel, that has an image field of type models.Imagefield. I'm also using wand.image to do some transformation and resizing to an image before I add it to the FooModel.image field. So I have something along this…
Hashirun
  • 89
  • 1
  • 9
2
votes
2 answers

Wand turns transparent background to black

I am trying to grayscale with python using Wand, but when I do from wand.image import Image with Image(filename='image.png') as img: img.type = 'grayscale' img.save(filename='image_gray.png') it turns the transparent background into black.…
Tom
  • 2,545
  • 5
  • 31
  • 71
2
votes
1 answer

Get list of result files converted via Wand

Imagemagick is open source software suite for displaying, converting, and editing raster image files. Wand is a ctypes-based ImageMagick binding for Python. How do i get the list of image files, which i got as a result of using Wand? For example…
Mirzhan Irkegulov
  • 17,660
  • 12
  • 105
  • 166